Mint a token
const url = 'https://app.dycrypt.com/o/acme/api/tokens';const options = { method: 'POST', headers: {cookie: 'JSESSIONID=<JSESSIONID>', 'Content-Type': 'application/json'}, body: '{"name":"example","scopes":["licenses:read"],"expiresOn":"2026-04-15"}'};
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 \ --header 'Content-Type: application/json' \ --cookie JSESSIONID=<JSESSIONID> \ --data '{ "name": "example", "scopes": [ "licenses:read" ], "expiresOn": "2026-04-15" }'The response carries secret, and it is the only time it ever will —
nothing stores it, so a lost token is replaced, not recovered.
Closed to tokens. A token that could mint tokens could grant itself every capability, which would make the whole model advisory. The ceiling on a token has to be set by a person.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Absent for a token that lasts until revoked.
Responses
Section titled “Responses”The new token, including its secret.
object
The public half of the credential — the <id> in dyc_<id>_<secret>.
Stamped at most once a minute, so a dead integration is visible without turning every read into a write.
Shown once.
Example
{ "scopes": [ "licenses:read" ], "status": "ACTIVE"}The request is wrong — a bad date, a missing field, a value the product does not declare.
Every failure in this API has this shape and no other.
object
Example
{ "error": "this token does not have licenses:write"}No credential, or one that no longer resolves — revoked, expired, deleted. Replace it.
Every failure in this API has this shape and no other.
object
Example
{ "error": "this token does not have licenses:write"}Not available to API tokens, or the caller is not an organisation administrator.
Every failure in this API has this shape and no other.
object
Example
{ "error": "this token does not have licenses:write"}