Skip to content

Revoke a token

POST
/api/tokens/{id}/revoke
curl --request POST \
--url https://app.dycrypt.com/o/acme/api/tokens/1/revoke \
--cookie JSESSIONID=<JSESSIONID>

Takes effect on the next request.

id
required
integer format: int64

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>
Allowed values: licenses:read licenses:write products:read products:write customers:read customers:write users:read users:write analytics:read activity:read
status
string
Allowed values: ACTIVE EXPIRED REVOKED
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"
}