/v1/keysMint an API key
keys:createCreate a scoped API key. The entitlements must be a subset of what you can grant (your own capabilities intersected with the plan). An optional per-key credit cap ceilings its monthly spend. The plaintext secret is returned exactly once in this response and is never retrievable again.
Request body MintKeyRequest
labelstring requiredYour own name for the key, for finding it later.
max 200 charsentitlementsarray of string requiredWhat the key may do. Must be a subset of what YOU can grant, which is your own capabilities intersected with the plan’s; asking for more is a 403.
max 38 itemscreditCapintegerA per-period spending ceiling for this key. Omit for uncapped. A capped key that runs out is refused with a 429 and cannot drain the account.
min 0requireSignaturebooleanRequire an RFC 9421 signature on every request this key makes. Sending this without `publicKeyJwk` is a 400, since it would create a key that could never authenticate.
publicKeyJwkEd25519PublicJwkAn Ed25519 public JWK to register as this key’s first signer.
ktystring requiredKey type. Must be `OKP`; anything else is rejected with a 400.
OKPcrvstring requiredCurve. Must be `Ed25519`; no other algorithm is accepted.
Ed25519xstring requiredThe base64url-encoded Ed25519 public key. Public material only — never send a private key.
max 64 chars
Responses
200The new key and its one-time secretidstring requiredThe key id. Stable across rotations: rotating changes the secret, never the id.
labelstring requiredYour own name for the key.
credentialKindstring requiredWhat kind of credential this is.
statusstring requiredWhether the key is live or revoked.
requireSignatureboolean requiredWhen true, every request from this key must carry a valid RFC 9421 HTTP message signature; an unsigned request is rejected with a 401. Enforcement is per key, not global.
entitlementsarray of string requiredExactly what this key may do. Always a subset of what its creator could grant, so a key can never exceed the person or key that minted it. Changing it takes effect on the very next request, with no grace window.
createdByKindstring requiredWhether a member or another key created this one.
createdByIdstring requiredThe member id or key id that created it.
createdAtstring requiredWhen the key was created, as an ISO 8601 instant.
revokedAtstring | null requiredWhen the key was revoked, as an ISO 8601 instant. Null while live. Revocation is immediate and irreversible.
lastUsedAtstring | null requiredWhen the key was last seen on a request, as an ISO 8601 instant. Null means it has never been used, which is how you find keys safe to revoke.
secretsarray of KeySecretView requiredThe live secrets on this key, masked. Two are present during a rotation grace window.
prefixHintstring requiredThe leading, non-secret part of the key string, for recognising it.
last4string requiredThe last four characters, for distinguishing two keys at a glance.
displaystring requiredThe masked form to show a user. Safe to log and display; it is not the credential.
createdAtstring requiredWhen this secret was minted, as an ISO 8601 instant.
expiresAtstring | null requiredWhen this secret stops resolving, as an ISO 8601 instant. Set on a secret retired by a rotation, during its grace window. Null on the current secret.
creditCapinteger | null requiredA ceiling on what this key may spend per period. Null means uncapped. A key that hits its cap is refused with a 429 until the period rolls over, which contains a runaway agent without touching the rest of the account.
monthSpentinteger requiredCredits this key has spent in the current period, measured against `creditCap`.
secretstring requiredThe plaintext key. Returned EXACTLY ONCE, here, and never retrievable again — store it now or rotate the key to get a new one.
signerThumbprintstring | null requiredThe RFC 7638 thumbprint of the registered signer, which is the `keyid` your signatures must carry. Null when no JWK was supplied.
401No or invalid credentialcodestring requiredStable machine-readable error code. Branch on this, never on the numeric status.
bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_errormessagestring requiredHuman-readable explanation of the refusal.
statusinteger requiredThe HTTP status code, repeated in the body.
remedyobjectA self-serve path forward, when one exists (a 402 points at the credit top-up).
kindstring requiredWhat kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.
topupconnect_mailboxurlstring requiredWhere to go to clear the condition: an API path, or a web app page when only a person can.
402Plan does not include API keyscodestring requiredStable machine-readable error code. Branch on this, never on the numeric status.
bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_errormessagestring requiredHuman-readable explanation of the refusal.
statusinteger requiredThe HTTP status code, repeated in the body.
remedyobjectA self-serve path forward, when one exists (a 402 points at the credit top-up).
kindstring requiredWhat kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.
topupconnect_mailboxurlstring requiredWhere to go to clear the condition: an API path, or a web app page when only a person can.
403Missing keys:create, or entitlements you cannot grantcodestring requiredStable machine-readable error code. Branch on this, never on the numeric status.
bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_errormessagestring requiredHuman-readable explanation of the refusal.
statusinteger requiredThe HTTP status code, repeated in the body.
remedyobjectA self-serve path forward, when one exists (a 402 points at the credit top-up).
kindstring requiredWhat kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.
topupconnect_mailboxurlstring requiredWhere to go to clear the condition: an API path, or a web app page when only a person can.