Skip to main content
POST
Create API Key

Authorizations

Authorization
string
header
required

API key in the Authorization header: Bearer qr_live_… or Bearer qr_test_…. Token endpoints take a Clerk session JWT instead.

Body

application/json
name
string
required
Maximum string length: 255
scopes
enum<string>[]
required
Minimum array length: 1
Available options:
qr:read,
qr:write,
analytics:read,
tokens:manage
environment
enum<string>
default:live
Available options:
live,
test
expires_in_days
integer
Required range: 1 <= x <= 365

Response

API key created (full key shown once)

id
string
Example:

"key_aB3dE5fG7hI9jK1m"

object
string
Example:

"api_key"

name
string
key_prefix
string
Example:

"qr_live_a1b2"

environment
enum<string>
Available options:
live,
test
scopes
string[]
last_used_at
string<date-time> | null
expires_at
string<date-time> | null
created_at
string<date-time>
key
string

The full API key — shown only once.