CloudPDF
DocsPricing
Start building

Revoke token

POST/v1/tenants/{tenantId}/tokens/{jti}/revokev3.0.0-next.9

Revoke a token by jti; live sessions drop on their next heartbeat.

Mounted only when the deployment enables token revocation.

Authentication#

Any one of these credentials is accepted.

API token

The deployment's static root credential (CLOUDPDF_API_AUTH_TOKENS), valid on every surface.

Tenant token

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.

Required scopetokens.revoke

Parameters#

tenantIdpathstringrequired
jtipathstringrequired

Request body#

application/jsonTokensRevokeRequest
reasonstring
expiresAtSecondsinteger

A complete body with every required field. Strings stand in for your own values.

{
  "reason": "reason",
  "expiresAtSeconds": 1
}

SDK examples#

The selected SDK is remembered across the API reference. Values are examples; replace them with identifiers and input from your application.

import { CloudPDFClient } from "@cloudpdf/sdk";

const client = new CloudPDFClient({
  baseUrl: "https://yourhost.com/path/to/api",
  token: "<token>",
});

await client.tokens.revoke({
  tenantId: "tenantId",
  jti: "jti"
});

Responses#

204No content

No response body.

400Bad request
application/jsonTokensRevokeResponse
errorobject
codestring
messagestring
defaultError
application/jsonAdminErrorPayload
errorobject
codestring
messagestring