@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Aggregators API Service
@base https://api.zeno.fm
@version 0.77-dadb296
@auth ApiKey x-zeno-api-key in header | Bearer basic
@endpoints 51
@hint download_for_search
@toc podcast-bot(23), api(21), stats(3), partners(4)

@group podcast-bot
@endpoint GET /podcast-bot/podcasts/{podcastKey}
@desc Get podcast
@required {podcastKey: str}
@returns(200) OK

@endpoint PUT /podcast-bot/podcasts/{podcastKey}
@desc Update podcast info
@required {podcastKey: str, title: str, description: str, ownerName: str, ownerEmail: str, categories: [str], language: str}
@optional {key: str, coverArtUrl: str, summary: str, link: str, explicit: bool, interviewPodcastKey: str}
@returns(200) OK

@endpoint DELETE /podcast-bot/podcasts/{podcastKey}
@desc Delete podcast
@required {podcastKey: str}
@returns(200) OK

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/recordingConfig
@desc Update podcast recording configuration
@required {podcastKey: str, streamUrl: str # Recording audio stream, recordingSchedule: map{frequency!: str, daysOfWeek: [str], daysOfMonth: [int(int32)], startTime!: str, durationMinutes!: int(int64), timezone!: str} # Podcast Recording Schedule model}
@optional {introAudioUrl: str # Edit based on intro audio. Required if outro is specified., outroAudioUrl: str # Edit based on outro audio. Required if intro is specified.}
@returns(200) OK

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/processingPresets
@desc Update podcast processing presets
@required {podcastKey: str}
@optional {removeBackgroundMusic: bool, introAudioUrl: str # Add intro audio to recorded episode, outroAudioUrl: str # Add outro audio to recorded episode, aiTitleSummary: bool # Generate episode title and summary}
@returns(200) OK

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/interviewPresets
@desc Update podcast interview extraction presets
@required {podcastKey: str}
@optional {extractInterviews: bool # Enable Interview Extraction, interviewPodcastName: str # Interview Podcast Name. Required if interview extraction is enabled, interviewMinLengthMinutes: int(int64) # Minimum Interview Length (minutes). Required if interview extraction is enabled}
@returns(200) OK

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/unpublish
@desc Unpublish podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/publish
@desc Publish podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/aiAdsPresets
@desc Update podcast AI Ads presets
@required {podcastKey: str}
@optional {removeAds: bool, insertProgrammaticAds: bool, adsFrequency: int(int64) # Required if insertProgrammaticAds is enabled}
@returns(200) OK

@endgroup

@group api
@endpoint GET /api/v2/podcasts/{podcastKey}
@desc Get podcast
@required {podcastKey: str}
@returns(200) OK

@endpoint PUT /api/v2/podcasts/{podcastKey}
@desc Update podcast
@required {podcastKey: str}
@returns(200) OK

@endpoint DELETE /api/v2/podcasts/{podcastKey}
@desc Delete podcast
@required {podcastKey: str}
@returns(200) OK

@endpoint GET /api/v2/podcasts/{podcastKey}/episodes/{episodeKey}
@desc Get podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint PUT /api/v2/podcasts/{podcastKey}/episodes/{episodeKey}
@desc Update podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint DELETE /api/v2/podcasts/{podcastKey}/episodes/{episodeKey}
@desc Delete podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endgroup

@group stats
@endpoint POST /stats/mounts/{mount}/auth-cache/reload
@desc Retrieve total numer of live stats for a specific mount
@required {mount: str}
@returns(200) OK

@endpoint POST /stats/mounts/{mount}/auth-cache/reload/all
@desc Retrieve total numer of live stats for a specific mount
@required {mount: str}
@returns(200) OK

@endgroup

@group podcast-bot
@endpoint POST /podcast-bot/workflows/process-file
@desc Process file
@optional {fileUrl: str, removeAds: bool, removeBackgroundMusic: bool, removeSilence: bool, normalizeAudioLevels: bool, aiAutoEnhance: bool, removeFillerWords: bool}
@returns(200) OK

@endpoint POST /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/reprocess
@desc Reprocess episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint POST /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/reprocess/custom
@desc Reprocess episode with custom presets
@required {podcastKey: str, episodeKey: str}
@optional {cutIntroAudioUrl: str # Edit based on intro audio. Required if cutOutro is specified., cutOutroAudioUrl: str # Edit based on outro audio. Required if cutIntro is specified., addIntroAudioUrl: str # Add intro audio to recorded episode, addOutroAudioUrl: str # Add outro audio to recorded episode, aiTitleSummary: bool # Generate episode title and summary, removeBackgroundMusic: bool, removeAds: bool, extractInterviews: bool # Enable Interview Extraction, interviewMinLengthMinutes: int(int64) # Minimum Interview Length (minutes). Required if interview extraction is enabled}
@returns(200) OK

@endpoint POST /podcast-bot/podcasts/recording/create
@desc Create recording podcast
@required {podcast: map{key: str, title!: str, coverArtUrl: str, summary: str, description!: str, ownerName!: str, ownerEmail!: str, categories!: [str], language!: str, link: str, explicit: bool, interviewPodcastKey: str} # Podcast model, recordingConfig: map{streamUrl!: str, recordingSchedule!: map, introAudioUrl: str, outroAudioUrl: str} # Podcast Recording Config model}
@optional {processingPresets: map{removeBackgroundMusic: bool, introAudioUrl: str, outroAudioUrl: str, aiTitleSummary: bool} # Podcast Processing Presets model, aiAdsConfig: map{removeAds: bool, insertProgrammaticAds: bool, adsFrequency: int(int64)} # Podcast AI Ads Config model, interviewConfig: map{extractInterviews: bool, interviewPodcastName: str, interviewMinLengthMinutes: int(int64)} # Podcast Interview Config model}
@returns(200) OK

@endgroup

@group partners
@endpoint POST /partners/streams
@desc Get the partner information for a list of streams.
@required {X-Auth-Token: str}
@optional {currentTrack: bool=false}
@returns(200) OK

@endgroup

@group api
@endpoint POST /api/v2/stations/search
@desc Search stations
@optional {query: str, filters: map{country: [str], language: [str], genre: [str]} # Filters for station search, hitsPerPage: int(int32)=10, page: int(int32)=1, minSessions: int(int64)}
@returns(200) OK

@endpoint POST /api/v2/stations/listener/location
@desc Get top stations by listener location
@optional {maxResults: int(int32)=10, continents: [str], countries: [str]}
@returns(200) OK

@endpoint POST /api/v2/podcasts/{podcastKey}/episodes/create
@desc Create podcast episode
@required {podcastKey: str}
@returns(200) OK

@endpoint POST /api/v2/podcasts/search
@desc Search podcasts
@optional {query: str, filters: map{country: [str], language: [str], category: [str], podcastType: str} # Filters for podcast search, hitsPerPage: int(int32)=10, page: int(int32)=1}
@returns(200) OK

@endpoint POST /api/v2/podcasts/create
@desc Create podcast
@returns(200) OK

@endgroup

@group stats
@endpoint GET /stats/mounts/{mount}/live/total
@desc Retrieve total numer of live stats for a specific mount
@required {Authorization: str # Authorization token, mount: str}
@returns(200) OK

@endgroup

@group podcast-bot
@endpoint GET /podcast-bot/workflows/{workflowId}/details
@desc Get workflow details
@required {workflowId: str}
@returns(200) OK

@endpoint GET /podcast-bot/podcasts/{podcastKey}/episodes
@desc Get podcast episodes
@required {podcastKey: str}
@optional {limit: str, offset: str}
@returns(200) OK

@endpoint GET /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}
@desc Get podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint DELETE /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}
@desc Delete podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint GET /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/metadata
@desc Get metadata for a podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint GET /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/adsMarkers
@desc Get Ads markers info for a podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endpoint GET /podcast-bot/podcasts/{podcastKey}/episodes/interviews
@desc Get podcast interviews
@required {podcastKey: str}
@optional {limit: str, offset: str}
@returns(200) OK

@endpoint GET /podcast-bot/podcasts/list
@desc List podcasts
@optional {limit: str, offset: str}
@returns(200) OK

@endpoint GET /podcast-bot/jobs/podcasts/{podcastKey}
@desc Get all processing jobs for a podcast
@required {podcastKey: str}
@returns(200) OK

@endpoint GET /podcast-bot/jobs/podcasts/{podcastKey}/episodes/{episodeKey}
@desc Get processing jobs for a podcast episode
@required {podcastKey: str, episodeKey: str}
@returns(200) OK

@endgroup

@group partners
@endpoint GET /partners/{partnerId}/ads/stats
@desc Retrieve partner stats
@required {partnerId: str, from: str(date), to: str(date), x-zeno-api-key: str # Authorization token}
@optional {type: str(DAILY/HOURLY/BREAKDOWN), page: int(int32)=0, size: int(int32)=10}
@returns(200) OK

@endpoint GET /partners/streams/{streamId}
@desc Get the stream partner information.
@required {streamId: str, X-Auth-Token: str}
@optional {currentTrack: bool=false}
@returns(200) OK

@endpoint GET /partners/streams/{streamId}/tracks
@desc Get the stream partner information.
@required {streamId: str, X-Auth-Token: str}
@returns(200) OK

@endgroup

@group api
@endpoint GET /api/v2/stations/{stationKey}
@desc Get station
@required {stationKey: str}
@returns(200) OK

@endpoint GET /api/v2/stations/list
@desc List stations
@optional {page: int(int32)=1, hitsPerPage: int(int32)=10, minSessions: int(int64)}
@returns(200) OK

@endpoint GET /api/v2/stations/languages
@desc Get the list of Languages that can be used to filter stations in the search stations request
@returns(200) OK

@endpoint GET /api/v2/stations/genres
@desc Get the list of Genres that can be used to filter stations in the search stations request
@returns(200) OK

@endpoint GET /api/v2/stations/countries
@desc Get the list of Countries that can be used to filter stations in the search stations request
@returns(200) OK

@endpoint GET /api/v2/stations/browse
@desc Browse all stations
@optional {limit: int(int64)=50, offset: int(int64)=0, mount_status: bool=false}
@returns(200) OK

@endpoint GET /api/v2/podcasts/{podcastKey}/episodes
@desc Get podcast episodes
@required {podcastKey: str}
@optional {limit: str, offset: str}
@returns(200) OK

@endpoint GET /api/v2/podcasts/languages
@desc Get the list of Languages that can be used to filter podcasts in the search podcasts request
@returns(200) OK

@endpoint GET /api/v2/podcasts/countries
@desc Get the list of Countries that can be used to filter podcasts in the search podcasts request
@returns(200) OK

@endpoint GET /api/v2/podcasts/categories
@desc Get the list of Categories that can be used to filter podcasts in the search podcasts request
@returns(200) OK

@endgroup

@end
