List all API keys
Returns all API keys for the authenticated user. Does not include revoked keys.
Authorization
BearerAuth Security scheme for OpenAPI endpoints. Validates both JWT tokens and API keys.
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/api-keys"{ "api_keys": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "key_prefix": "string", "scopes": [ "string" ], "organisation_id": "9ec26450-a51e-40b1-a49f-e04045480fd5", "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9", "expires_at": "string", "last_used_at": "string", "created_at": "string", "is_revoked": true } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}{ "code": "string", "message": "string", "request_id": "string", "details": [ { "field": "string", "message": "string" } ]}List role permissions
Returns all roles and their associated scopes. Use this to show what permissions each role grants when managing users or creating API keys. **Required scope:** `org:read`
Create a new API key
Creates a new API key for programmatic access. The full key is only returned once at creation time - make sure to save it securely! ## Scopes You can specify scopes in two ways: - **Presets**: `read` (viewer access), `write` (editor+builder access), `admin` (all access) - **Granular**: Individual scopes like `tables:query`, `rows:insert`, `apikeys:create` If no scopes are provided, defaults to read-only access (viewer scopes).