Skip to main content
POST
Create organization API key

Authorizations

Authorization
string
header
required

Supabase JWT token in Authorization: Bearer header

Path Parameters

org_id
string
required

Organization identifier (e.g. org-abc12345)

Body

application/json
name
string

Friendly name for the key (e.g., "ci-prod").

Maximum string length: 100
scopes
enum<string>[]

Capability set for this org key (ADR-049). If omitted, the API substitutes the default. For owner/admin callers admin:org is implicit-eligible; admin:platform still requires Mnemom-staff role. Member callers must send exactly ["gateway"].

Capability-based scope (ADR-049). gateway permits gateway-worker traffic; api:read and api:write permit identity-scoped GET and write endpoints respectively; admin:org permits org-admin operations on orgs the bearer owns/admins (per-request membership re-check); admin:platform permits /v1/admin/* Mnemom-staff operations (per-request staff-role re-check). invites:synthetic is the customer-journey testpass scope: staff-only to mint, must be the key's ONLY scope, grants no general API access, and is honoured only by POST /v1/admin/member-invites (Mnemom Agent invite), POST /v1/admin/member-invites/{inviteId}/revoke, DELETE /v1/admin/users/{id} and GET /v1/admin/synthetic/account, each confined to addresses whose local part starts with cj-synt- (per-request staff-role re-check of the key owner). The legacy api scope is accepted for backward compatibility and aliased to api:read + api:write at the auth gate; new keys should use the canonical vocabulary.

Available options:
gateway,
api:read,
api:write,
admin:org,
admin:platform,
invites:synthetic,
api

Response

Org API key created

key_id
string
key
string

Full secret key, only returned on creation

key_prefix
string
name
string
org_id
string | null
scopes
enum<string>[]

Capabilities granted to this key. Default for new keys is ["gateway", "api:read", "api:write"]. Admin scopes (admin:org, admin:platform) are opt-in and gated by the requester's role at mint time. See API Keys → Scope vocabulary.

A scope as stored on an existing key row and read back by the key-listing endpoints. It is every mintable ApiKeyScope, plus durable:*, the only scope a Durable executor key carries (kind executor, minted by POST /v1/executors/enroll and the OIDC exchange, never by POST /api-keys). durable:* is not accepted on a create request (MNE-9860).

Available options:
gateway,
api:read,
api:write,
admin:org,
admin:platform,
invites:synthetic,
api
created_at
string<date-time>
last_used_at
string<date-time> | null