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

# POST /v1/pdf/pdfa

> Convert a PDF to PDF/A-1b archival format.

# Convert to PDF/A

`POST https://api.getdeckle.dev/v1/pdf/pdfa`

Convert a standard PDF to PDF/A-1b format for long-term archival and regulatory compliance.

## Request Body

| Parameter | Type   | Required | Description                     |
| --------- | ------ | -------- | ------------------------------- |
| `pdf`     | string | Yes      | Base64-encoded PDF document     |
| `title`   | string | No       | Document title metadata         |
| `author`  | string | No       | Document author metadata        |
| `subject` | string | No       | Document subject metadata       |
| `output`  | string | No       | `"url"` (default) or `"base64"` |

## Example

```bash theme={null}
curl -X POST https://api.getdeckle.dev/v1/pdf/pdfa \
  -H "Authorization: Bearer dk_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "pdf": "<base64-encoded-pdf>",
    "title": "Annual Report 2026",
    "author": "Acme Corp",
    "subject": "Financial Summary"
  }'
```

## Response (URL mode)

```json theme={null}
{
  "url": "https://cdn.getdeckle.dev/gen_abc123.pdf",
  "file_size": 98400,
  "pdfa": true
}
```

## Response (base64 mode)

```json theme={null}
{
  "data": "<base64-encoded-pdfa-pdf>",
  "file_size": 98400,
  "pdfa": true
}
```

## Errors

| Status | Code               | Description                                       |
| ------ | ------------------ | ------------------------------------------------- |
| 400    | `VALIDATION_ERROR` | Invalid or missing PDF, or PDF exceeds size limit |
| 401    | `UNAUTHORIZED`     | Invalid or missing API key                        |
| 429    | `RATE_LIMITED`     | Too many requests                                 |
| 500    | `INTERNAL_ERROR`   | Server error during conversion                    |
