Skip to main content
POST
Create Key

Authorizations

Authorization
string
header
required

Bearer scheme name used by typed customer admin operations.

Body

application/json

Request body for customer self-service POST /v1/admin/keys.

display_name
string
required

Human-readable label shown in customer tooling.

Maximum string length: 160
api_key_id
string<uuid> | null

Optional client-supplied UUID for the new API key.

expires_at
string | null

Optional expiry timestamp in RFC 3339 form.

Maximum string length: 80
Example:

"2027-01-01T00:00:00Z"

scopes
string[]

Allowed scopes for the new key. Defaults to ["compute"].

Example:

Response

API key minted

Response body for creating a customer API key.

The plaintext api_key is returned only once; the customer portal surfaces it with a "show once" affordance and never re-fetches it.

api_key
string
required

Plaintext API key. Format: mthr_live_*. Returned exactly once.

Example:

"mthr_live_01JZ8M7EXAMPLE"

api_key_id
string<uuid>
required

Stable UUID for the API key.

created_at
string
required

RFC 3339 creation timestamp.

Example:

"2026-05-25T17:30:00Z"

customer_id
string<uuid>
required

Stable UUID for the customer account.

customer_user_id
string<uuid>
required

Customer user UUID the key is bound to.

display_name
string
required

Human-readable label for the key.

Example:

"ci-prod"

key_last4
string
required

Last 4 characters, used as a display affordance.

Example:

"MPLE"

key_prefix
string
required

First 18 characters of the API key, stored server-side for fast prefix lookups. Prefix stored for display and lookup. Not sufficient to authenticate.

plaintext_display
string
required

Always "one-time" — reminder that the plaintext is not retrievable.

Example:

"one-time"

scopes
string[]
required

Scopes granted to the key.

Example:
status
string
required

Key lifecycle state.

Example:

"active"

tenant_id
string<uuid>
required

Stable UUID for the tenant this key can access.

expires_at
string | null

Optional RFC 3339 expiry timestamp.

Example:

"2027-01-01T00:00:00Z"