Skip to main content

Base URL & Versioning

Base URL​

All API requests are made to:

https://api.docpayload.com/v1

API versioning​

The API version is included in the URL path. The current version is v1.

When breaking changes are introduced, a new version will be released (e.g., v2). Previous versions remain available for a deprecation period with advance notice.

Request format​

All request bodies must be JSON with the Content-Type: application/json header.

YOUR_ACCESS_TOKEN is the access token you get by exchanging your API key's Client ID and secret; see Authentication.

curl -X POST https://api.docpayload.com/v1/{YOUR_TENANT_ID}/documents/generate-from-payload/pdf \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "document": { ... } }'
# { "fileName": "...", "downloadUrl": "...", "status": "Succeeded" }

Response format​

  • Document generation endpoints return JSON with fileName, downloadUrl, and status
  • CRUD endpoints return application/json
  • All error responses are JSON with status, message, and optional details fields

Rate limits​

What is countedLimit
Documents generated (generate-from-payload, generate-from-template)600 a minute per tenant
Every other request (downloads, templates, assets)6,000 a minute per tenant, for each endpoint

The document limit is your tenant's own and can be raised on request. A download never counts as a document.

A request over a limit is answered 429 Too Many Requests, with the number of seconds to wait in the Retry-After header:

HTTP/1.1 429 Too Many Requests
Retry-After: 37