Skip to main content
POST
Create an API key
Dashboard session only. API keys cannot call this operation.

Authorizations

Authorization
string
header
required

Your API key in Authorization: Bearer <key>. Use vk_test_… keys against the sandbox and vk_live_… keys against production.

Headers

Idempotency-Key
string

Optional key (1-255 printable ASCII characters, no spaces; a UUID is ideal) that makes this POST safe to retry: the same key with the same request replays the stored response for 24 hours. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x21-\x7E]{1,255}$

Body

application/json

New API key.

name
string
required

Name (1-80 characters).

Required string length: 1 - 80
scopes
string[]
required

Delegable permissions you hold yourself (1-100).

Required array length: 1 - 100 elements

A permission (role) key such as view-consumer-catalog or create-consumer-redemptions. See Permissions and scopes and GET /partner/v1/permissions.

Pattern: ^[a-z][a-z0-9-]*$
expiresAt
string<date-time> | null

Expiry, at most 2 years ahead; null for none (rotate at least every 12 months).

Example:

"2026-11-01T00:00:00Z"

Response

Created

Single-object envelope around a ApiKeyWithSecret.

data
object
required

A newly created or rolled API key with its secret.