> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/api-reference/rest-api/authentication-and-errors.md). Agents can also search and read this documentation through its [MCP server](https://docs.podigee.com/~gitbook/mcp).

# REST API authentication and errors

Credentials, request format, error body, rate limits, and the request time limit of the REST API v1.

Use this reference when you need exact information about how the REST API v1 accepts a credential and how it reports an error.

## Base URL and format

| Item             | Value                                      |
| ---------------- | ------------------------------------------ |
| Base URL         | `https://app.podigee.com/api/v1`           |
| Request body     | JSON                                       |
| Response body    | JSON                                       |
| Message language | English, independent of the account locale |

### Request body

Send the fields of a create or update request as one flat JSON object, with the header `Content-Type: application/json`.

```bash
curl -X PUT -H "Token: mytoken" -H "Content-Type: application/json" \
  -d '{"title": "A new title"}' https://app.podigee.com/api/v1/episodes/123
```

* Do not put the fields into an object with the name of the resource, such as `episode` or `podcast`. The API then finds none of the fields.
* The API ignores a field that the endpoint does not accept. It does not report an error for that field, and an update that contains only such fields answers `200` and changes nothing.
* After each write request, compare the response with the values that you sent.
* The API has no `PATCH` method. Use `PUT` for an update.

## Credentials

| Credential                     | Where you get it                                                                                                                                                          | How you send it                                            |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| Account API key                | Classic view: **My account**, **API** tab, field **API key**. Podigee workspace: **Data & integrations**, **API keys** tab, panel **Account API key**, field **API key**. | Header `Token: <key>` or `Authorization: Bearer <key>`     |
| REST API token (`pdg_pat_...`) | Classic view: **My account**, **API** tab, **Create REST API token**. Podigee workspace: **Data & integrations**, **API keys** tab, **Create REST API token**.            | Header `Token: <token>` or `Authorization: Bearer <token>` |
| OAuth 2.0 access token         | Granted to a partner application that Podigee registered                                                                                                                  | Header `Authorization: Bearer <access token>`              |

The API reads the `Token` header first and the `Authorization` header second.

For an integration that runs on your own server, use a REST API token or the account API key. OAuth 2.0 is for an application that acts for many different Podigee accounts. You cannot register an OAuth application yourself. To ask for one, describe the application in the [sales form](https://www.podigee.com/sales/).

The REST API does not accept Model Context Protocol (MCP) credentials. The API refuses an MCP connector credential with `401` and this message: `This MCP credential is not valid for the REST API. Use an API key.` The API treats an MCP personal access token as unknown and refuses it with the generic `401` body. Create a REST API token instead.

## Access rules

| Rule                   | Effect                                                                                                                                                               |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API access in the plan | REST API tokens work only when the plan includes API access: Scale and above, or an older plan that includes it.                                                     |
| Organization members   | The plan of the organization owner decides the API access.                                                                                                           |
| Subscription state     | The API refuses requests when the subscription is canceled or suspended. The API also refuses REST API tokens when the trial is expired.                             |
| Podcast visibility     | A credential sees the podcasts that its account owns, edits as a collaborator, or can see as an organization member.                                                 |
| Read-only tokens       | The API refuses a REST API token with the scope **Read** on every request except `GET` and `HEAD`. The response is `403` with the message `This token is read-only.` |

### Limit what an integration can do

A credential has the rights of the user who owns it. The API has no credential for one podcast only.

* To allow an integration to read but not to change data, create a REST API token with the scope **Read**.
* To limit an integration to some podcasts, or to stop it from publishing, create the REST API token as an organization member who has only those rights. See [Set organization roles and permissions](https://docs.podigee.com/documentation/connect-and-administer/account-and-team/set-organization-roles-and-permissions).

## Error body

Every error returns a JSON object with `code` and `message`. The `code` repeats the HTTP status.

| Status | Body                                                                        | When                                                                                                                                                                                                                           |
| ------ | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `401`  | `{"code": 401, "message": "You are not authorized to access this area."}`   | Missing or wrong credential, a REST API token without API access in the plan, or a canceled or suspended subscription.                                                                                                         |
| `403`  | `{"code": 403, "message": "..."}`                                           | The credential is valid but the action is not allowed, for example a read-only token on a write request, or `publish_episode=true` without the permission to publish.                                                          |
| `404`  | `{"code": 404, "message": "The <object> with id <id> could not be found."}` | The object does not exist or is not visible to the credential.                                                                                                                                                                 |
| `409`  | `{"code": 409, "message": "..."}`                                           | A conflicting change or a running job. For example, the transcript or the recording of an episode changed during the update, or an analytics export is already in preparation. Read the object again, then repeat the request. |
| `402`  | `{"code": 402, "message": "Not enough encoding time left"}`                 | You started a production and the plan has no encoding time left.                                                                                                                                                               |
| `422`  | `{"code": 422, "message": "..."}`                                           | Validation failed. The message repeats the validation text.                                                                                                                                                                    |
| `429`  | `Throttled` (plain text)                                                    | The credential sent too many requests in one minute. See [Rate limits](#rate-limits).                                                                                                                                          |
| `500`  | `{"code": 500, "message": "..."}`                                           | Unhandled server error. Read the object before you repeat a write request. See [REST API retries and timeouts](https://docs.podigee.com/api-reference/rest-api/retries-and-timeouts.md).                                       |

## Rate limits

The API counts the requests of each credential per minute. The number of requests per minute depends on the plan.

| Plan                                         | Requests per minute                          |
| -------------------------------------------- | -------------------------------------------- |
| Scale, Creator, Pro, Enterprise, Broadcaster | 100                                          |
| Network                                      | 500                                          |
| An older plan that includes API access       | 10, 20, or 100. The plan decides the number. |

When a credential sends more requests than allowed, the API responds as follows:

| Item                         | Value                                                                 |
| ---------------------------- | --------------------------------------------------------------------- |
| Status                       | `429`                                                                 |
| Body                         | `Throttled`                                                           |
| `RateLimit-Limit` header     | The number of requests that the credential can send per minute        |
| `RateLimit-Remaining` header | `0`                                                                   |
| `RateLimit-Reset` header     | The time when the current minute ends, as a Unix timestamp in seconds |
| `Retry-After` header         | The number of seconds to wait before the next request                 |

Wait for the time in `Retry-After` before you send the next request. Requests that the web app sends with your browser session do not count against the limit of your credential.

The limit is a part of the plan. If your integration needs more requests per minute, the Network plan has the higher limit. Write to Podigee through the [contact page](https://www.podigee.com/contact-us/) or the [sales form](https://www.podigee.com/sales/).

To stay below the limit:

* Read only the changes since your last request. Do not read the complete episode list each time. See [Read episodes in pages](https://docs.podigee.com/api-reference/rest-api/podcasts-and-episodes.md#read-episodes-in-pages).
* Use `fields_filter[]` to make each response smaller. It does not lower the request count.
* After a `429`, wait and send the same request again. Do not send it faster.

The three upload URL endpoints (`POST /uploads`, `POST /uploads/part_url`, `POST /uploads/complete_multipart_url`) have their own limit of 600 requests per minute for the account API key and OAuth access tokens. On these three endpoints, a REST API token counts against the request limit of the MCP server, not against the REST API limit.

A client that Podigee blocked receives `503` with a message that asks you to contact Podigee Support if you think the block is an error.

## Request time limit

Podigee stops a request that runs longer than 35 seconds. Your client then receives a `5xx` response or a closed connection, not a JSON error body.

A request that Podigee stopped, or that your client stopped earlier, can still have changed data. Do not send a create request again before you read the current state. See [REST API retries and timeouts](https://docs.podigee.com/api-reference/rest-api/retries-and-timeouts.md).

Podigee does not guarantee a response time. Do not call the API for each visitor of your website or app. Use the RSS feed or the web player for your audience, and use the API from your server.

## Field filter on list endpoints

Add `fields_filter[]=<field>` one or more times to a list request to receive only the named fields. The API always includes `id` and `title`.

## Related tasks

* [Get your API key or token](https://docs.podigee.com/documentation/connect-and-administer/integrations/get-your-api-key-or-token)
* [Make your first API request](https://docs.podigee.com/api-reference/rest-api/make-your-first-api-request.md)
* [Publish an episode from your own system](https://docs.podigee.com/api-reference/rest-api/publish-an-episode-from-your-own-system.md)
* [REST API retries and timeouts](https://docs.podigee.com/api-reference/rest-api/retries-and-timeouts.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.podigee.com/api-reference/rest-api/authentication-and-errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
