Mints a new child API key (sk_test_* / sk_live_*) using the authenticated service key as the parent. The plaintext key is returned in the plaintext_key field of the response and is shown EXACTLY ONCE — store it immediately. Idempotency replays within 12 hours return the redacted row (no plaintext_key).
Service-key environment determines the new key’s environment by default; passing a mismatched environment returns 422. Binding the key to a line_id requires the line to exist, belong to the parent service key’s user, match the environment, and not be released — a 404 on the line is returned without sticky-caching so retries succeed once the customer fixes the binding.
Rate-limited to 60 requests per hour per service key.
Service keys (sk_svc_*) authenticate the /v1/keys/* management plane. Send as Authorization: Bearer <service-key>. Service keys are minted only from the portal (Settings → Service Keys); there is no API path to mint another service key.
Required. Mints are sticky-cached for 12 hours per (service key, method, path, Idempotency-Key) tuple. Reusing the same key with a different body returns 409 idempotency_key_reused; reusing it while the original request is still in-flight returns 409 idempotency_in_progress.
Human-readable name for the key
Stable identifier for the agent identity holding this key. Lowercase, 1-128 chars.
Scope the key to a single line. Omit (or set to null on PATCH) for an account-wide key.
Permission tier. The backfill-only legacy_full tier cannot be set via the API.
Returned by POST /v1/keys and POST /v1/keys/{id}/rotate on the FIRST call only. Idempotency replays within the 12-hour TTL return the same row WITHOUT the plaintext_key field — the plaintext is never re-disclosable.