Skip to main content

Create Domain

curl -X POST https://api.sendook.com/v1/domains \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "yourdomain.com"
  }'
Add a custom domain to your organization. After creating a domain, you must configure DNS records and verify the domain before using it with inboxes.

Request Body

name
string
required
The domain name. Must be a valid domain format.Example: "yourdomain.com"Valid formats:
  • domain.com
  • subdomain.domain.com
  • mail.company.co.uk

Response

id
string
Unique identifier for the domain.
organizationId
string
ID of the organization that owns this domain.
name
string
The domain name.
verified
boolean
Whether the domain has been verified. Will be false initially.
records
array
Array of DNS record verification status objects.
createdAt
string
ISO 8601 timestamp of when the domain was created.
updatedAt
string
ISO 8601 timestamp of when the domain was last updated.

Error Responses

400 Bad Request
  • "Invalid domain name format" - The domain name format is invalid

List Domains

curl https://api.sendook.com/v1/domains \
  -H "Authorization: Bearer YOUR_API_KEY"
Retrieve all domains for your organization.

Response

Returns an array of domain objects.
id
string
Unique identifier for the domain.
organizationId
string
ID of the organization that owns this domain.
name
string
The domain name.
verified
boolean
Whether the domain has been verified.
records
array
Array of DNS record verification status objects.
createdAt
string
ISO 8601 timestamp of when the domain was created.
updatedAt
string
ISO 8601 timestamp of when the domain was last updated.

Get Domain

curl https://api.sendook.com/v1/domains/yourdomain.com \
  -H "Authorization: Bearer YOUR_API_KEY"
Retrieve a specific domain by its name.

Path Parameters

domainId
string
required
The domain name (used as the identifier).Example: "yourdomain.com"

Response

id
string
Unique identifier for the domain.
organizationId
string
ID of the organization that owns this domain.
name
string
The domain name.
verified
boolean
Whether the domain has been verified.
records
array
Array of DNS record verification status objects.
createdAt
string
ISO 8601 timestamp of when the domain was created.
updatedAt
string
ISO 8601 timestamp of when the domain was last updated.

Error Responses

404 Not Found
  • "Domain not found" - The domain doesn’t exist or doesn’t belong to your organization

Get DNS Records

curl https://api.sendook.com/v1/domains/yourdomain.com/dns \
  -H "Authorization: Bearer YOUR_API_KEY"
Get the required DNS records that need to be configured for domain verification. Add these records to your domain’s DNS settings.

Path Parameters

domainId
string
required
The domain name.Example: "yourdomain.com"

Response

Returns an array of DNS record objects that must be added to your domain.
type
string
The DNS record type.Values: MX, TXT, CNAME
name
string
The DNS record name/host.
  • @ represents the root domain
  • For subdomains, this will be the subdomain prefix
  • For DKIM records, this will be a specific token subdomain
value
string
The DNS record value/target.
priority
number
Priority value for MX records.Only present for MX records.

DNS Records Explained

Purpose: Routes incoming emails to AWS SESConfiguration:
  • Type: MX
  • Name: @ (or subdomain prefix)
  • Value: inbound-smtp.us-east-2.amazonaws.com
  • Priority: 10
Purpose: Prevents email spoofing by authorizing AWS SES to send emails from your domainConfiguration:
  • Type: TXT
  • Name: @ (or subdomain prefix)
  • Value: v=spf1 include:amazonses.com ~all
Purpose: Defines how receiving servers should handle emails that fail authenticationConfiguration:
  • Type: TXT
  • Name: _dmarc (or _dmarc.subdomain)
  • Value: v=DMARC1; p=reject;
Purpose: Digital signature verification to prove emails are authentic and unmodifiedConfiguration:
  • Type: CNAME
  • Name: [token]._domainkey.yourdomain.com
  • Value: [token].dkim.amazonses.com
Multiple DKIM records will be provided (typically 3).

Error Responses

400 Bad Request
  • "Failed to get DKIM attributes" - Unable to retrieve DKIM tokens from AWS SES
404 Not Found
  • "Domain not found" - The domain doesn’t exist or doesn’t belong to your organization

Verify Domain

curl -X POST https://api.sendook.com/v1/domains/yourdomain.com/verify \
  -H "Authorization: Bearer YOUR_API_KEY"
Verify that the required DNS records have been properly configured. This checks AWS SES to confirm domain verification status.
DNS changes can take up to 48 hours to propagate. If verification fails, wait and try again later.

Path Parameters

domainId
string
required
The domain name to verify.Example: "yourdomain.com"

Response

Returns the updated domain object with verification status.
id
string
Unique identifier for the domain.
organizationId
string
ID of the organization that owns this domain.
name
string
The domain name.
verified
boolean
Whether the domain has been successfully verified.Will be true if verification succeeded, false otherwise.
records
array
Array of DNS record verification status objects showing which records passed or failed verification.
createdAt
string
ISO 8601 timestamp of when the domain was created.
updatedAt
string
ISO 8601 timestamp of when the domain was last updated.

Error Responses

404 Not Found
  • "Domain not found" - The domain doesn’t exist or doesn’t belong to your organization

Delete Domain

curl -X DELETE https://api.sendook.com/v1/domains/yourdomain.com \
  -H "Authorization: Bearer YOUR_API_KEY"
Delete a custom domain from your organization.
Deleting a domain will prevent any inboxes using this domain from sending or receiving emails. Make sure to update or delete affected inboxes first.

Path Parameters

domainId
string
required
The domain name to delete.Example: "yourdomain.com"

Response

Returns the deleted domain object.
id
string
Unique identifier for the deleted domain.
organizationId
string
ID of the organization that owned this domain.
name
string
The domain name.
verified
boolean
Whether the domain was verified before deletion.
records
array
Array of DNS record verification status objects.
createdAt
string
ISO 8601 timestamp of when the domain was created.
updatedAt
string
ISO 8601 timestamp of when the domain was last updated.

Error Responses

404 Not Found
  • "Domain not found" - The domain doesn’t exist or doesn’t belong to your organization

Build docs developers (and LLMs) love