Add custom domain
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.
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/add-domain" \ -H "Content-Type: application/json" \ -d '{ "domain": "mail.yourapp.com" }'{
"success": true,
"message": "Success",
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"domain": "string",
"verification_status": "pending",
"mail_from_status": "string",
"region": "us-east-1",
"dns_records": [
{
"type": "TXT",
"name": "keplars._domainkey.example.com",
"value": "string",
"priority": 0
}
],
"registrar": "string",
"dns_provider": "string"
}
}{
"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"
}Unenroll contact from automation DELETE
Remove a contact from an active automation. Requires `automations:write` scope.
Create a domain API key POST
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.