@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}
@required {podcastKey: str}
@returns(200)

@endpoint PUT /podcast-bot/podcasts/{podcastKey}
@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)

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

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/recordingConfig
@required {podcastKey: str, streamUrl: str, recordingSchedule: map{frequency!: str, daysOfWeek: [str], daysOfMonth: [int(int32)], startTime!: str, durationMinutes!: int(int64), timezone!: str}}
@optional {introAudioUrl: str, outroAudioUrl: str}
@returns(200)

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/processingPresets
@required {podcastKey: str}
@optional {removeBackgroundMusic: bool, introAudioUrl: str, outroAudioUrl: str, aiTitleSummary: bool}
@returns(200)

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/interviewPresets
@required {podcastKey: str}
@optional {extractInterviews: bool, interviewPodcastName: str, interviewMinLengthMinutes: int(int64)}
@returns(200)

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

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

@endpoint PUT /podcast-bot/podcasts/{podcastKey}/aiAdsPresets
@required {podcastKey: str}
@optional {removeAds: bool, insertProgrammaticAds: bool, adsFrequency: int(int64)}
@returns(200)

@endgroup

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

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

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

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

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

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

@endgroup

@group stats
@endpoint POST /stats/mounts/{mount}/auth-cache/reload
@required {mount: str}
@returns(200)

@endpoint POST /stats/mounts/{mount}/auth-cache/reload/all
@required {mount: str}
@returns(200)

@endgroup

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

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

@endpoint POST /podcast-bot/podcasts/{podcastKey}/episodes/{episodeKey}/reprocess/custom
@required {podcastKey: str, episodeKey: str}
@optional {cutIntroAudioUrl: str, cutOutroAudioUrl: str, addIntroAudioUrl: str, addOutroAudioUrl: str, aiTitleSummary: bool, removeBackgroundMusic: bool, removeAds: bool, extractInterviews: bool, interviewMinLengthMinutes: int(int64)}
@returns(200)

@endpoint POST /podcast-bot/podcasts/recording/create
@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}, recordingConfig: map{streamUrl!: str, recordingSchedule!: map, introAudioUrl: str, outroAudioUrl: str}}
@optional {processingPresets: map{removeBackgroundMusic: bool, introAudioUrl: str, outroAudioUrl: str, aiTitleSummary: bool}, aiAdsConfig: map{removeAds: bool, insertProgrammaticAds: bool, adsFrequency: int(int64)}, interviewConfig: map{extractInterviews: bool, interviewPodcastName: str, interviewMinLengthMinutes: int(int64)}}
@returns(200)

@endgroup

@group partners
@endpoint POST /partners/streams
@required {X-Auth-Token: str}
@optional {currentTrack: bool=false}
@returns(200)

@endgroup

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

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

@endpoint POST /api/v2/podcasts/{podcastKey}/episodes/create
@required {podcastKey: str}
@returns(200)

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

@endpoint POST /api/v2/podcasts/create
@returns(200)

@endgroup

@group stats
@endpoint GET /stats/mounts/{mount}/live/total
@required {Authorization: str, mount: str}
@returns(200)

@endgroup

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

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

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

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

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

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

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

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

@endpoint GET /podcast-bot/jobs/podcasts/{podcastKey}
@required {podcastKey: str}
@returns(200)

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

@endgroup

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

@endpoint GET /partners/streams/{streamId}
@required {streamId: str, X-Auth-Token: str}
@optional {currentTrack: bool=false}
@returns(200)

@endpoint GET /partners/streams/{streamId}/tracks
@required {streamId: str, X-Auth-Token: str}
@returns(200)

@endgroup

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

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

@endpoint GET /api/v2/stations/languages
@returns(200)

@endpoint GET /api/v2/stations/genres
@returns(200)

@endpoint GET /api/v2/stations/countries
@returns(200)

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

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

@endpoint GET /api/v2/podcasts/languages
@returns(200)

@endpoint GET /api/v2/podcasts/countries
@returns(200)

@endpoint GET /api/v2/podcasts/categories
@returns(200)

@endgroup

@end
