Skip to main content
POST
Create an API key

Authorizations

Authorization
string
header
required

Your account's secret key: Authorization: Bearer sk_test_… or sk_live_…. Server-side only.

Headers

Idempotency-Key
string

A unique key per operation (a UUID works). Retrying with the same key returns the original response.

Body

application/json
tier
enum<string>

The key's rate-limit tier.

Available options:
free,
pro,
enterprise
scopes
string[]

The key's permissions. Empty grants full access to the account.

kind
enum<string>
default:secret

secret (default) for your server; publishable for the browser.

Available options:
secret,
publishable

Response

Created.

The new key, with the full secret in value.

id
string<uuid>
prefix
string

sk_test, sk_live, pk_test or pk_live.

Example:

"sk_live"

kind
enum<string>
default:secret
Available options:
secret,
publishable
lastFour
string

The last four characters

tier
enum<string>

Rate-limit tier.

Available options:
free,
pro,
enterprise
scopes
string[]
revokedAt
string<date-time> | null

When it was revoked. null while active.

createdAt
string<date-time>
value
string

The full secret. Only present in the create response.

secret
string