Skip to main content
POST
Create API key

Authorizations

Authorization
string
header
required

Scoped API key created via POST /api/account/keys.

Body

application/json

Key parameters

label
string

Human-readable label for the key

Example:

"My API Key"

lifetimeDays
integer

Key lifetime in days (required, max configurable via MAX_API_KEY_LIFETIME_DAYS)

Example:

90

scopes
string[]

Permission scopes to grant (string names converted to bitmask internally). Valid values: *, sessions:read, sessions:manage, messages:write, chats:read, chats:manage, contacts:read, contacts:manage, groups:read, groups:manage, channels:read, channels:manage, status:write, presence:read, presence:write, labels:read, labels:manage, profile:read, profile:write, webhooks:manage, media:read, media:manage

Response

Created

createdAt
string

When the key was created

expiresAt
string

When the key expires

id
string

Unique API key identifier

key
string

Full API key (only returned once at creation, store securely)

label
string

Human-readable label for the key

scopes
string[]

Permission scopes granted to this key as string names