v37

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-1170194628.0 KB
v1
Namespace

Create Namespace Api Key

Mint a new API key bound to the given namespace. Caller must authenticate with any API key belonging to the same organization (typically the org-wide / default-namespace key).

Security: The full key is returned exactly once in this response. Store it immediately — it cannot be retrieved later. Subsequent reads expose only the masked key_prefix.

post/v1/namespace/{namespace_id}/api-keys

Path parameters

namespace_idstring required

Headers

X-API-Keystring required

Request body

namestring required

Human-readable name for the API key (shown in admin UIs).

environment'development' | 'staging' | 'production'

Environment label: development, staging, or production.

permissionsstring[]

Permissions granted by this key. Must be a subset of ['read', 'write', 'delete'].

Example request

{
  "environment": "production",
  "name": "Acme Production API Key",
  "permissions": [
    "read",
    "write",
    "delete"
  ]
}

Response

API key created

codeinteger

HTTP status code

statusstring

'success' or 'error'

errorstring nullable

Error message if failed

{"stackTrail":"components:schemas:CreateNamespaceApiKeyResponse:properties:details:anyOf","oasType":"schema","type":"unknown","title":"Details","description":"Additional error details. NEVER contains the API key.","nullable":true}