v1
Namespace

Create Namespace Api Key

Changed on

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

Request

  • Base URL
    https://memory.papr.ai
  • URL
    https://memory.papr.ai/v1/namespace/{namespace_id}/api-keys
  • Auth
    none declared. Required headers: X-API-Key

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

detailsunknown

Changes