Skip to content

Rotate the product's check token

POST
/api/products/{id}/check-token
curl --request POST \
--url https://app.dycrypt.com/o/acme/api/products/1/check-token \
--header 'Authorization: Bearer <token>'

Returns the new plaintext once; only its hash is stored.

Immediate and disruptive: every installed application still carrying the old token stops being able to check in as soon as this returns. Ship the new token first.

id
required
integer format: int64

The new credential.

Media typeapplication/json
object
checkId
string
checkToken

Shown once. Nothing stores it.

string
rotatedAt
string
Examplegenerated
{
"checkId": "example",
"checkToken": "example",
"rotatedAt": "example"
}

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"
}

Authenticated, but not allowed: a missing scope, a read-only role, a plan limit reached, or a credential used under another organisation’s slug. The right credential doing something it may not do.

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"
}