Domains let you send email from your own brand while Sendook manages DNS records like SPF, DKIM, and DMARC. Use these endpoints to automate onboarding flows and domain health checks.
POST/v1/domains{
"name": "agents.example.com"
}
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Fully qualified domain (no protocol). |
201 Created{
"id": "dom_01J3ZG3A4E6R5ZXC9HKN3S4TBQ",
"name": "agents.example.com",
"status": "pending_verification",
"createdAt": "2024-10-10T18:45:13Z"
// ...additional DNS guidance fields may be present
}
After creation, surface the DKIM/SPF instructions from the additional properties returned by the API.
GET/v1/domains200 OK[
{
"id": "dom_01J3ZG3A4E6R5ZXC9HKN3S4TBQ",
"name": "agents.example.com",
"verified": false,
"records": [
{
"type": "MX",
"name": "@",
"value": "inbound-smtp.us-east-2.amazonaws.com",
"status": "pending"
},
{
"type": "TXT",
"name": "@",
"value": "v=spf1 include:amazonses.com ~all",
"status": "pending"
}
],
"createdAt": "2024-10-10T18:45:13Z",
"updatedAt": "2024-10-10T18:45:13Z"
}
]
GET/v1/domains/{domainId}| Parameter | Type | Description |
|---|---|---|
domainId | string | The unique identifier of the domain (for example dom_...). |
200 OK{
"id": "dom_01J3ZG3A4E6R5ZXC9HKN3S4TBQ",
"name": "agents.example.com",
"verified": true,
"records": [
{
"type": "MX",
"name": "@",
"value": "inbound-smtp.us-east-2.amazonaws.com",
"status": "verified"
},
{
"type": "TXT",
"name": "@",
"value": "v=spf1 include:amazonses.com ~all",
"status": "verified"
}
],
"createdAt": "2024-10-10T18:45:13Z",
"updatedAt": "2024-10-10T18:45:13Z"
}
Monitor the verified field to determine when sending is allowed. The records array contains DNS records that need to be configured for domain verification.
GET/v1/domains/{domainId}/dnsReturns the DNS records that need to be configured for domain verification, including MX, SPF, DMARC, and DKIM records.
| Parameter | Type | Description |
|---|---|---|
domainId | string | The unique identifier of the domain. |
200 OK[
{
"type": "MX",
"name": "@",
"value": "inbound-smtp.us-east-2.amazonaws.com"
},
{
"type": "TXT",
"name": "@",
"value": "v=spf1 include:amazonses.com ~all"
},
{
"type": "TXT",
"name": "_dmarc",
"value": "v=DMARC1; p=reject;"
},
{
"type": "CNAME",
"name": "abc123._domainkey.agents.example.com",
"value": "abc123.dkim.amazonses.com"
}
]
DELETE/v1/domains/{domainId}Deleting a domain removes all associated DNS expectations and prevents further sending.
200 OK{
"id": "dom_01J3ZG3A4E6R5ZXC9HKN3S4TBQ",
"name": "agents.example.com",
"verified": false,
"records": [],
"createdAt": "2024-10-10T18:45:13Z",
"updatedAt": "2024-10-10T18:45:13Z"
}
POST/v1/domains/{domainId}/verifyThis endpoint re-runs the verification checks after DNS changes propagate.
200 OK{
"id": "dom_01J3ZG3A4E6R5ZXC9HKN3S4TBQ",
"name": "agents.example.com",
"verified": true,
"records": [
{
"type": "MX",
"name": "@",
"value": "inbound-smtp.us-east-2.amazonaws.com",
"status": "verified"
}
],
"createdAt": "2024-10-10T18:45:13Z",
"updatedAt": "2024-10-10T18:45:13Z"
}
The response returns the updated domain with verification status. Poll GET /v1/domains/{domainId} to observe status changes.