Skip to main content
POST
/
tokens
Create API Key
curl --request POST \
  --url https://api.useqrkit.com/v1/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scopes": [],
  "environment": "live",
  "expires_in_days": 183
}
'
{
  "id": "key_aB3dE5fG7hI9jK1m",
  "object": "api_key",
  "name": "<string>",
  "key_prefix": "qr_live_a1b2",
  "scopes": [
    "<string>"
  ],
  "last_used_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "key": "<string>"
}

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.