API Tokens
GET /api/tokens
Section titled “GET /api/tokens”List Tokens
List all API tokens for the current user.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | TokenListResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/tokens
Section titled “POST /api/tokens”Create Token
Create a new API token.
The plain token is only returned once in this response. Store it securely - it cannot be retrieved again.
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| description | string | no | |
| name | string | yes | |
| scope | string | no |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | CreateTokenResponse |
| 422 | Validation Error | HTTPValidationError |
DELETE /api/tokens/{token_id}
Section titled “DELETE /api/tokens/{token_id}”Revoke Token
Revoke an API token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| token_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful Response | |
| 422 | Validation Error | HTTPValidationError |