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/sdkGet 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. The SDKs reach CloudPDF on their own,
so the token is all a client needs.
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 for its own tenant: under /v1/tenants/{tenantId}/ the path tenant must equal the token's tenant_id, and on /v1/docs/{docId} the document must belong to that tenant and the token's scope must hold the operation's document permissions, as a document token does. For servers; browsers get document tokens. 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).
Upload-only JWT for a browser, made by tokens.issue with kind upload: valid on its own tenant's documents.init, documents.commit and documents.uploadProxy, and nowhere else. It uploads into its folder with its metadata, up to maxFiles documents within maxBytes each, and commits only the documents it started.
How authentication works → — minting, signing modes, revocation, and the full capability tables.
Versions#
Every SDK sends EmbedPDF-Version with each request: the API version it was
generated from, such as 3.0. Every response carries EmbedPDF-Server-Version,
the version of the server that answered.
Within a major version the API only grows, so an SDK keeps working as the server
updates. A request without the header, such as a plain curl, is answered as the
server’s own version. A request from another major version gets a 400 that
names both versions.