{"openapi":"3.1.0","info":{"title":"Podspace API","version":"0.1.0","description":"Podspace hosts podcasts. The Podspace API gives you access to the spaces you are a member of, so you can:\n\n- read your spaces, their shows and their episodes;\n- query listening analytics for a show, a space or an episode: listens, listeners, video views and Spotify numbers, over time or broken down by episode, country or app ([`query_analytics`](https://api.podspace.com/docs/reference/query_analytics));\n- as a space admin, read your ad campaigns and query their impressions and listeners ([`query_campaign_analytics`](https://api.podspace.com/docs/reference/query_campaign_analytics));\n- connect Claude and other MCP clients, and ask about your shows in plain language.\n\nThe same operations are served over REST at `https://api.podspace.com/v1`, described by the OpenAPI 3.1 document at `https://api.podspace.com/openapi.json`, and as MCP tools at `https://api.podspace.com/mcp`. Every call acts as you, limited to the scopes and spaces you chose, and can do no more than you can in Podspace.\n\n## Where to start\n\n- [Quickstart](https://api.podspace.com/docs/quickstart): create a token and make your first calls.\n- [Authentication](https://api.podspace.com/docs/authentication): tokens, scopes, spaces and rate limits.\n- [Connect an AI assistant](https://api.podspace.com/docs/connectors): add Podspace to Claude, Cursor and other MCP clients."},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A manual token (`psp_pat_…`) from the Connected apps and tokens page, or an OAuth access token. Each operation lists the scope it needs."},"oauth2":{"type":"oauth2","description":"OAuth 2.1 authorization code with PKCE (S256), as MCP connectors use it. Discovery: `/.well-known/oauth-authorization-server`; pass `resource`.","flows":{"authorizationCode":{"authorizationUrl":"https://app.podspace.com/oauth/authorize","tokenUrl":"https://api.podspace.com/oauth/token","refreshUrl":"https://api.podspace.com/oauth/token","scopes":{"shows:read":"See your spaces, shows and episodes.","campaigns:read":"See the ad campaigns of the spaces you administer.","analytics:read":"See listening statistics for your shows and episodes, and how your ad campaigns are delivering.","episodes:write":"Upload files, create and edit episodes, and delete drafts.","episodes:publish":"Publish, schedule and unpublish episodes, and delete published ones.","offline_access":"Stay connected without asking you to approve again."}}}}},"schemas":{"UploadStartInput":{"type":"object","properties":{"show_id":{"type":"string","format":"uuid","description":"The show the file is for, from list_shows."},"kind":{"type":"string","enum":["audio","video","image"],"description":"audio or video: an episode's media; image: its cover. By extension, audio is .mp3, .m4a, .aac, .wav, .flac, .ogg, .opus, .aiff, .aif, .wma; video .mp4, .mov, .m4v, .webm, .mkv, .avi; image .jpg, .jpeg, .png."},"filename":{"type":"string","minLength":1,"maxLength":200,"description":"The file's name with its extension, e.g. episode-42.mp4. The extension has to be one the kind takes."},"size_bytes":{"type":"integer","minimum":1,"maximum":53687091200,"description":"The file's exact size in bytes: at most 50 GB for audio and video, 20 MB for an image. Storage refuses a part of another size."}},"required":["show_id","kind","filename","size_bytes"],"additionalProperties":false},"EpisodeAdMarkerInput":{"type":"object","properties":{"type":{"type":"string","enum":["pre","mid","post"],"description":"pre: before the episode starts; mid: at a time in it; post: after it ends."},"offset_seconds":{"description":"For mid only: where the break is, in seconds from the start, e.g. 754.25. Null or left out, processing places it.","anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":86400},{"type":"null"}]}},"required":["type"],"additionalProperties":false,"description":"A place where ads may be inserted."},"EpisodeCreateInput":{"type":"object","properties":{"show_id":{"type":"string","format":"uuid","description":"The show the episode is for, from list_shows."},"title":{"type":"string","minLength":1,"maxLength":500,"description":"The episode's title."},"description":{"default":"","type":"string","maxLength":100000,"description":"The show notes, as HTML or plain text."},"published_at":{"default":null,"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the episode is published, ISO 8601 with a zone (2026-11-20T05:00:00Z): now or earlier publishes it at once, later schedules it, null keeps it a draft. Anything but null needs the episodes:publish scope."},"episode_type":{"default":"full","type":"string","enum":["full","trailer","bonus"],"description":"full, trailer or bonus, as podcast apps show it."},"explicit":{"type":"boolean","description":"Whether the episode is marked explicit."},"season_number":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}],"description":"The season number; null for none."},"episode_number":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}],"description":"The episode number; null for none."},"audio_upload_id":{"description":"The episode's audio: a finished upload of kind audio, from start_upload. Pass exactly one of audio_upload_id and video_upload_id.","type":"string","format":"uuid"},"video_upload_id":{"description":"The episode's video: a finished upload of kind video. Its audio is made from the video.","type":"string","format":"uuid"},"image_upload_id":{"description":"The episode's own cover: a finished upload of kind image. Omit to use the show's.","type":"string","format":"uuid"},"ad_markers":{"description":"Where ads may be inserted: at most one pre and one post, and as many mid as the show has mid-roll slots (one unless its space set up more). The list is the whole set: a slot not in it is switched off. Omit for every slot of the show, with mid-rolls placed when the audio is processed.","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/EpisodeAdMarkerInput"}}},"required":["show_id","title"],"additionalProperties":false},"EpisodeUpdateInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500,"description":"The episode's title."},"description":{"type":"string","maxLength":100000,"description":"The show notes, as HTML or plain text."},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the episode is published, ISO 8601 with a zone (2026-11-20T05:00:00Z): now or earlier publishes it at once, later schedules it, null keeps it a draft. Anything but null needs the episodes:publish scope."},"episode_type":{"type":"string","enum":["full","trailer","bonus"],"description":"full, trailer or bonus, as podcast apps show it."},"explicit":{"type":"boolean","description":"Whether the episode is marked explicit."},"season_number":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}],"description":"The season number; null for none."},"episode_number":{"anyOf":[{"type":"integer","minimum":0,"maximum":100000},{"type":"null"}],"description":"The episode number; null for none."},"image_upload_id":{"description":"A new cover: a finished upload of kind image; null removes the episode's own cover.","anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"ad_markers":{"description":"Where ads may be inserted: at most one pre and one post, and as many mid as the show has mid-roll slots (one unless its space set up more). The list is the whole set: a slot not in it is switched off. An empty list switches them all off.","maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/EpisodeAdMarkerInput"}}},"additionalProperties":false},"AnalyticsQueryInput":{"type":"object","properties":{"show_id":{"description":"Report on this show, from list_shows. Pass exactly one of show_id, space_id or episode_id.","type":"string","format":"uuid"},"space_id":{"description":"Report on this space (all its shows), from list_spaces; for space admins only.","type":"string","format":"uuid"},"episode_id":{"description":"Report on this published episode, from list_episodes.","type":"string","format":"uuid"},"metrics":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["plays","listens","listeners","hls_views","youtube_views","spotify_streams","spotify_listeners"],"description":"plays: Plays as the dashboard counts them: listens, plus youtube_views and spotify_streams where the show distributes there (for a space, any of its shows). Additive. Breaks down and filters only by what all of its parts can: show, episode and time. listens: The dashboard's IAB Listens: listens of the audio from the RSS feed, in any app, plus hls_views. Additive: sums across rows and buckets. Breaks down and filters by show, episode and time only, since HLS views have no country, region, city or app: for those, ask for listeners. listeners: Unique listeners (client keys) of the RSS feed's audio, counted once within each row: the dashboard's IAB Listeners. HLS views have no unique count, and Spotify's is spotify_listeners. Not additive: summing rows or buckets counts a person once per row or bucket; ask without the breakdown for a total. hls_views: Apple/HLS video views; part of listens and plays. Additive. youtube_views: YouTube views, where the show distributes to YouTube (for a space, any of its shows); part of plays. Additive. spotify_streams: Spotify streams, where the show uses Spotify distribution (for a space, any of its shows); part of plays. Additive. spotify_listeners: Spotify listeners as Spotify reports them per episode and day, summed over the row: someone who listens on several days counts more than once. Separate from listeners, and not additive with it: one person can be in both."},"description":"What to count, a column each, in this order. plays and listens are the dashboard's Plays and IAB Listens, and listeners its IAB Listeners. The dashboard's Listeners figure is listeners + spotify_listeners, which counts a person in both twice, and its country and app pages count listens without hls_views."},"dimensions":{"default":[],"description":"What to break the numbers down by, a column each (show and episode add a title column). None: one row of totals. At most 2 together with granularity, and not show with episode. listeners breaks down and filters by every dimension; plays, listens, hls_views and spotify_listeners by show, episode and time only; youtube_views also by app; spotify_streams also by country or app, but filters by show, episode and app only. An app filter on youtube_views or spotify_streams needs app as a dimension.","maxItems":2,"type":"array","items":{"type":"string","enum":["show","episode","country","region","city","app"],"description":"show: The show: its id, with a show_title column. For a space, a row per show. episode: The episode: its id, with an episode_title column. country: The listener's country, by name (e.g. Sweden); null if unknown. region: The listener's region, by name; region names repeat across countries, so pair it with country. city: The listener's city, by name. app: The app or browser that played it, by name (e.g. Apple Podcasts, Spotify, YouTube)."}},"granularity":{"description":"Adds a time column: a row per day, Monday-start week, month or quarter (the window widens to whole ones), at most 92 buckets. Every bucket is listed, 0 where nothing was played; with dimensions, for each combination that has numbers in any bucket. A day is the date the analytics store gives a listen when it records it, meant as the listener's local date (its exact time zone is not yet confirmed); YouTube and Spotify days are as those platforms report them. The window's dates are picked in the show's (or the space's) time zone.","type":"string","enum":["day","week","month","quarter"]},"period":{"description":"A preset window in the show's (or space's) time zone; default last_30_days. last_week and last_month are the previous whole week (Monday to Sunday) and month; the others end today. Give either period, or from and to.","type":"string","enum":["last_7_days","last_28_days","last_30_days","last_90_days","this_week","last_week","this_month","last_month","year_to_date"]},"from":{"description":"First day of a custom window (YYYY-MM-DD), with to.","type":"string","format":"date"},"to":{"description":"Last day of a custom window (YYYY-MM-DD, inclusive), at most 366 days from from.","type":"string","format":"date"},"filters":{"default":[],"description":"Narrow the rows, one filter per dimension. They can only narrow what show_id, space_id or episode_id reports on.","maxItems":6,"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","enum":["show","episode","country","region","city","app"],"description":"What to filter on: show or episode by id, the others by name as the dimension returns them."},"values":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Keep rows matching any of these values (at most 50). Show and episode ids must belong to what the query reports on."}},"required":["dimension","values"],"additionalProperties":false,"description":"One filter; all filters apply together."}},"order_by":{"description":"Highest first by this metric, one of metrics. Without it, rows come in time, then dimension order.","type":"string","enum":["plays","listens","listeners","hls_views","youtube_views","spotify_streams","spotify_listeners"]},"limit":{"description":"Keep only the top rows by order_by (default: the first metric), 1-500: a top list of dimension values, or with granularity alone the top buckets. Not with granularity and a dimension together, since it would cut single buckets, not whole series: for the series of the top values, rank them first without granularity, then ask for the series with a filter on them. Without limit, a query of more than 500 rows is result_too_large.","type":"integer","minimum":1,"maximum":500},"fresh":{"default":false,"description":"Skip the cache and read the numbers again; costs the full budget, as a query not cached does.","type":"boolean"}},"required":["metrics"],"additionalProperties":false},"CampaignAnalyticsQueryInput":{"type":"object","properties":{"space_id":{"description":"Report on this space's campaigns, from list_spaces. Pass at most one of space_id, show_id or campaign_id; with none, the query covers every campaign of the spaces you administer.","type":"string","format":"uuid"},"show_id":{"description":"Report on the ads played on this show, from list_shows: its space's campaigns, counting only impressions on the show.","type":"string","format":"uuid"},"campaign_id":{"description":"Report on this campaign, from list_campaigns.","type":"string","format":"uuid"},"metrics":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["impressions","listeners"],"description":"impressions: Ad impressions served by Podspace's ad server: one each time it served one of the campaign's creatives. Additive: sums across rows and buckets. listeners: Unique listeners (client keys) the ads reached, counted once within each row. Not additive: summing rows or buckets counts a person once per row or bucket; ask without the breakdown for a total."},"description":"What to count, a column each, in this order."},"dimensions":{"default":[],"description":"What to break the numbers down by, a column each, each followed by its name: campaign_name, flight_name, creative_name, show_title, episode_title. None: one row of totals. At most 2 together with granularity. Not campaign with flight or creative, flight with creative, or show with episode: the second belongs to the first, so filter on the first instead.","maxItems":2,"type":"array","items":{"type":"string","enum":["campaign","flight","creative","show","episode"],"description":"campaign: The campaign: its id, from list_campaigns, with a campaign_name column. flight: The flight: its id, from list_campaigns, with a flight_name column. creative: The creative (the ad played): its id, from list_campaigns, with a creative_name column. show: The show the ad played on: its id, with a show_title column. episode: The episode the ad played in: its id, with an episode_title column."}},"granularity":{"description":"Adds a time column: a row per day, Monday-start week, month or quarter (the window widens to whole ones), at most 92 buckets. Every bucket is listed, 0 where nothing was served; with dimensions, for each combination that has numbers in any bucket.","type":"string","enum":["day","week","month","quarter"]},"period":{"description":"A preset window; default last_30_days. Days are cut in meta.scope.time_zone: the ad network's time zone when the query covers one, else the space's, else UTC. last_week and last_month are the previous whole week (Monday to Sunday) and month; the others end today. Give either period, or from and to.","type":"string","enum":["last_7_days","last_28_days","last_30_days","last_90_days","this_week","last_week","this_month","last_month","year_to_date"]},"from":{"description":"First day of a custom window (YYYY-MM-DD), with to. For a whole flight, its start_date from list_campaigns.","type":"string","format":"date"},"to":{"description":"Last day of a custom window (YYYY-MM-DD, inclusive), at most 366 days from from. For a whole flight, its end_date from list_campaigns.","type":"string","format":"date"},"filters":{"default":[],"description":"Narrow the rows, one filter per dimension. They can only narrow what space_id, show_id or campaign_id covers.","maxItems":5,"type":"array","items":{"type":"object","properties":{"dimension":{"type":"string","enum":["campaign","flight","creative","show","episode"],"description":"What to filter on."},"values":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid"},"description":"Keep rows matching any of these ids (at most 50): campaign, flight and creative ids from list_campaigns, of the campaigns the query covers; show ids from list_shows; episode ids from list_episodes."}},"required":["dimension","values"],"additionalProperties":false,"description":"One filter; all filters apply together."}},"order_by":{"description":"Highest first by this metric, one of metrics. Without it, rows come in time, then dimension order.","type":"string","enum":["impressions","listeners"]},"limit":{"description":"Keep only the top rows by order_by (default: the first metric), 1-500: a top list of dimension values, or with granularity alone the top buckets. Not with granularity and a dimension together: for the series of the top values, rank them first without granularity, then ask for the series with a filter on them. Without limit, a query of more than 500 rows is result_too_large.","type":"integer","minimum":1,"maximum":500},"fresh":{"default":false,"description":"Skip the cache and read the numbers again; costs the full budget, as a query not cached does.","type":"boolean"}},"required":["metrics"],"additionalProperties":false},"AnalyticsQueryResult":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"time, a dimension (show_title and episode_title follow show and episode), or a metric."},"kind":{"type":"string","enum":["time","dimension","metric"],"description":"time: the bucket's first day (YYYY-MM-DD); dimension: an id or a name; metric: a count."}},"required":["name","kind"]},"description":"The columns of every row, in order."},"rows":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]}},"description":"One array per row, a value per column. listeners and spotify_listeners are not additive across rows."},"meta":{"type":"object","properties":{"scope":{"type":"object","properties":{"type":{"type":"string","enum":["show","space","episode"],"description":"What the query reported on."},"id":{"type":"string","format":"uuid","description":"Its id."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The show's, space's or episode's title."},"time_zone":{"type":"string","description":"The zone the window was cut in."}},"required":["type","id","title","time_zone"],"description":"What the numbers cover."},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"The window's first day."},"to":{"type":"string","format":"date","description":"The window's last day, inclusive."},"granularity":{"anyOf":[{"type":"string","enum":["day","week","month","quarter"]},{"type":"null"}],"description":"The time buckets; null without a time column."}},"required":["from","to","granularity"],"description":"The window, widened to whole buckets."},"partial":{"type":"boolean","description":"The window includes today, whose numbers are still coming in."},"generated_at":{"type":"string","format":"date-time","description":"When the numbers were read."},"cache":{"description":"hit: served from a cache of up to 5 minutes (an hour for windows that ended at least 3 days ago); see generated_at.","type":"string","enum":["hit","miss"]}},"required":["scope","period","partial","generated_at"],"description":"What the rows cover."}},"required":["columns","rows","meta"]},"CampaignAnalyticsQueryResult":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"time, a dimension (each followed by its name: campaign_name, flight_name, creative_name, show_title, episode_title), or a metric."},"kind":{"type":"string","enum":["time","dimension","metric"],"description":"time: the bucket's first day (YYYY-MM-DD); dimension: an id or a name; metric: a count."}},"required":["name","kind"]},"description":"The columns of every row, in order."},"rows":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]}},"description":"One array per row, a value per column. listeners is unique within a row only: never add it up across rows or buckets, ask without the breakdown for a total."},"meta":{"type":"object","properties":{"scope":{"type":"object","properties":{"type":{"type":"string","enum":["all","space","show","campaign"],"description":"What the query reported on."},"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Its id; null for all."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The space's or show's title or the campaign's name; All campaigns for all."},"time_zone":{"type":"string","description":"The zone the window was cut in."}},"required":["type","id","title","time_zone"],"description":"What the numbers cover."},"period":{"type":"object","properties":{"from":{"type":"string","format":"date","description":"The window's first day."},"to":{"type":"string","format":"date","description":"The window's last day, inclusive."},"granularity":{"anyOf":[{"type":"string","enum":["day","week","month","quarter"]},{"type":"null"}],"description":"The time buckets; null without a time column."}},"required":["from","to","granularity"],"description":"The window, widened to whole buckets."},"partial":{"type":"boolean","description":"The window includes today, whose numbers are still coming in."},"generated_at":{"type":"string","format":"date-time","description":"When the numbers were read."},"cache":{"description":"hit: served from a cache of up to 5 minutes (an hour for windows that ended at least 3 days ago); see generated_at.","type":"string","enum":["hit","miss"]}},"required":["scope","period","partial","generated_at"],"description":"What the rows cover."}},"required":["columns","rows","meta"]},"Space":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The space's id."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The space's name."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The space's URL slug."}},"required":["id","name","slug"]},"SpaceList":{"type":"object","properties":{"spaces":{"type":"array","items":{"$ref":"#/components/schemas/Space"},"description":"The spaces you can use, by name."},"next_cursor":{"type":"null","description":"Always null: every space comes in one page. Here so that paging can come later without breaking clients."}},"required":["spaces","next_cursor"]},"Upload":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The upload's id."},"show_id":{"type":"string","format":"uuid","description":"The show the file is for."},"kind":{"type":"string","enum":["audio","video","image"],"description":"What the file is."},"filename":{"type":"string","description":"The file's name, as given."},"size_bytes":{"type":"integer","description":"The file's size in bytes, as given."},"status":{"type":"string","enum":["pending","finished","used","expired"],"description":"pending: parts can be uploaded; finished: the file is complete and an episode can take it; used: an episode took it; expired: not finished or not used in time, start a new upload."},"expires_at":{"type":"string","format":"date-time","description":"Until when the parts can be uploaded and the upload finished (the part URLs stop working then); once finished, until when an episode can take it, 24 hours on."},"parts":{"type":"array","items":{"type":"object","properties":{"part_number":{"type":"integer","description":"The part's number, from 1."},"offset_bytes":{"type":"integer","description":"Where the part starts in the file, in bytes."},"size_bytes":{"type":"integer","description":"The part's size in bytes."},"uploaded":{"type":"boolean","description":"Whether storage holds the part, at this size."},"upload_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"PUT the part's bytes here, exactly size_bytes of them, with no extra headers: storage refuses another size. null once it is uploaded or the upload is no longer pending. Treat it as a secret until it expires."}},"required":["part_number","offset_bytes","size_bytes","uploaded","upload_url"]},"description":"The file cut into parts, in order: one for a small file, several for a large one."}},"required":["id","show_id","kind","filename","size_bytes","status","expires_at","parts"]},"ShowSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The show's id."},"title":{"type":"string","description":"The show's title."},"slug":{"type":"string","description":"The show's URL slug."},"author":{"type":"string","description":"The author named in the feed."},"feed_url":{"type":"string","format":"uri","description":"The show's RSS feed."},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The show's artwork; null if it has none, or while a new one is processed."},"space":{"description":"The space the show belongs to.","$ref":"#/components/schemas/Space"},"last_published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When its latest published episode came out."}},"required":["id","title","slug","author","feed_url","image_url","space","last_published_at"]},"Show":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The show's id."},"title":{"type":"string","description":"The show's title."},"slug":{"type":"string","description":"The show's URL slug."},"author":{"type":"string","description":"The author named in the feed."},"feed_url":{"type":"string","format":"uri","description":"The show's RSS feed."},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The show's artwork; null if it has none, or while a new one is processed."},"space":{"description":"The space the show belongs to.","$ref":"#/components/schemas/Space"},"last_published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When its latest published episode came out."},"description":{"type":"string","description":"The show's description, as in its feed."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The feed's language code, e.g. sv or en-us."},"show_type":{"anyOf":[{"type":"string","enum":["episodic","serial"]},{"type":"null"}],"description":"episodic (newest first) or serial (in order), as in the feed; null if unset."},"explicit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the feed is marked explicit."}},"required":["id","title","slug","author","feed_url","image_url","space","last_published_at","description","language","show_type","explicit"]},"ShowList":{"type":"object","properties":{"shows":{"type":"array","items":{"$ref":"#/components/schemas/ShowSummary"},"description":"A page of shows, by title."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor for the next page; null on the last page."}},"required":["shows","next_cursor"]},"EpisodeSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The episode's id."},"guid":{"type":"string","description":"The episode's guid, as in the feed; list_episodes finds an episode by it."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The episode's title."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The episode's URL slug."},"media_type":{"type":"string","enum":["audio","video"],"description":"video if the episode has a video file, else audio."},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The episode's own artwork; null if it has none, or while a new one is processed."},"status":{"type":"string","enum":["draft","scheduled","published"],"description":"draft: no publish time; scheduled: publishes in the future; published: out in the feed."},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When it was or will be published; null for drafts."},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The audio's length in seconds; null until processed."},"season_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The season number, if any."},"episode_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The episode number, if any."}},"required":["id","guid","title","slug","media_type","image_url","status","published_at","duration_seconds","season_number","episode_number"]},"AdMarker":{"type":"object","properties":{"type":{"type":"string","enum":["pre","mid","post"],"description":"pre: before the episode starts; mid: at a time in it; post: after it ends."},"offset_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"For mid: where the break is, in seconds from the start; null until processing has placed it. Always null for pre and post."}},"required":["type","offset_seconds"]},"Episode":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The episode's id."},"guid":{"type":"string","description":"The episode's guid, as in the feed; list_episodes finds an episode by it."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The episode's title."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The episode's URL slug."},"media_type":{"type":"string","enum":["audio","video"],"description":"video if the episode has a video file, else audio."},"image_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The episode's own artwork; null if it has none, or while a new one is processed."},"status":{"type":"string","enum":["draft","scheduled","published"],"description":"draft: no publish time; scheduled: publishes in the future; published: out in the feed."},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When it was or will be published; null for drafts."},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The audio's length in seconds; null until processed."},"season_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The season number, if any."},"episode_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The episode number, if any."},"show_id":{"type":"string","format":"uuid","description":"The show the episode belongs to."},"space_id":{"type":"string","format":"uuid","description":"The space of its show."},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The episode's subtitle."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The episode's show notes, as in the feed."},"episode_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"full, trailer or bonus."},"explicit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the episode is marked explicit."},"ad_markers":{"type":"array","items":{"$ref":"#/components/schemas/AdMarker"},"description":"Where ads may be inserted, in playing order."}},"required":["id","guid","title","slug","media_type","image_url","status","published_at","duration_seconds","season_number","episode_number","show_id","space_id","subtitle","description","episode_type","explicit","ad_markers"]},"EpisodeList":{"type":"object","properties":{"episodes":{"type":"array","items":{"$ref":"#/components/schemas/EpisodeSummary"},"description":"A page of the show's episodes in the status asked for."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor for the next page; null on the last page."}},"required":["episodes","next_cursor"]},"Creative":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The creative's id."},"name":{"type":"string","description":"The creative's name."},"placement":{"type":"string","enum":["pre","mid","post","dynamic","custom"],"description":"Where in the episode it plays. pre, mid or post: in that ad break; dynamic: the ad server picks; custom: an ad marker the space defined."}},"required":["id","name","placement"]},"Flight":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The flight's id."},"name":{"type":"string","description":"The flight's name."},"type":{"type":"string","enum":["sponsorship","ad","promotion"],"description":"sponsorship: a slot sold for a stretch of time; ad: sold by impressions; promotion: a legacy type no longer created."},"status":{"type":"string","enum":["live","upcoming","completed","paused","draft"],"description":"Where the flight stands today. live: ready and running today; upcoming: ready, starting later or missing a date; completed: ready, ended before today; paused or draft: as set, whatever the dates. Days are calendar days in the ad network's time zone, start and end included."},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day (YYYY-MM-DD) in the ad network's time zone; null if unset. Pass as from to query_campaign_analytics for the whole flight."},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day (YYYY-MM-DD, inclusive) in the ad network's time zone; null if unset. Pass as to to query_campaign_analytics for the whole flight."},"targeted_impressions":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The impression goal; null for sponsorships, which are sold by time, and when none is set."},"creatives":{"type":"array","items":{"$ref":"#/components/schemas/Creative"},"description":"The flight's creatives (the ads it plays), by placement."}},"required":["id","name","type","status","start_date","end_date","targeted_impressions","creatives"]},"AdNetwork":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ad network's id."},"name":{"type":"string","description":"The ad network's name."},"time_zone":{"type":"string","description":"Its time zone (IANA): its campaigns' flight dates and statuses are in it."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The currency its prices are in (ISO 4217, e.g. SEK); null if unset."}},"required":["id","name","time_zone","currency"]},"Campaign":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The campaign's id."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The campaign's name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The campaign's description, if any."},"ad_network":{"description":"The space's ad network the campaign is booked on.","$ref":"#/components/schemas/AdNetwork"},"advertiser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The advertiser's id."},"name":{"type":"string","description":"The advertiser's name."}},"required":["id","name"]},{"type":"null"}],"description":"Who the campaign is for; null if unset."},"flights":{"type":"array","items":{"$ref":"#/components/schemas/Flight"},"description":"The campaign's flights (its bookings, each with dates and creatives), by start date then name."}},"required":["id","name","description","ad_network","advertiser","flights"]},"CampaignList":{"type":"object","properties":{"campaigns":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"},"description":"A page of campaigns, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor for the next page; null on the last page."}},"required":["campaigns","next_cursor"]},"AdNetworkList":{"type":"object","properties":{"ad_networks":{"type":"array","items":{"$ref":"#/components/schemas/AdNetwork"},"description":"The ad networks, by name."},"next_cursor":{"type":"null","description":"Always null: every ad network comes in one page. Here so that paging can come later without breaking clients."}},"required":["ad_networks","next_cursor"]},"Advertiser":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The advertiser's id."},"name":{"type":"string","description":"The advertiser's name."},"ad_network_id":{"type":"string","format":"uuid","description":"The ad network it buys on, from list_ad_networks."}},"required":["id","name","ad_network_id"]},"AdvertiserList":{"type":"object","properties":{"advertisers":{"type":"array","items":{"$ref":"#/components/schemas/Advertiser"},"description":"A page of advertisers, by name."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as cursor for the next page; null on the last page."}},"required":["advertisers","next_cursor"]},"Problem":{"type":"object","description":"An RFC 9457 problem, the body of every error.","properties":{"type":{"type":"string","format":"uri","description":"The code's entry in the error reference, `https://api.podspace.com/docs/errors#<code>`."},"code":{"type":"string","description":"What went wrong, as one of the codes of the error reference, e.g. not_found. Stable: branch on it. New codes may be added."},"title":{"type":"string","description":"The code's title, the same for every problem with it."},"status":{"type":"integer","description":"The HTTP status code."},"detail":{"type":"string","description":"What went wrong with this request, for a person to read."},"request_id":{"type":"string","description":"The request id, to quote when contacting support."},"errors":{"type":"array","description":"For invalid_request and validation_failed: one entry per parameter to fix.","items":{"type":"object","properties":{"in":{"type":"string","enum":["path","query","body","header"],"description":"Where the parameter is; absent for 422 problems."},"path":{"type":"string","description":"The parameter, dotted for nested fields."},"message":{"type":"string","description":"What is wrong with it."}},"required":["path","message"]}}},"required":["type","code","title","status","detail","request_id"]}},"headers":{"RateLimit-Limit":{"description":"The limit that applies: the credential's requests a minute (writes have a lower one), or the units of the analytics budget when that is tighter.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"What is left of it in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window starts again.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"responses":{"invalid_request":{"description":"Invalid request. A path or query parameter is missing, unknown or of the wrong type, or the body is not a JSON object. `errors` lists each one with its location.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"invalid_request":{"value":{"type":"https://api.podspace.com/docs/errors#invalid_request","code":"invalid_request","title":"Invalid request","status":400,"detail":"A path or query parameter is missing, unknown or of the wrong type, or the body is not a JSON object.","request_id":"req-1","errors":[{"in":"query","path":"limit","message":"Too big."}]}}}}}},"unauthenticated":{"description":"Unauthenticated. The token is missing, malformed, unknown, expired or revoked.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"unauthenticated":{"value":{"type":"https://api.podspace.com/docs/errors#unauthenticated","code":"unauthenticated","title":"Unauthenticated","status":401,"detail":"The token is missing, malformed, unknown, expired or revoked.","request_id":"req-1"}}}}}},"insufficient_scope":{"description":"Insufficient scope. The token lacks the scope the operation needs.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}}}}}},"credential_restricted":{"description":"Credential restricted. You are a member of the space, but the token's grant does not include it.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"credential_restricted":{"value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}}}}}},"api_access_disabled":{"description":"API access disabled. API access is not enabled for the space.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"api_access_disabled":{"value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"insufficient_role":{"description":"Insufficient role. Your role in the space does not allow the operation.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_role":{"value":{"type":"https://api.podspace.com/docs/errors#insufficient_role","code":"insufficient_role","title":"Insufficient role","status":403,"detail":"Your role in the space does not allow the operation.","request_id":"req-1"}}}}}},"subscription_required":{"description":"Subscription required. The space's subscription does not include the feature.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"subscription_required":{"value":{"type":"https://api.podspace.com/docs/errors#subscription_required","code":"subscription_required","title":"Subscription required","status":403,"detail":"The space's subscription does not include the feature.","request_id":"req-1"}}}}}},"grant_not_allowed":{"description":"Grant not allowed. The credential cannot create or widen grants.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"grant_not_allowed":{"value":{"type":"https://api.podspace.com/docs/errors#grant_not_allowed","code":"grant_not_allowed","title":"Grant not allowed","status":403,"detail":"The credential cannot create or widen grants.","request_id":"req-1"}}}}}},"not_found":{"description":"Not found. The resource does not exist, or you have no role on its space. The two look the same on purpose.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"not_found":{"value":{"type":"https://api.podspace.com/docs/errors#not_found","code":"not_found","title":"Not found","status":404,"detail":"The resource does not exist, or you have no role on its space.","request_id":"req-1"}}}}}},"conflict":{"description":"Conflict. The request conflicts with the current state, for example a duplicate.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"conflict":{"value":{"type":"https://api.podspace.com/docs/errors#conflict","code":"conflict","title":"Conflict","status":409,"detail":"The request conflicts with the current state, for example a duplicate.","request_id":"req-1"}}}}}},"invalid_state":{"description":"Invalid state. The resource is not in a state the operation needs, for example an upload with a part missing, or a show whose import is still running.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"invalid_state":{"value":{"type":"https://api.podspace.com/docs/errors#invalid_state","code":"invalid_state","title":"Invalid state","status":409,"detail":"The resource is not in a state the operation needs, for example an upload with a part missing, or a show whose import is still running.","request_id":"req-1"}}}}}},"quota_exceeded":{"description":"Quota exceeded. You already hold as many of something as you may at once, for example open uploads.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"quota_exceeded":{"value":{"type":"https://api.podspace.com/docs/errors#quota_exceeded","code":"quota_exceeded","title":"Quota exceeded","status":409,"detail":"You already hold as many of something as you may at once, for example open uploads.","request_id":"req-1"}}}}}},"validation_failed":{"description":"Validation failed. The parameters parse but are not acceptable together, or a value such as a cursor is not valid here. `errors` lists each problem with its path.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"validation_failed":{"value":{"type":"https://api.podspace.com/docs/errors#validation_failed","code":"validation_failed","title":"Validation failed","status":422,"detail":"The parameters parse but are not acceptable together, or a value such as a cursor is not valid here.","request_id":"req-1","errors":[{"path":"cursor","message":"Pass the next_cursor unchanged."}]}}}}}},"result_too_large":{"description":"Result too large. The query returns more rows than an answer may carry, or hit a limit of the analytics backend (rows or query time); `detail` names it. A retry gives the same answer.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"result_too_large":{"value":{"type":"https://api.podspace.com/docs/errors#result_too_large","code":"result_too_large","title":"Result too large","status":422,"detail":"The query returns more rows than an answer may carry, or hit a limit of the analytics backend (rows or query time); `detail` names it.","request_id":"req-1"}}}}}},"rate_limited":{"description":"Rate limited. Too many requests with the credential in the current minute.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}}}}}},"analytics_budget_exceeded":{"description":"Analytics budget exceeded. The analytics queries of the person in the current minute, or of the space in the current hour, have used up their budget.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"analytics_budget_exceeded":{"value":{"type":"https://api.podspace.com/docs/errors#analytics_budget_exceeded","code":"analytics_budget_exceeded","title":"Analytics budget exceeded","status":429,"detail":"The analytics queries of the person in the current minute, or of the space in the current hour, have used up their budget.","request_id":"req-1"}}}}}},"too_many_auth_failures":{"description":"Too many authentication failures. Too many requests from your address failed authentication in the current minute.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"too_many_auth_failures":{"value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"internal_error":{"description":"Internal error. Something failed on our side.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"internal_error":{"value":{"type":"https://api.podspace.com/docs/errors#internal_error","code":"internal_error","title":"Internal error","status":500,"detail":"Something failed on our side.","request_id":"req-1"}}}}}},"upstream_unavailable":{"description":"Upstream unavailable. A service the operation depends on (the analytics backend, file storage) failed or could not be reached.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"upstream_unavailable":{"value":{"type":"https://api.podspace.com/docs/errors#upstream_unavailable","code":"upstream_unavailable","title":"Upstream unavailable","status":502,"detail":"A service the operation depends on (the analytics backend, file storage) failed or could not be reached.","request_id":"req-1"}}}}}},"upstream_timeout":{"description":"Upstream timeout. The analytics backend did not answer within 35 seconds.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"upstream_timeout":{"value":{"type":"https://api.podspace.com/docs/errors#upstream_timeout","code":"upstream_timeout","title":"Upstream timeout","status":504,"detail":"The analytics backend did not answer within 35 seconds.","request_id":"req-1"}}}}}}}},"paths":{"/v1/spaces":{"get":{"operationId":"list_spaces","summary":"List spaces","tags":["Spaces"],"description":"Returns the spaces you can use, by name: call it first, to check a credential and to find the space ids the other operations take. Not paginated: next_cursor is always null. Pass a space id to list_shows to see its shows.","security":[{"bearerAuth":["shows:read"]},{"oauth2":["shows:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceList"},"examples":{"one-space":{"summary":"One space","value":{"spaces":[{"id":"00000000-0000-4000-8000-000000000003","name":"Example Media","slug":"example-media"}],"next_cursor":null}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"$ref":"#/components/responses/insufficient_scope"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"}},"/v1/shows":{"get":{"operationId":"list_shows","summary":"List shows","tags":["Shows"],"description":"Returns the shows you can see, by title, a page at a time, each with its space, feed and artwork: every show of every space, or of one space with space_id. Hidden shows are left out. Use a show id with get_show, list_episodes and query_analytics.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"space_id","required":false,"description":"Only this space's shows, from list_spaces; omit for every show you can see."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false,"description":"Case-insensitive title search."},{"schema":{"default":50,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Shows per page, 1-50 (default 50)."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The next_cursor of the previous page; omit for the first page."}],"security":[{"bearerAuth":["shows:read"]},{"oauth2":["shows:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShowList"},"examples":{"one-spaces-shows":{"summary":"One space's shows","value":{"shows":[{"id":"00000000-0000-4000-8000-000000000010","title":"The Example Show","slug":"the-example-show","author":"Example Media","feed_url":"https://feed.pod.space/the-example-show","image_url":"https://assets.pod.space/system/shows/images/000/000/00-/max/cover.jpg","space":{"id":"00000000-0000-4000-8000-000000000003","name":"Example Media","slug":"example-media"},"last_published_at":"2026-10-12T05:00:00.000Z"}],"next_cursor":null}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"}},"/v1/shows/{show_id}":{"get":{"operationId":"get_show","summary":"Get a show","tags":["Shows"],"description":"Returns one show with its space, feed and artwork, and its feed details (description, language, type). Hidden shows are reachable by id. A show you have no access to is not found.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"show_id","required":true,"description":"The show's id, from list_shows."}],"security":[{"bearerAuth":["shows:read"]},{"oauth2":["shows:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Show"},"examples":{"a-show":{"summary":"A show","value":{"id":"00000000-0000-4000-8000-000000000010","title":"The Example Show","slug":"the-example-show","author":"Example Media","feed_url":"https://feed.pod.space/the-example-show","image_url":"https://assets.pod.space/system/shows/images/000/000/00-/max/cover.jpg","space":{"id":"00000000-0000-4000-8000-000000000003","name":"Example Media","slug":"example-media"},"last_published_at":"2026-10-12T05:00:00.000Z","description":"Weekly conversations about examples.","language":"en","show_type":"episodic","explicit":false}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"}},"/v1/episodes":{"get":{"operationId":"list_episodes","summary":"List a show's episodes","tags":["Episodes"],"description":"Returns a show's episodes in one status (published by default), a page at a time: published and scheduled newest publish time first, drafts newest created first. Pass guid to find the episode a feed item is. Use an episode id with get_episode for its show notes, or with query_analytics (episode_id, or an episode filter) for its numbers.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"show_id","required":true,"description":"The show's id, from list_shows."},{"schema":{"default":"published","type":"string","enum":["draft","scheduled","published"]},"in":"query","name":"status","required":false,"description":"Which episodes to list (default published). Published and scheduled are newest publish time first, drafts newest created first."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false,"description":"Case-insensitive title search."},{"schema":{"type":"string","minLength":1,"maxLength":2000},"in":"query","name":"guid","required":false,"description":"Only the episode with this guid, as in the show's feed, among those in the status asked for."},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Episodes per page, 1-50 (default 20)."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The next_cursor of the previous page; omit for the first page."}],"security":[{"bearerAuth":["shows:read"]},{"oauth2":["shows:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeList"},"examples":{"the-latest-published-episode":{"summary":"The latest published episode","value":{"episodes":[{"id":"00000000-0000-4000-8000-000000000020","guid":"https://example.podspace.test/episodes/42","title":"Episode 42: Examples","slug":"episode-42-examples","media_type":"audio","image_url":null,"status":"published","published_at":"2026-10-12T05:00:00.000Z","duration_seconds":2712,"season_number":3,"episode_number":42}],"next_cursor":"eyJzaG93SWQiOiIuLi4ifQ"}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"},"post":{"operationId":"create_episode","summary":"Create an episode","tags":["Episodes"],"description":"Creates an episode of a show from a file already uploaded, and returns it (a tool result leaves out the show notes: get_episode has them). First upload the audio or the video with start_upload and finish_upload (and a cover image the same way, if it has its own), then pass the upload ids here: exactly one of audio_upload_id and video_upload_id, and an upload is used once. published_at decides what it is: null (the default) a draft, a time to come scheduled, now or earlier published as soon as its media is processed; anything but a draft needs the episodes:publish scope too. Processing starts at once and takes minutes: duration_seconds is null and mid-roll offsets may be null until it is done, so read it again with get_episode. ad_markers say where ads may go; leave them out for the show's usual breaks. The media upload makes a create safe to repeat: the same upload and title again answers the episode it made. Check with the person before publishing anything: a published episode goes out in the feed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeCreateInput"},"examples":{"an-audio-episode-scheduled-with-a-mid-roll-at-1234":{"summary":"An audio episode, scheduled, with a mid-roll at 12:34","value":{"show_id":"00000000-0000-4000-8000-000000000010","title":"Episode 42: Examples","description":"We look at examples.","published_at":"2026-11-20T05:00:00Z","season_number":3,"episode_number":42,"audio_upload_id":"00000000-0000-4000-8000-000000000050","ad_markers":[{"type":"pre"},{"type":"mid","offset_seconds":754.25},{"type":"post"}]}}}}}},"security":[{"bearerAuth":["episodes:write"]},{"oauth2":["episodes:write"]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Episode"},"examples":{"an-audio-episode-scheduled-with-a-mid-roll-at-1234":{"summary":"An audio episode, scheduled, with a mid-roll at 12:34","value":{"id":"00000000-0000-4000-8000-000000000020","guid":"00000000-0000-4000-8000-000000000021","title":"Episode 42: Examples","slug":"episode-42-examples","media_type":"audio","image_url":null,"status":"scheduled","published_at":"2026-11-20T05:00:00.000Z","duration_seconds":null,"season_number":3,"episode_number":42,"show_id":"00000000-0000-4000-8000-000000000010","space_id":"00000000-0000-4000-8000-000000000003","subtitle":null,"description":"We look at examples.","episode_type":"full","explicit":null,"ad_markers":[{"type":"pre","offset_seconds":null},{"type":"mid","offset_seconds":754.25},{"type":"post","offset_seconds":null}]}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"409":{"description":"Invalid state, Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"invalid_state":{"summary":"Invalid state","value":{"type":"https://api.podspace.com/docs/errors#invalid_state","code":"invalid_state","title":"Invalid state","status":409,"detail":"The resource is not in a state the operation needs, for example an upload with a part missing, or a show whose import is still running.","request_id":"req-1"}},"conflict":{"summary":"Conflict","value":{"type":"https://api.podspace.com/docs/errors#conflict","code":"conflict","title":"Conflict","status":409,"detail":"The request conflicts with the current state, for example a duplicate.","request_id":"req-1"}}}}}},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"}},"x-stability-level":"beta"}},"/v1/episodes/{episode_id}":{"get":{"operationId":"get_episode","summary":"Get an episode","tags":["Episodes"],"description":"Returns one episode in any status, with its show, space, show notes and ad markers. An episode of a show you have no access to is not found. To find an episode by its guid in the feed, call list_episodes with guid.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"episode_id","required":true,"description":"The episode's id, from list_episodes."}],"security":[{"bearerAuth":["shows:read"]},{"oauth2":["shows:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Episode"},"examples":{"a-published-episode":{"summary":"A published episode","value":{"id":"00000000-0000-4000-8000-000000000020","guid":"https://example.podspace.test/episodes/42","title":"Episode 42: Examples","slug":"episode-42-examples","media_type":"audio","image_url":null,"status":"published","published_at":"2026-10-12T05:00:00.000Z","duration_seconds":2712,"season_number":3,"episode_number":42,"show_id":"00000000-0000-4000-8000-000000000010","space_id":"00000000-0000-4000-8000-000000000003","subtitle":null,"description":"We look at examples.","episode_type":"full","explicit":false,"ad_markers":[{"type":"pre","offset_seconds":null},{"type":"mid","offset_seconds":754.25},{"type":"post","offset_seconds":null}]}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"},"patch":{"operationId":"update_episode","summary":"Update an episode","tags":["Episodes"],"description":"Changes an episode and returns it (a tool result leaves out the show notes): pass only what should change, the rest stays. published_at moves, schedules or publishes it, and null takes a published or scheduled episode back to a draft, out of the feed (an audio episode already sent to Spotify through its distribution API stays there: take it down in Podspace); passing published_at at all needs the episodes:publish scope too. ad_markers are the whole set: a slot left out is switched off. image_upload_id sets a new cover from a finished upload, or removes the episode's own with null. The audio or video itself cannot be replaced here yet: do that in Podspace. Check with the person before publishing an episode or taking one back.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EpisodeUpdateInput"},"examples":{"schedule-a-draft":{"summary":"Schedule a draft","value":{"published_at":"2026-11-20T05:00:00Z"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"episode_id","required":true,"description":"The episode's id, from list_episodes."}],"security":[{"bearerAuth":["episodes:write"]},{"oauth2":["episodes:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Episode"},"examples":{"schedule-a-draft":{"summary":"Schedule a draft","value":{"id":"00000000-0000-4000-8000-000000000020","guid":"00000000-0000-4000-8000-000000000021","title":"Episode 42: Examples","slug":"episode-42-examples","media_type":"audio","image_url":null,"status":"scheduled","published_at":"2026-11-20T05:00:00.000Z","duration_seconds":null,"season_number":3,"episode_number":42,"show_id":"00000000-0000-4000-8000-000000000010","space_id":"00000000-0000-4000-8000-000000000003","subtitle":null,"description":"We look at examples.","episode_type":"full","explicit":null,"ad_markers":[{"type":"pre","offset_seconds":null},{"type":"mid","offset_seconds":754.25},{"type":"post","offset_seconds":null}]}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"409":{"description":"Invalid state, Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"invalid_state":{"summary":"Invalid state","value":{"type":"https://api.podspace.com/docs/errors#invalid_state","code":"invalid_state","title":"Invalid state","status":409,"detail":"The resource is not in a state the operation needs, for example an upload with a part missing, or a show whose import is still running.","request_id":"req-1"}},"conflict":{"summary":"Conflict","value":{"type":"https://api.podspace.com/docs/errors#conflict","code":"conflict","title":"Conflict","status":409,"detail":"The request conflicts with the current state, for example a duplicate.","request_id":"req-1"}}}}}},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"}},"x-stability-level":"beta"},"delete":{"operationId":"delete_episode","summary":"Delete an episode","tags":["Episodes"],"description":"Deletes an episode for good, with its files, and removes it from the feed and from the platforms it was sent to. It cannot be undone, and its numbers go with it: to take an episode out of the feed and keep it, call update_episode with published_at null instead. Deleting a scheduled or published episode needs the episodes:publish scope too. Only when the person asked for this episode to be deleted.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"episode_id","required":true,"description":"The episode's id, from list_episodes."}],"security":[{"bearerAuth":["episodes:write"]},{"oauth2":["episodes:write"]}],"responses":{"204":{"description":"No Content","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"}},"x-stability-level":"beta"}},"/v1/uploads":{"post":{"operationId":"start_upload","summary":"Start an upload","tags":["Uploads"],"description":"Starts the upload of one file for an episode (its audio, its video or its cover image) and returns where to send it. The file never passes through the API or through you: it goes straight to storage in parts, one for a file of up to 512 MB and at most 16 for a larger one. PUT each part's bytes (offset_bytes, size_bytes) to its upload_url with no extra headers (storage refuses any other size), then call finish_upload and pass the upload's id to create_episode (or update_episode, for a cover). With a shell, one part is `curl -sS --fail -T <file> '<upload_url>'`; for several, cut each one out first with `dd if=<file> of=part.tmp bs=1048576 skip=<offset_bytes / 1048576> count=<size_bytes / 1048576, rounded up>` and send part.tmp the same way. Parts can go in any order and be sent again; get_upload says which arrived and gives fresh URLs. The upload expires after 24 hours. You can hold at most 10 uploads that no episode has used yet and that have not expired; past that the answer is quota_exceeded. At most 50 GB (20 MB for an image). If you cannot read the file or run commands, say so and ask the person to add the file in Podspace instead: never send file contents in a tool call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStartInput"},"examples":{"a-video-of-256-mb-in-one-part":{"summary":"A video of 256 MB, in one part","value":{"show_id":"00000000-0000-4000-8000-000000000010","kind":"video","filename":"episode-42.mp4","size_bytes":268435456}}}}}},"security":[{"bearerAuth":["episodes:write"]},{"oauth2":["episodes:write"]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"},"examples":{"a-video-of-256-mb-in-one-part":{"summary":"A video of 256 MB, in one part","value":{"id":"00000000-0000-4000-8000-000000000050","show_id":"00000000-0000-4000-8000-000000000010","kind":"video","filename":"episode-42.mp4","size_bytes":268435456,"expires_at":"2026-10-22T08:00:00.000Z","status":"pending","parts":[{"part_number":1,"offset_bytes":0,"size_bytes":268435456,"uploaded":false,"upload_url":"https://uploads.example.test/inbox/00000000-0000-4000-8000-000000000050/episode-42.mp4?partNumber=1&uploadId=example&X-Amz-Expires=86400&X-Amz-Signature=example"}]}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/quota_exceeded"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"}},"x-stability-level":"beta"}},"/v1/uploads/{upload_id}":{"get":{"operationId":"get_upload","summary":"Get an upload","tags":["Uploads"],"description":"Returns an upload with the parts storage holds so far and fresh URLs for the rest: call it to resume an interrupted upload, or to check that everything arrived before finish_upload. An upload of a show you have no access to is not found.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"upload_id","required":true,"description":"The id of an upload you started, from start_upload; another person's is not found."}],"security":[{"bearerAuth":["episodes:write"]},{"oauth2":["episodes:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"},"examples":{"an-upload-still-waiting-for-its-part":{"summary":"An upload still waiting for its part","value":{"id":"00000000-0000-4000-8000-000000000050","show_id":"00000000-0000-4000-8000-000000000010","kind":"video","filename":"episode-42.mp4","size_bytes":268435456,"expires_at":"2026-10-22T08:00:00.000Z","status":"pending","parts":[{"part_number":1,"offset_bytes":0,"size_bytes":268435456,"uploaded":false,"upload_url":"https://uploads.example.test/inbox/00000000-0000-4000-8000-000000000050/episode-42.mp4?partNumber=1&uploadId=example&X-Amz-Expires=86400&X-Amz-Signature=example"}]}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/invalid_state"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"}},"x-stability-level":"beta"}},"/v1/uploads/{upload_id}/finish":{"post":{"operationId":"finish_upload","summary":"Finish an upload","tags":["Uploads"],"description":"Completes an upload once every part is in storage: checks that the parts add up to the size given at the start and assembles the file. Call it after the last PUT. If a part is missing or has the wrong size the answer is invalid_state and names it: send that part again (get_upload has its URL), then finish again. Finishing a finished upload returns it again.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"upload_id","required":true,"description":"The id of an upload you started, from start_upload; another person's is not found."}],"security":[{"bearerAuth":["episodes:write"]},{"oauth2":["episodes:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"},"examples":{"a-finished-upload":{"summary":"A finished upload","value":{"id":"00000000-0000-4000-8000-000000000050","show_id":"00000000-0000-4000-8000-000000000010","kind":"video","filename":"episode-42.mp4","size_bytes":268435456,"expires_at":"2026-10-22T08:00:00.000Z","status":"finished","parts":[{"part_number":1,"offset_bytes":0,"size_bytes":268435456,"uploaded":true,"upload_url":null}]}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/invalid_state"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"}},"x-stability-level":"beta"}},"/v1/ad-networks":{"get":{"operationId":"list_ad_networks","summary":"List ad networks","tags":["Campaigns"],"description":"Returns the ad networks of the spaces you administer, by name: an ad network is a space's own ad inventory, which the space sells itself, and every campaign is booked on one. Call it for the ids list_campaigns (ad_network_id) and list_advertisers take, or for an ad network's time zone and currency. Campaigns are for space admins: with space_id you need the admin role in that space, without it you get the ad networks of every space where you have it. Not paginated: next_cursor is always null.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"space_id","required":false,"description":"Only this space's ad networks, from list_spaces; omit for those of every space you administer."}],"security":[{"bearerAuth":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdNetworkList"},"examples":{"a-spaces-ad-networks":{"summary":"A space's ad networks","value":{"ad_networks":[{"id":"00000000-0000-4000-8000-000000000040","name":"Example Radio Ads","time_zone":"Europe/Stockholm","currency":"SEK"}],"next_cursor":null}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled, Insufficient role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}},"insufficient_role":{"summary":"Insufficient role","value":{"type":"https://api.podspace.com/docs/errors#insufficient_role","code":"insufficient_role","title":"Insufficient role","status":403,"detail":"Your role in the space does not allow the operation.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"}},"/v1/advertisers":{"get":{"operationId":"list_advertisers","summary":"List advertisers","tags":["Campaigns"],"description":"Returns the advertisers on the ad networks of the spaces you administer, by name, a page at a time: an advertiser is the brand or company a campaign is for. Call it for the ids list_campaigns takes as advertiser_id. Campaigns are for space admins: with space_id you need the admin role in that space, without it you get the advertisers of every space where you have it; ad_network_id (from list_ad_networks) narrows to one ad network, and q searches names. At most 50 a page (default 25).","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"space_id","required":false,"description":"Only the advertisers of this space's ad networks, from list_spaces; omit for those of every space you administer."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"ad_network_id","required":false,"description":"Only this ad network's advertisers, from list_ad_networks."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false,"description":"Case-insensitive search in the advertiser's name."},{"schema":{"default":25,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Advertisers per page, 1-50 (default 25)."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The next_cursor of the previous page; omit for the first page."}],"security":[{"bearerAuth":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvertiserList"},"examples":{"an-ad-networks-advertisers":{"summary":"An ad network's advertisers","value":{"advertisers":[{"id":"00000000-0000-4000-8000-000000000041","name":"Example Bakery","ad_network_id":"00000000-0000-4000-8000-000000000040"},{"id":"00000000-0000-4000-8000-000000000042","name":"Example Shoes","ad_network_id":"00000000-0000-4000-8000-000000000040"}],"next_cursor":null}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled, Insufficient role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}},"insufficient_role":{"summary":"Insufficient role","value":{"type":"https://api.podspace.com/docs/errors#insufficient_role","code":"insufficient_role","title":"Insufficient role","status":403,"detail":"Your role in the space does not allow the operation.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"}},"/v1/campaigns":{"get":{"operationId":"list_campaigns","summary":"List campaigns","tags":["Campaigns"],"description":"Returns the ad campaigns of the spaces you administer, newest first, a page at a time, each with its flights (bookings with dates, goals and status) and their creatives: call it to see what is booked and for the campaign, flight and creative ids query_campaign_analytics takes. Campaigns are for space admins: with space_id you need the admin role in that space, without it you get the campaigns of every space where you have it. Narrow with ad_network_id (from list_ad_networks), advertiser_id (from list_advertisers), status (a flight's) and q; at most 50 a page (default 25). Flights' start_date and end_date are days in the ad network's time zone: pass them as from and to to query_campaign_analytics for a whole flight's numbers. get_campaign returns one campaign by id.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"space_id","required":false,"description":"Only this space's campaigns, from list_spaces; omit for the campaigns of every space you administer."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"ad_network_id","required":false,"description":"Only the campaigns booked on this ad network, from list_ad_networks."},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"advertiser_id","required":false,"description":"Only this advertiser's campaigns, from list_advertisers."},{"schema":{"type":"string","enum":["live","upcoming","completed","paused","draft"]},"in":"query","name":"status","required":false,"description":"Only campaigns with a flight in this status; draft also lists campaigns without flights. Omit for all. live: ready and running today; upcoming: ready, starting later or missing a date; completed: ready, ended before today; paused or draft: as set, whatever the dates. Days are calendar days in the ad network's time zone, start and end included."},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false,"description":"Case-insensitive search in the campaign's, its flights' and its advertiser's names."},{"schema":{"default":25,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Campaigns per page, 1-50 (default 25)."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The next_cursor of the previous page; omit for the first page."}],"security":[{"bearerAuth":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignList"},"examples":{"a-spaces-live-campaigns":{"summary":"A space's live campaigns","value":{"campaigns":[{"id":"00000000-0000-4000-8000-000000000030","name":"Autumn launch","description":null,"ad_network":{"id":"00000000-0000-4000-8000-000000000031","name":"Example Media Ads","time_zone":"Europe/Stockholm","currency":"SEK"},"advertiser":{"id":"00000000-0000-4000-8000-000000000032","name":"Example Coffee"},"flights":[{"id":"00000000-0000-4000-8000-000000000033","name":"October pre-rolls","type":"ad","status":"live","start_date":"2026-10-01","end_date":"2026-10-31","targeted_impressions":50000,"creatives":[{"id":"00000000-0000-4000-8000-000000000034","name":"Morning brew 30s","placement":"pre"}]}]}],"next_cursor":null}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled, Insufficient role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}},"insufficient_role":{"summary":"Insufficient role","value":{"type":"https://api.podspace.com/docs/errors#insufficient_role","code":"insufficient_role","title":"Insufficient role","status":403,"detail":"Your role in the space does not allow the operation.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"}},"/v1/campaigns/{campaign_id}":{"get":{"operationId":"get_campaign","summary":"Get a campaign","tags":["Campaigns"],"description":"Returns one ad campaign with its advertiser, its flights (dates, goals and status) and their creatives: call it for a campaign id from list_campaigns or from a query_campaign_analytics row. Campaigns are for space admins. A deleted campaign, or one of a space you do not administer, is not found. Flights' start_date and end_date are days in the ad network's time zone: pass them as from and to to query_campaign_analytics for a whole flight's numbers.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"campaign_id","required":true,"description":"The campaign's id, from list_campaigns."}],"security":[{"bearerAuth":["campaigns:read"]},{"oauth2":["campaigns:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"},"examples":{"a-campaign":{"summary":"A campaign","value":{"id":"00000000-0000-4000-8000-000000000030","name":"Autumn launch","description":null,"ad_network":{"id":"00000000-0000-4000-8000-000000000031","name":"Example Media Ads","time_zone":"Europe/Stockholm","currency":"SEK"},"advertiser":{"id":"00000000-0000-4000-8000-000000000032","name":"Example Coffee"},"flights":[{"id":"00000000-0000-4000-8000-000000000033","name":"October pre-rolls","type":"ad","status":"live","start_date":"2026-10-01","end_date":"2026-10-31","targeted_impressions":50000,"creatives":[{"id":"00000000-0000-4000-8000-000000000034","name":"Morning brew 30s","placement":"pre"}]}]}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled, Insufficient role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}},"insufficient_role":{"summary":"Insufficient role","value":{"type":"https://api.podspace.com/docs/errors#insufficient_role","code":"insufficient_role","title":"Insufficient role","status":403,"detail":"Your role in the space does not allow the operation.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"429":{"description":"Rate limited, Too many authentication failures","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"}},"x-stability-level":"beta"}},"/v1/analytics/query":{"post":{"operationId":"query_analytics","summary":"Query listening analytics","tags":["Analytics"],"description":"Returns listening numbers of a show, a space or a published episode as a table: call it for any question about listens, listeners, video views or Spotify, from \"how is this show doing\" to \"top episodes this month\". Pass one of show_id, space_id (space admins only) or episode_id; metrics (one column each); optionally up to two breakdowns among dimensions and granularity (a time column); filters to narrow; order_by and limit for a top list (not with granularity and a dimension together: rank without granularity first, then ask for the series filtered to the top values). With no breakdown the result is one row of totals. The window is a period preset (default last_30_days, ending today in the show's or space's time zone, today still partial) or from/to of at most 366 days. listeners and spotify_listeners are unique within a row only: never add them up across rows or buckets, ask for the total instead. At most 500 rows, and 100 as a tool result; a bigger result is result_too_large, so pass limit or a coarser granularity. Get ids from list_shows, list_spaces and list_episodes; get_episode details an episode a row names.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsQueryInput"},"examples":{"a-shows-top-episodes-in-the-last-30-days":{"summary":"A show's top episodes in the last 30 days","value":{"show_id":"00000000-0000-4000-8000-000000000010","metrics":["listens","listeners"],"dimensions":["episode"],"order_by":"listens","limit":2}},"a-shows-weekly-listeners":{"summary":"A show's weekly listeners","value":{"show_id":"00000000-0000-4000-8000-000000000010","metrics":["listeners"],"granularity":"week","from":"2026-09-28","to":"2026-10-11"}},"a-shows-listeners-by-country":{"summary":"A show's listeners by country","value":{"show_id":"00000000-0000-4000-8000-000000000010","metrics":["listeners"],"dimensions":["country"],"period":"last_month","order_by":"listeners","limit":3}},"a-spaces-listeners-by-app":{"summary":"A space's listeners by app","value":{"space_id":"00000000-0000-4000-8000-000000000003","metrics":["listeners","spotify_streams"],"dimensions":["app"],"order_by":"listeners","limit":3}}}}}},"security":[{"bearerAuth":["analytics:read"]},{"oauth2":["analytics:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsQueryResult"},"examples":{"a-shows-top-episodes-in-the-last-30-days":{"summary":"A show's top episodes in the last 30 days","value":{"columns":[{"name":"episode","kind":"dimension"},{"name":"episode_title","kind":"dimension"},{"name":"listens","kind":"metric"},{"name":"listeners","kind":"metric"}],"rows":[["00000000-0000-4000-8000-000000000020","Episode 42: Examples",1840,1210],["00000000-0000-4000-8000-000000000021","Episode 41: More examples",960,700]],"meta":{"scope":{"type":"show","id":"00000000-0000-4000-8000-000000000010","title":"The Example Show","time_zone":"Europe/Stockholm"},"period":{"from":"2026-09-22","to":"2026-10-21","granularity":null},"partial":true,"generated_at":"2026-10-21T08:00:00.000Z"}}},"a-shows-weekly-listeners":{"summary":"A show's weekly listeners","value":{"columns":[{"name":"time","kind":"time"},{"name":"listeners","kind":"metric"}],"rows":[["2026-09-28",610],["2026-10-05",655]],"meta":{"scope":{"type":"show","id":"00000000-0000-4000-8000-000000000010","title":"The Example Show","time_zone":"Europe/Stockholm"},"period":{"from":"2026-09-28","to":"2026-10-11","granularity":"week"},"partial":false,"generated_at":"2026-10-21T08:00:00.000Z"}}},"a-shows-listeners-by-country":{"summary":"A show's listeners by country","value":{"columns":[{"name":"country","kind":"dimension"},{"name":"listeners","kind":"metric"}],"rows":[["Sweden",2300],["Norway",380],["Finland",150]],"meta":{"scope":{"type":"show","id":"00000000-0000-4000-8000-000000000010","title":"The Example Show","time_zone":"Europe/Stockholm"},"period":{"from":"2026-09-01","to":"2026-09-30","granularity":null},"partial":false,"generated_at":"2026-10-21T08:00:00.000Z"}}},"a-spaces-listeners-by-app":{"summary":"A space's listeners by app","value":{"columns":[{"name":"app","kind":"dimension"},{"name":"listeners","kind":"metric"},{"name":"spotify_streams","kind":"metric"}],"rows":[["Apple Podcasts",5200,0],["Spotify",1900,5400],["Overcast",450,0]],"meta":{"scope":{"type":"space","id":"00000000-0000-4000-8000-000000000003","title":"Example Media","time_zone":"Europe/Stockholm"},"period":{"from":"2026-09-22","to":"2026-10-21","granularity":null},"partial":true,"generated_at":"2026-10-21T08:00:00.000Z"}}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled, Insufficient role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}},"insufficient_role":{"summary":"Insufficient role","value":{"type":"https://api.podspace.com/docs/errors#insufficient_role","code":"insufficient_role","title":"Insufficient role","status":403,"detail":"Your role in the space does not allow the operation.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Validation failed, Result too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"validation_failed":{"summary":"Validation failed","value":{"type":"https://api.podspace.com/docs/errors#validation_failed","code":"validation_failed","title":"Validation failed","status":422,"detail":"The parameters parse but are not acceptable together, or a value such as a cursor is not valid here.","request_id":"req-1","errors":[{"path":"cursor","message":"Pass the next_cursor unchanged."}]}},"result_too_large":{"summary":"Result too large","value":{"type":"https://api.podspace.com/docs/errors#result_too_large","code":"result_too_large","title":"Result too large","status":422,"detail":"The query returns more rows than an answer may carry, or hit a limit of the analytics backend (rows or query time); `detail` names it.","request_id":"req-1"}}}}}},"429":{"description":"Rate limited, Too many authentication failures, Analytics budget exceeded","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}},"analytics_budget_exceeded":{"summary":"Analytics budget exceeded","value":{"type":"https://api.podspace.com/docs/errors#analytics_budget_exceeded","code":"analytics_budget_exceeded","title":"Analytics budget exceeded","status":429,"detail":"The analytics queries of the person in the current minute, or of the space in the current hour, have used up their budget.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"},"504":{"$ref":"#/components/responses/upstream_timeout"}},"x-stability-level":"beta"}},"/v1/analytics/campaigns/query":{"post":{"operationId":"query_campaign_analytics","summary":"Query campaign delivery","tags":["Analytics"],"description":"Returns the ad delivery of the campaigns you administer as a table: impressions (ads served) and listeners (unique listeners the ads reached), by campaign, flight, creative, show or episode, over time or in total. Call it for any question about how a campaign, flight or creative is delivering. Pass at most one of campaign_id, space_id or show_id (only the ads played on that show); with none it covers every campaign the credential reaches, in the spaces you administer. Pass metrics (one column each); optionally up to two breakdowns among dimensions and granularity (a time column); filters by id to narrow; order_by and limit for a top list (not with granularity and a dimension together). With no breakdown the result is one row of totals. The window is a period preset (default last_30_days, ending today in the ad network's time zone, today still partial) or from/to of at most 366 days; for a whole flight, pass its start_date and end_date from list_campaigns as from and to. listeners are unique within a row only and never add up: a listener reached by two flights counts in both, so ask without the breakdown for a total. At most 500 rows, and 100 as a tool result; a bigger result is result_too_large, so pass limit or a coarser granularity. Get campaign, flight and creative ids from list_campaigns, show ids from list_shows and episode ids from list_episodes. Campaigns are for space admins.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAnalyticsQueryInput"},"examples":{"a-campaigns-impressions-and-listeners-by-flight":{"summary":"A campaign's impressions and listeners by flight","value":{"campaign_id":"00000000-0000-4000-8000-000000000030","metrics":["impressions","listeners"],"dimensions":["flight"]}},"a-spaces-daily-impressions":{"summary":"A space's daily impressions","value":{"space_id":"00000000-0000-4000-8000-000000000003","metrics":["impressions"],"granularity":"day","from":"2026-10-19","to":"2026-10-21"}},"all-campaigns-totals":{"summary":"All campaigns' totals","value":{"metrics":["impressions","listeners"]}}}}}},"security":[{"bearerAuth":["analytics:read"]},{"oauth2":["analytics:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignAnalyticsQueryResult"},"examples":{"a-campaigns-impressions-and-listeners-by-flight":{"summary":"A campaign's impressions and listeners by flight","value":{"columns":[{"name":"flight","kind":"dimension"},{"name":"flight_name","kind":"dimension"},{"name":"impressions","kind":"metric"},{"name":"listeners","kind":"metric"}],"rows":[["00000000-0000-4000-8000-000000000033","October pre-rolls",31240,18200],["00000000-0000-4000-8000-000000000035","October mid-rolls",12400,9100]],"meta":{"scope":{"type":"campaign","id":"00000000-0000-4000-8000-000000000030","title":"Autumn launch","time_zone":"Europe/Stockholm"},"period":{"from":"2026-09-22","to":"2026-10-21","granularity":null},"partial":true,"generated_at":"2026-10-21T08:00:00.000Z"}}},"a-spaces-daily-impressions":{"summary":"A space's daily impressions","value":{"columns":[{"name":"time","kind":"time"},{"name":"impressions","kind":"metric"}],"rows":[["2026-10-19",4210],["2026-10-20",3980],["2026-10-21",1520]],"meta":{"scope":{"type":"space","id":"00000000-0000-4000-8000-000000000003","title":"Example Media","time_zone":"Europe/Stockholm"},"period":{"from":"2026-10-19","to":"2026-10-21","granularity":"day"},"partial":true,"generated_at":"2026-10-21T08:00:00.000Z"}}},"all-campaigns-totals":{"summary":"All campaigns' totals","value":{"columns":[{"name":"impressions","kind":"metric"},{"name":"listeners","kind":"metric"}],"rows":[[48210,26150]],"meta":{"scope":{"type":"all","id":null,"title":"All campaigns","time_zone":"Europe/Stockholm"},"period":{"from":"2026-09-22","to":"2026-10-21","granularity":null},"partial":true,"generated_at":"2026-10-21T08:00:00.000Z"}}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/invalid_request"},"401":{"$ref":"#/components/responses/unauthenticated"},"403":{"description":"Insufficient scope, Credential restricted, API access disabled, Insufficient role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"insufficient_scope":{"summary":"Insufficient scope","value":{"type":"https://api.podspace.com/docs/errors#insufficient_scope","code":"insufficient_scope","title":"Insufficient scope","status":403,"detail":"The token lacks the scope the operation needs.","request_id":"req-1"}},"credential_restricted":{"summary":"Credential restricted","value":{"type":"https://api.podspace.com/docs/errors#credential_restricted","code":"credential_restricted","title":"Credential restricted","status":403,"detail":"You are a member of the space, but the token's grant does not include it.","request_id":"req-1"}},"api_access_disabled":{"summary":"API access disabled","value":{"type":"https://api.podspace.com/docs/errors#api_access_disabled","code":"api_access_disabled","title":"API access disabled","status":403,"detail":"API access is not enabled for the space.","request_id":"req-1"}},"insufficient_role":{"summary":"Insufficient role","value":{"type":"https://api.podspace.com/docs/errors#insufficient_role","code":"insufficient_role","title":"Insufficient role","status":403,"detail":"Your role in the space does not allow the operation.","request_id":"req-1"}}}}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Validation failed, Result too large","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"validation_failed":{"summary":"Validation failed","value":{"type":"https://api.podspace.com/docs/errors#validation_failed","code":"validation_failed","title":"Validation failed","status":422,"detail":"The parameters parse but are not acceptable together, or a value such as a cursor is not valid here.","request_id":"req-1","errors":[{"path":"cursor","message":"Pass the next_cursor unchanged."}]}},"result_too_large":{"summary":"Result too large","value":{"type":"https://api.podspace.com/docs/errors#result_too_large","code":"result_too_large","title":"Result too large","status":422,"detail":"The query returns more rows than an answer may carry, or hit a limit of the analytics backend (rows or query time); `detail` names it.","request_id":"req-1"}}}}}},"429":{"description":"Rate limited, Too many authentication failures, Analytics budget exceeded","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"examples":{"rate_limited":{"summary":"Rate limited","value":{"type":"https://api.podspace.com/docs/errors#rate_limited","code":"rate_limited","title":"Rate limited","status":429,"detail":"Too many requests with the credential in the current minute.","request_id":"req-1"}},"too_many_auth_failures":{"summary":"Too many authentication failures","value":{"type":"https://api.podspace.com/docs/errors#too_many_auth_failures","code":"too_many_auth_failures","title":"Too many authentication failures","status":429,"detail":"Too many requests from your address failed authentication in the current minute.","request_id":"req-1"}},"analytics_budget_exceeded":{"summary":"Analytics budget exceeded","value":{"type":"https://api.podspace.com/docs/errors#analytics_budget_exceeded","code":"analytics_budget_exceeded","title":"Analytics budget exceeded","status":429,"detail":"The analytics queries of the person in the current minute, or of the space in the current hour, have used up their budget.","request_id":"req-1"}}}}}},"500":{"$ref":"#/components/responses/internal_error"},"502":{"$ref":"#/components/responses/upstream_unavailable"},"504":{"$ref":"#/components/responses/upstream_timeout"}},"x-stability-level":"beta"}}},"servers":[{"url":"https://api.podspace.com"}],"tags":[{"name":"Spaces"},{"name":"Shows"},{"name":"Episodes"},{"name":"Uploads"},{"name":"Campaigns"},{"name":"Analytics"}]}