control:read scope.
List API keys
Query parameters
| Parameter | Description |
|---|---|
cursor | Cursor from a previous response meta.next_cursor. Omit for the first page. |
Response
Create an API key
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable label. Max 100 characters. |
scopes | array | Yes | One or more scope strings. Must be non-empty. |
ai:chat, ai:documents, ai:embeddings, ai:summarize, control:read, control:webhooks
Response (201)
data.plaintext is the full token. This is the only time it is returned. Copy it immediately — HASP stores only the hash.
Revoke an API key
404.
Response
Error codes
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY | 401 | Caller’s key is invalid or revoked |
MISSING_SCOPE | 403 | Key lacks control:read scope |
VALIDATION_FAILED | 422 | Request body invalid (missing name, empty scopes, unknown scope) |
RESOURCE_NOT_FOUND | 404 | Key ID not found or belongs to another org |