Skip to main content

POST /api-keys

Create a new API key scoped to a verified domain.

Authentication

JWT (Dashboard)

Request Body

FieldTypeRequiredDescription
domainIdstring (UUID)YesDomain to scope the key to
keyNamestringYesDisplay name for the key
permissionsstring[]NoPermissions (default: ["send"])

Response

{
  "success": true,
  "data": {
    "apiKey": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "key": "snd_abc123_xyz789secretpart",
      "key_prefix": "snd_abc123",
      "key_name": "Production",
      "permissions": ["send"],
      "created_at": "2026-03-07T12:00:00Z"
    }
  },
  "message": "API key created successfully. Save it securely - it will not be shown again."
}
The full API key is only returned once at creation. Store it securely — you cannot retrieve it later.

Errors

StatusErrorCause
400Domain not verifiedDomain must be verified before creating keys
400Duplicate nameKey name must be unique per user