Skip to main content
POST
Create API key

Authorizations

Authorization
string
header
required

User Bearer Authentication

Use a dashboard user JWT in the Authorization header when managing API keys from the Snappy dashboard:

For multi-company users, also pass Snappy-Company-Id to select the target company.

Headers

snappy-account-id
string

Optional account identifier for swag validation/filtering.

Example:

"acc123456"

snappy-company-id
string

Optional company identifier for swag validation/filtering.

Example:

"cmp123456"

Body

application/json

Create API key request body.

name
string
required

The name of the API key. Must be unique within the company.

Minimum string length: 1
Example:

"My API"

expirationInDays
number | null
default:90

API key expiration period in days. Default: 90 days.

Required range: 0.00069 <= x <= 365
enforceMtls
boolean
default:false

If true, the API key will be enforced to use mTLS.

Example:

false

permissions
enum<string>[]

The permissions of the API key.

Available options:
gifts:create,
gifts:create:demo,
gifts:update,
gifts:read:unmasked,
gifts:read:masked,
orders:create,
orders:cancel,
orders:read:unmasked,
orders:read:masked,
campaigns:create,
campaigns:update,
campaigns:read,
collections:read,
products:read,
products:read:prices,
recipients:create,
recipients:update,
recipients:read:unmasked,
recipients:read:masked,
recipients:delete,
accounts:create,
accounts:read,
billingMethods:read
accountIds
string[]

Response

Created API key including the secret.

JSON:API single-resource envelope for a created API key.

data
object
required

API key object including the secret returned on create.

Last modified on June 17, 2026