DNS records
Read and change the DNS records of a domain.
These endpoints manage the DNS zone hosted by the registry for your domain. The records are served only while the domain uses the registry's default nameservers. If you point the domain to other nameservers, manage its DNS with that provider instead.
{id} is the domain id from GET /domains/mine. A domain with status pending_profile returns 409 DOMAIN_PENDING_PROFILE.
A domain with no records is not served at all: its nameservers answer REFUSED, and lookups (and certificate checks) fail. Add at least one record for the domain to resolve.
Record types
| Type | content |
|---|---|
A | IPv4 address, for example 203.0.113.10 |
AAAA | IPv6 address, for example 2001:db8::10 |
CNAME | Target hostname, for example example.com |
MX | Priority and mail server, for example 10 mail.example.com |
MXE | Mail record type specific to the registry's DNS. Use MX unless you know you need it. |
TXT | Text without surrounding quotes, for example v=spf1 include:_spf.example.net ~all |
SPF | SPF text (most setups publish SPF as TXT instead) |
List records
/domains/{id}/dnscurl https://api.helipod.io/api/domains/42/dns \
-H "Authorization: Bearer hel_your_key"{
"success": true,
"data": [
{ "prefix": "@", "name": "example.com", "type": "A", "content": "203.0.113.10", "ttl": 3600 },
{ "prefix": "www", "name": "www.example.com", "type": "CNAME", "content": "example.com", "ttl": 3600 }
]
}| Field | Description |
|---|---|
prefix | The record name relative to the domain (@ for the domain itself, www, mail, ...). |
name | The full record name. |
type | Record type. |
content | Record value. |
ttl | Time to live in seconds. |
When you write records, the name field takes the prefix (@, www, _dmarc.mail). A full name is also accepted: www.example.com on example.com is stored as www, and example.com itself as @.
content of TXT records is listed with the quotes the DNS server adds ("v=spf1 ..."). Write it without them; quotes around a value you send back from the list are removed for you.
Set records
/domains/{id}/dnsThis call replaces all existing records with the ones you send. To add one record, read the current list, append the new record and send the full list (using each record's prefix as name).
Prop
Type
curl -X POST https://api.helipod.io/api/domains/42/dns \
-H "Authorization: Bearer hel_your_key" \
-H "Content-Type: application/json" \
-d '{
"records": [
{ "name": "@", "type": "A", "content": "203.0.113.10" },
{ "name": "www", "type": "CNAME", "content": "example.com" },
{ "name": "@", "type": "MX", "content": "mail.example.com", "ttl": 3600 },
{ "name": "@", "type": "TXT", "content": "v=spf1 include:_spf.example.net ~all" }
]
}'{ "success": true, "message": "DNS records created" }Writes to the registry time out after 30 seconds (502 REGISTRAR_ERROR); read the records again before retrying.
If the registry rejects the set (for example a CNAME on a name that already has other records), the response is 422 with code REGISTRAR_REJECTED. Read the records again to see the current state.
Update a record
/domains/{id}/dnsProp
Type
curl -X PUT https://api.helipod.io/api/domains/42/dns \
-H "Authorization: Bearer hel_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "@", "type": "A", "content": "203.0.113.11", "ttl": 600 }'{ "success": true, "message": "DNS record updated" }Use this for a name that has a single record of the given type. When a name has several records of the same type (for example two MX records), use Set records with the full list instead.
Delete a record
/domains/{id}/dnsThe record to delete goes in the JSON body. name, type and content must match the record exactly.
Prop
Type
curl -X DELETE https://api.helipod.io/api/domains/42/dns \
-H "Authorization: Bearer hel_your_key" \
-H "Content-Type: application/json" \
-d '{ "name": "www", "type": "CNAME", "content": "example.com" }'{ "success": true, "message": "DNS record deleted" }Email records
If you send email with Helipod Email from this domain or one of its subdomains (for example mail.example.com), these endpoints list the DNS records that sending domain needs and add the missing ones for you.
/domains/{id}/email-recordscurl https://api.helipod.io/api/domains/42/email-records \
-H "Authorization: Bearer hel_your_key"{
"success": true,
"data": [
{
"id": "3f2a9c4e-1b7d-4e0a-9c55-2d8f6b1a7e10",
"domain": "mail.example.com",
"status": "pending",
"ownershipVerified": true,
"missing": 2,
"conflicts": 1,
"records": [
{ "type": "TXT", "name": "_verify.mail", "host": "_verify.mail.example.com", "content": "eng+YQ4...", "purpose": "Domain ownership verification (TXT)", "state": "present" },
{ "type": "TXT", "name": "mail", "host": "mail.example.com", "content": "v=spf1 include:example-mail.net ~all", "purpose": "SPF", "state": "conflict", "note": "This name already has an SPF record. Merge them into one (a name can only have one SPF)." },
{ "type": "CNAME", "name": "abc._domainkey.mail", "host": "abc._domainkey.mail.example.com", "content": "abc.dkim.example-mail.net", "purpose": "DKIM signing key 1 of 3", "state": "missing" }
]
}
]
}state is present, missing, or conflict (the record cannot be added as is; note says what to change).
/domains/{id}/email-recordsProp
Type
curl -X POST https://api.helipod.io/api/domains/42/email-records \
-H "Authorization: Bearer hel_your_key" \
-H "Content-Type: application/json" \
-d '{ "emailDomainId": "3f2a9c4e-1b7d-4e0a-9c55-2d8f6b1a7e10" }'{
"success": true,
"data": {
"domain": "mail.example.com",
"added": [{ "type": "CNAME", "name": "abc._domainkey.mail" }],
"conflicts": [{ "type": "TXT", "name": "mail", "note": "This name already has an SPF record. Merge them into one (a name can only have one SPF)." }]
}
}Existing records are kept, and records in conflicts are left unchanged. A verification check of the sending domain starts right after. Returns 404 EMAIL_DOMAIN_NOT_FOUND when the sending domain is not part of this domain.
Errors
| Status | code | When |
|---|---|---|
404 | DOMAIN_NOT_FOUND | Unknown or non-numeric domain id, or the domain is not registered at the registry yet. |
409 | DOMAIN_PENDING_PROFILE | The domain waits for owner details. |
422 | VALIDATION_ERROR | Missing field or unsupported record type. |
422 | REGISTRAR_REJECTED | The registry refused the change, for example an invalid record. |
502 | REGISTRAR_ERROR | The registry could not be reached. Retry later. |