Create a token

Mints an access token scoped to a single company, employee, or contractor. The response includes the token secret exactly once. Token create does not honor the Idempotency-Key header. Requires the token:write scope. Available only when the Tokens API is enabled for your organization; otherwise responds with 404. Authenticate with a Check API key or a Check Console session access token.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

Early access

The Tokens API is enabled per organization. If it is not enabled for yours, the token endpoints respond as if they do not exist. Contact your Check representative to request access.

Mint a token with either a scope preset (read_only or read_write) or an explicit list of canonical scopes — not both. The granted scopes are narrowed to those your caller already holds. expires_at must be in the future and at most seven days ahead. The response is the only time the secret is returned.

Errors

All validation failures respond with 400 and one of the error types below in error.type.

Error typeCause
validation_errorThe body is malformed. This includes providing both preset and scopes, an empty scopes list, or an unknown preset value. input_errors names the field.
token_expires_invalidexpires_at is in the past or more than seven days from now.
entity_not_foundThe entity does not exist or does not belong to your account.
invalid_scopesOne or more scope names are not known. invalid_scopes maps each bad name to a reason. Use List scopes for the valid names.
empty_scopesAfter narrowing to the scopes your caller holds, nothing remains to grant.

Callers that may not use the Tokens API, such as tokens minted here, receive 403. When the Tokens API is not enabled for your organization, the endpoint responds with 404.

Body Params
string
required
length ≤ 255

Short human-readable name for the token.

date-time
required

When the token should expire, in UTC. Must be in the future and at most seven days ahead.

grants
array of objects
required
length between 1 and 1

Exactly one scope grant.

grants*
entity
object
required
string

Must be null. Resource-scoped tokens are not implemented yet.

string | null
enum

Scope preset. Provide exactly one of preset or scopes.

Allowed:
scopes
array of strings | null

Explicit list of canonical scopes. Provide exactly one of preset or scopes.

scopes
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json