API Tokens
Manage API tokens for programmatic access. See Authentication for usage details.
List Tokens
[
{
"id": "tok_a1b2c3d4",
"name": "ci-deploy",
"scopes": ["apps:write"],
"last_used_at": "2024-01-20T15:00:00Z",
"created_at": "2024-01-15T10:30:00Z"
}
]
Create a Token
Descriptive name for the token
Permission scopes (empty = full access)
{
"name": "ci-deploy",
"scopes": ["apps:read", "apps:write"]
}
Response: 201 Created
{
"id": "tok_a1b2c3d4",
"name": "ci-deploy",
"token": "dkc_live_abc123def456...",
"scopes": ["apps:read", "apps:write"],
"created_at": "2024-01-15T10:30:00Z"
}
The token value is only returned once. Store it securely.
Revoke a Token
DELETE /api/v1/api-tokens/{id}
The token is immediately invalidated.