Revoke a token
POST
/api/tokens/{id}/revoke
const url = 'https://app.dycrypt.com/o/acme/api/tokens/1/revoke';const options = {method: 'POST', headers: {cookie: 'JSESSIONID=<JSESSIONID>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.dycrypt.com/o/acme/api/tokens/1/revoke \ --cookie JSESSIONID=<JSESSIONID>Takes effect on the next request.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer format: int64
Responses
Section titled “Responses”The revoked token.
Media typeapplication/json
Never carries its secret. Only the call that mints one returns that, once.
object
id
integer format: int64
tokenId
The public half of the credential — the <id> in dyc_<id>_<secret>.
string
name
string
scopes
Array<string>
status
string
expiresAt
string | null format: date-time
lastUsedAt
Stamped at most once a minute, so a dead integration is visible without turning every read into a write.
string | null format: date-time
revokedAt
string | null format: date-time
createdAt
string format: date-time
createdBy
string
Example
{ "scopes": [ "licenses:read" ], "status": "ACTIVE"}No credential, or one that no longer resolves — revoked, expired, deleted. Replace it.
Media typeapplication/json
Every failure in this API has this shape and no other.
object
error
required
string
Example
{ "error": "this token does not have licenses:write"}Not available to API tokens, or the caller is not an organisation administrator.
Media typeapplication/json
Every failure in this API has this shape and no other.
object
error
required
string
Example
{ "error": "this token does not have licenses:write"}No such record, or no such endpoint.
Media typeapplication/json
Every failure in this API has this shape and no other.
object
error
required
string
Example
{ "error": "this token does not have licenses:write"}