Tenants

Issue an independently scoped API key

Creates an overlapping named credential. Requires a workspace owner or admin with credentials:manage and MFA or passkey step-up completed in the last ten minutes. A human caller cannot put a scope on a secret key that is absent from their own effective membership scopes. tools.enable narrows the tenant-enabled catalog for this key; pricing applies only to end-user calls and never widens tenant enablement. kind 'sandbox' issues a scopeless test credential (lcrsb_...) whose metered calls are simulated: no credits move and no providers are called. Unknown body fields are rejected with 400.

post/credits/tenants/me/keys

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/tenants/me/keys
  • Auth
    HTTP bearer

Headers

X-Locus-Step-Upstring password

Short-lived raw MFA/passkey step-up token bound to the authenticated Cognito subject. Send it alongside the dashboard Bearer token for workspace-administrator mutations when the base session does not itself prove MFA within the last ten minutes. Never send it with a tenant secret key.

Request body

kind'secret' | 'publishable' | 'sandbox' required
namestring
scopesCreditsTenantScope[]
expiresIninteger

Response

{ success, kind, key, keyMetadata } — the raw key is returned exactly once, with the stored lifecycle metadata beside it.

Changes

No recorded changes to this operation across all 1 revision of this API.