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": "API"
}
Responses
Created token (shown once)
application/json
JSON
{
"data": {
"id": 0,
"name": "string",
"token": "string",
"created_at": "string"
}
}
POST
/api/tokens
