Create a domain API key
Generates a Regular API key (kms_xxx.live_xxx) tied to a verified custom domain.
Use this key to authenticate calls to /send-email/*.
The full key is shown once and cannot be retrieved again — store it securely.
Requires api-keys:create scope.
Authorization
bearerAuth Bearer token authentication. Use a Regular API key for email sending, or an Admin API key for marketing and automation endpoints.
Get your API keys from Settings → API Keys (regular) or Settings → Admin API Keys (admin) in the dashboard.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.keplars.com/api/v1/public/domains/api-keys/create" \ -H "Content-Type: application/json" \ -d '{ "name": "My App Key", "custom_domain_id": "c74cfd4b-32b2-4e2e-ac2b-c2a7fdf6814a" }'{
"success": true,
"message": "string",
"data": {
"api_key": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"key_id": "string",
"name": "string",
"is_active": true,
"expires_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z"
},
"secret_key": "kms_a1b2c3d4.live_e5f6g7h8..."
}
}{
"success": false,
"error": "VALIDATION_ERROR",
"message": "Field 'to' is required"
}{
"success": false,
"error": "VALIDATION_ERROR",
"message": "Field 'to' is required"
}{
"success": false,
"error": "VALIDATION_ERROR",
"message": "Field 'to' is required"
}{
"success": false,
"error": "VALIDATION_ERROR",
"message": "Field 'to' is required"
}Add custom domain POST
Register a custom sending domain and receive the DNS records required for verification. Requires `domains:manage` scope. After adding the domain, poll `GET /api/v1/public/domains/domain-status/{domainID}` until `verification_status` is `verified`.
Delete domain DELETE
Permanently removes a custom domain from your workspace and disables all associated sending configuration. This action is irreversible. Requires `domains:manage` scope.