API Keys
Create API key
Use this endpoint to programmatically create a new API key for your Company. Use this when rotating keys, provisioning a key for a new integration, or spinning up a scoped key for a specific Account from a backend service or automation pipeline.
Required fields
name- display name of the API key (must be unique within the Company)
Optional fields
expirationInDays- number of days until the key expires. Accepted values:30,60,90,180,365. Default:90.enforceMtls- whentrue, requests with this key must use mTLS. Default:false.permissions- array of permission scopes the new key should have. See the permission reference.accountIds- array of Account IDs the key should be scoped to. Omit for all-Accounts access.
Behavior Notes
- The API key secret is visible only in this response. The
apiKeyfield in the response body is your one and only chance to capture the secret value - store it securely. After this response, only metadata is retrievable. - Permission inheritance. Keys created via the API can only have the same permissions as the calling key, or a more restrictive subset. Attempts to grant permissions the calling key doesn’t have are rejected.
- Max 100 active API keys per Company. Delete an existing key before creating the 101st.
Permissions
- Requires:
apiKeys:create
POST
Create API key
Authorizations
Company Level Authentication
Company level authentication provides access to all resources under your company, including accounts, campaigns, gifts, and recipients.
Getting Your API Key
- Create an API Key: Use the
POST /v2/authentication/apiKeysendpoint to generate a new API key - Set Expiration: Choose from 30, 60, 90, or 180 days (default: 90 days)
- Optional mTLS: Enable mutual TLS for enhanced security
- Name Your Key: Provide a descriptive name for easy identification
Using Your API Key
Include your API key in the X-Api-Key header for every request:
API Key Management
- Maximum Keys: Up to 3 active API keys per company
- Rotation: Delete old keys before creating new ones when at the limit
- Security: Keys are hashed and cannot be retrieved after creation
Enhanced Security (mTLS)
For production environments, enable mutual TLS authentication:
- Set
enforceMtls: truewhen creating the API key - Contact support to obtain your client certificates
- Use the mTLS endpoint:
https://mtls-api.snappy.com/public-api
Headers
Body
application/json
Create API key request body.
The permissions of the API key.
Available options:
gifts:create, gifts:create:demo, gifts:update, gifts:read:unmasked, gifts:read:masked, digitalCards:read, orders:create, orders:cancel, orders:read:unmasked, orders:read:masked, campaigns:create, campaigns:update, campaigns:read, collections:read, products:read, recipients:create, recipients:update, recipients:read:unmasked, recipients:read:masked, recipients:delete, accounts:create, accounts:read, billingMethods:read, apiKeys:read, apiKeys:create, apiKeys:delete, swag:designs:read, swag:designs:update Response
Ok
API key object.
The permissions of the API key.
Available options:
gifts:create, gifts:create:demo, gifts:update, gifts:read:unmasked, gifts:read:masked, digitalCards:read, orders:create, orders:cancel, orders:read:unmasked, orders:read:masked, campaigns:create, campaigns:update, campaigns:read, collections:read, products:read, recipients:create, recipients:update, recipients:read:unmasked, recipients:read:masked, recipients:delete, accounts:create, accounts:read, billingMethods:read, apiKeys:read, apiKeys:create, apiKeys:delete, swag:designs:read, swag:designs:update Last modified on June 17, 2026