> This page is for version Preview.
> For other versions, use one of these documentation indexes:
> - Current (default): https://docs.paid.ai/current/llms.txt
> - Preview: https://docs.paid.ai/preview/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.paid.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.paid.ai/_mcp/server.

# Introduction

> Authentication and the headers every Paid API endpoint shares.

Every endpoint below is served from `https://api.paid.ai/v1` and takes JSON. The authentication and headers on this page apply to all of them, so the endpoint pages don't repeat them.

## Authentication \[#authentication]

Authenticate with an API key from **Developers > API keys** in the Paid app, sent as a bearer token. A key from a sandbox organization starts with `paid_sk_test_`, one from a production organization with `paid_sk_live_`:

```bash
curl https://api.paid.ai/v1/betas \
  -H "Authorization: Bearer $PAID_API_KEY"
```

A key only reaches the endpoints its scopes cover; any other call returns `403` with the `insufficient_scope` code.

## Request headers \[#request-headers]

| Header            | Sent on                  | Description                                                                                                                                                                                                                                       |
| ----------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Authorization`   | Every request (required) | `Bearer <API key>`. See [Authentication](#authentication).                                                                                                                                                                                        |
| `Paid-Version`    | Any request              | The API version to use for this request, one of `2026-11-01`. Defaults to the version your account is pinned to.                                                                                                                                  |
| `Paid-Beta`       | Any request              | Opt this request in to one or more betas, comma-separated, e.g. `name=v1`. Endpoints in a beta list the value they require.                                                                                                                       |
| `Idempotency-Key` | POST and PATCH           | A unique key of 1 to 255 printable ASCII characters, such as a UUID. Retrying with the same key and body within 24 hours returns the original response instead of repeating the operation. See [Idempotency](/preview/api-reference/idempotency). |

## Response headers \[#response-headers]

| Header                 | Sent on                | Description                                                                                                                                                                                                                                                 |
| ---------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Paid-Version`         | Every response         | The API version applied to this request.                                                                                                                                                                                                                    |
| `Request-Id`           | Every response         | The ID of this request, e.g. `req_...`. Include it when contacting support.                                                                                                                                                                                 |
| `Paid-Beta`            | Successful responses   | The betas applied to this request, when it opted in to any.                                                                                                                                                                                                 |
| `Paid-Beta-Deprecated` | Successful responses   | Betas sent in `Paid-Beta` that graduated in this request's version or an earlier one, as `name=vN; graduated-in=YYYY-MM-DD`. Their header is accepted for a grace period, then ignored. On a version before `graduated-in` the beta still needs its header. |
| `Idempotent-Replayed`  | POST and PATCH replays | `true` when the response is the stored result of an earlier request with the same `Idempotency-Key`.                                                                                                                                                        |
| `Paid-Warning`         | Successful responses   | A condition worth checking that did not fail the request, as a code: `external_id_changed` when an update changed a customer's `externalId`, so events still sent with the old ID will create a draft customer.                                             |
| `Retry-After`          | 429 responses          | Seconds to wait before retrying.                                                                                                                                                                                                                            |

## Errors \[#errors]

Every error returns the same JSON error object, with a `docUrl` linking to its code on the [errors page](https://docs.paid.ai/preview/developers/api/errors).