Skip to content

Create API token​

POST
/api/tokens

Creates a new API token. The full token is returned in this response only.
Tokens are stored as SHA-256 hashes — the raw token cannot be retrieved later.

Authorizations​

bearerAuth

API token created via POST /api/tokens or the db:create-token CLI command

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"name": "string"
}

Responses​

Created token (shown once)

application/json
JSON
{
"data": {
"id": 0,
"name": "string",
"token": "string"
}
}

Samples​

Powered by VitePress OpenAPI