CloudPDF API reference
The CloudPDF server API is what your backend calls: it gets documents in and mints the short-lived tokens your viewer opens with. The browser never talks to this API directly.
Every operation below is generated from the same OpenAPI contract that generates the official SDKs, so the reference cannot drift from the wire.
The current API and SDK line is a preview. Endpoint pages display the exact canonical version, and your SDK language is remembered across the whole reference — pick it once below.
Install#
Seven official SDKs, all generated from the contract below. Your choice here is remembered for every example in the reference.
npm install @cloudpdf/sdk@nextGet access#
On managed CloudPDF your account is a tenant — tenants and deployment configuration are operated by the platform, so the sections marked Self-hosted below don’t apply to you.
Your API key from the dashboard is a tenant token: it can manage
documents and mint document tokens under your account, and nothing else.
Use it as the token in every example in this reference.
Getting a document on screen#
Three steps, and only the last one runs in a browser.
- Initialize an upload — request upload access, transfer the file using the returned instructions, then commit the upload.
- Issue a document token — a short-lived JWT pinned to one document, carrying exactly the capabilities that user should have.
- Open it — hand that token to the viewer or headless components. See Engine: getting started.
Steps 1–2 are the API surface documented here. Step 3 is the client SDK.
Authentication#
Three credentials, and authority mints only downward. Each rung is weaker than the one above it, and only the last one ever reaches a browser.
The deployment's static root credential (CLOUDPDF_API_AUTH_TOKENS), valid on every surface.
Delegated tenant JWT, valid only under its own /v1/tenants/{tenantId}/ subtree — the path tenant must equal the token's tenant_id. Doc-scoped viewer tokens are rejected on every admin route.
Doc-scoped JWT, valid only on the /v1/docs/{docId} subtree it names, gated by the capability scopes it carries (each operation's x-required-capability).
How authentication works → — minting, signing modes, revocation, and the full capability tables.