# Domains
Domains are used to send emails from your help desk account.
This endpoint allows you to manage all the domains available in the account.
# The domain object
id integer
The system-generated ID of the domain.
account_id string
The account id where the domain belongs to.
domain string
The domain name.
subdomain string
The subdomain part of the domain name.
verified boolean
Whether the domain name is verified with at least one DNS record.
dns_records array
The domain DNS records to be added to the domain's DNS for verification and email delivery.
Show child attributesdns_records.* object
The list of DNS records.
Show child attributes*.label string
The label of the DNS record. For example, DKIM.
*.type string
The type of the DNS record. For example, whether it is a TXT or CNAME record.
*.hostname string
The hostname of the DNS record.
*.value string
The value of the DNS record.
*.verified boolean
Whether the DNS record has been successfully configured and verified.
created_at string
The timestamp when the domain was created.
updated_at string
The timestamp when the domain was last updated.
# The domain object
{
"id": 1,
"account_id": 1,
"domain": "example.org",
"subdomain": null,
"verified": true,
"dns_records": [
{
"label": "DKIM",
"type": "TXT",
"hostname": "653216321fh._domainkey",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQK...",
"verified": false
}
],
"updated_at": "2019-04-25T17:51:31+00:00",
"created_at": "2019-04-25T17:51:31+00:00"
}
# Create a domain
domain string
The domain name.
# Sample request
curl https://www.yourdomain.com/api/v1/accounts/1/domains \
--request POST \
-H "Accept: application/json" \
-H "Authorization: Bearer <access-token>" \
-d domain="example.org"
# Sample successful response
{
"data": {
"id": 1,
"account_id": 1,
"domain": "example.org",
"subdomain": null,
"verified": true,
"dns_records": [
{
"label": "DKIM",
"type": "TXT",
"hostname": "653216321fh._domainkey",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQK...",
"verified": false
}
],
"updated_at": "2019-04-25T17:51:31+00:00",
"created_at": "2019-04-25T17:51:31+00:00"
}
}
# Retrieve a domain
# Sample request
curl https://www.yourdomain.com/api/v1/accounts/1/domains/1 \
-H "Accept: application/json" \
-H "Authorization: Bearer <access-token>" \
-G
# Sample successful response
{
"data": {
"id": 1,
"account_id": 1,
"domain": "example.org",
"subdomain": null,
"verified": true,
"dns_records": [
{
"label": "DKIM",
"type": "TXT",
"hostname": "653216321fh._domainkey",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQK...",
"verified": false
}
],
"updated_at": "2019-04-25T17:51:31+00:00",
"created_at": "2019-04-25T17:51:31+00:00"
}
}
# Update a domain
domain string
The domain name.
# Sample request
curl https://www.yourdomain.com/api/v1/accounts/1/domains/1 \
--request PUT \
-H "Accept: application/json" \
-H "Authorization: Bearer <access-token>" \
-d domain="example.net"
# Sample successful response
{
"data": {
"id": 1,
"account_id": 1,
"domain": "example.net",
"subdomain": null,
"verified": true,
"dns_records": [
{
"label": "DKIM",
"type": "TXT",
"hostname": "653216321fh._domainkey",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQK...",
"verified": false
}
],
"updated_at": "2019-04-25T17:51:31+00:00",
"created_at": "2019-04-25T17:51:31+00:00"
}
}
# Delete a domain
# Sample request
curl https://www.yourdomain.com/api/v1/accounts/1/domains/1 \
--request DELETE \
-H "Accept: application/json" \
-H "Authorization: Bearer <access-token>"
If successful, the above request will return an empty response with 204
HTTP status code.
# List all domains
# Sample request
curl https://www.yourdomain.com/api/v1/accounts/1/domains \
-H "Accept: application/json" \
-H "Authorization: Bearer <access-token>" \
-G
# Sample successful response
{
"data": [
{
"id": 1,
"account_id": 1,
"domain": "example.net",
"subdomain": null,
"verified": true,
"dns_records": [
{
"label": "DKIM",
"type": "TXT",
"hostname": "653216321fh._domainkey",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQK...",
"verified": false
}
],
"updated_at": "2019-04-25T17:51:31+00:00",
"created_at": "2019-04-25T17:51:31+00:00"
},
{...}
]
}
# Verify domain DNS records
# Sample request
curl https://www.yourdomain.com/api/v1/accounts/1/domains/1/verify-dns \
--request POST \
-H "Accept: application/json" \
-H "Authorization: Bearer <access-token>" \
-G
# Sample successful response
{
"data": {
"id": 1,
"account_id": 1,
"domain": "example.org",
"subdomain": null,
"verified": true,
"dns_records": [
{
"label": "DKIM",
"type": "TXT",
"hostname": "653216321fh._domainkey",
"value": "k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQK...",
"verified": true
}
],
"updated_at": "2019-04-25T17:51:31+00:00",
"created_at": "2019-04-25T17:51:31+00:00"
}
}