Skip to main content
Use these operations to interact with API keys in Cortex.

Required permissions

Your API token must have the Edit API keys permission.

Roles

When creating an API key, you must specify roles. Each role requires a type field set to DEFAULT or CUSTOM. You can assign multiple roles (both default and custom) to a single API key. Default roles use the role field to specify the permission level. Allowed values: READ_ONLY, USER, ADMIN.
Custom roles use the tag field (not role) to reference a custom role by its unique tag:
Example payload with multiple roles:
Note: Users with custom roles can only create API keys assigned to roles with equal or fewer permissions than their own.

Operations

List API keys

GET /api/v1/auth/key

Get API key

GET /api/v1/auth/key/{cid}

Create API key

POST /api/v1/auth/key

Update API key

PUT /api/v1/auth/key/{cid}

Delete API key

DELETE /api/v1/auth/key/{cid}
Last modified on September 24, 2026