> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platendoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The Platendoc REST API reference.

## Base URL

```
https://api.platendoc.com/v1
```

## Authentication

All endpoints require an API key passed as a Bearer token:

```
Authorization: Bearer pdc_live_xxxxxxxxxxxxxxxx
```

See [Authentication](/authentication) for details on creating and scoping API keys.

## Error envelope

All errors return a consistent JSON body:

```json theme={null}
{
  "error": {
    "code": "TEMPLATE_NOT_FOUND",
    "message": "Template not found.",
    "details": {}
  }
}
```

### Error codes

| Code                   | HTTP | Description                    |
| ---------------------- | ---- | ------------------------------ |
| `UNAUTHORIZED`         | 401  | Missing or invalid API key     |
| `API_KEY_INVALID`      | 401  | Key does not exist             |
| `API_KEY_REVOKED`      | 401  | Key has been revoked           |
| `FORBIDDEN`            | 403  | Key lacks the required scope   |
| `TEMPLATE_NOT_FOUND`   | 404  | Template not found or archived |
| `GENERATION_NOT_FOUND` | 404  | Generation not found           |
| `INVALID_DATA`         | 422  | Request body failed validation |
| `LIMIT_EXCEEDED`       | 429  | Plan document limit reached    |
| `RATE_LIMITED`         | 429  | Too many requests              |

## Pagination

List endpoints use **cursor-based pagination**. The response includes:

```json theme={null}
{
  "data": [...],
  "nextCursor": "gen_01j8z...",
  "hasMore": true
}
```

Pass `nextCursor` as the `cursor` query parameter on the next request to fetch the next page. When `hasMore` is `false`, you've reached the end.
