PDF ExportsExport the site as a PDF

Export the site as a PDF

Exports the live site as a single PDF, rendering every page in navigation order. The export runs in the background: a new export returns 202, then poll GET /exports/pdf until downloadUrl is set.

If the latest completed export was built from the deployment that is live now, it is returned with 200, already carrying its downloadUrl, and nothing is rendered. Pass force to render again anyway.

One export runs per documentation at a time. Exports started through the API are limited to one every 5 minutes and 10 per 24 hours for each documentation; a request answered with an existing export does not count. Pages that cannot be rendered are left out of the PDF.

Requires editor or admin role, on the Standard, Professional or Enterprise plan.

curl -X POST "https://api.documentationai.app/api/v1/exports/pdf" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "force": false
}'
{
  "exportId": "6fa5a52d-d8b7-4b24-ac92-a55378f5eec4",
  "status": "completed",
  "progress": {
    "completed": 130,
    "total": 130
  },
  "fileSize": 38580135,
  "downloadUrl": "https://exports.r2.cloudflarestorage.com/exports/org-.../documentation-export.pdf?X-Amz-Signature=...",
  "downloadUrlExpiresAt": "2026-09-17T14:06:15.000Z",
  "deploymentId": "64e41663-5ac8-422e-a941-00aff79963ed",
  "source": "api",
  "errorMessage": "example_string",
  "createdAt": "2026-09-17T13:04:12.000Z",
  "completedAt": "2026-09-17T13:06:15.000Z"
}
POST
/exports/pdf
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Content-Typestring
Required

The media type of the request body

Options: application/json
forceboolean

Render again even when an export of the current live deployment already exists. The cooldown and daily quota still apply.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

Body

application/json
forceboolean

Render again even when an export of the current live deployment already exists. The cooldown and daily quota still apply.

Example:
false

Responses

exportIdstring

Identifies this export. Reads go through GET /exports/pdf, which always returns the current one.

statusstring

pending and processing are in progress; completed, failed and cancelled are final.

Allowed values:pendingprocessingcompletedfailedcancelled
progressobject
fileSizeinteger

Size of the PDF in bytes. Null until the export completes.

downloadUrlstring

Temporary link for downloading the PDF directly from storage, with no API key. Null while the export runs, after it fails, and once a newer export replaces the file.

downloadUrlExpiresAtstring

When downloadUrl stops working. Read the export again for a fresh link.

deploymentIdstring

The live deployment this export rendered

sourcestring

Where the export was started

Allowed values:dashboardapi
errorMessagestring

Why the export failed. Null unless status is failed.

createdAtstring
completedAtstring

Null until the export completes