Add DNS Record
Add a new DNS record to a domain.
Request
POST /api/v1/domains/{id}/dns
Required scope: domains:manage
Path Parameters
| Parameter |
Type |
Description |
id |
string |
The domain ID |
Headers
| Header |
Required |
Value |
Authorization |
Yes |
Bearer YOUR_API_KEY |
Content-Type |
Yes |
application/json |
Request Body
| Field |
Type |
Required |
Description |
type |
string |
Yes |
DNS record type. One of: A, AAAA, CNAME, ALIAS, MX, SRV, TXT, CAA, NS, TLSA, SSHFP |
name |
string |
Yes |
Record name (e.g. @ for root, www for subdomain) |
ttl |
number |
Yes |
Time to live in seconds (minimum 60) |
data |
string |
Yes |
Record value (e.g. 1.2.3.4 for an A record) |
Response
{
"data": {
"success": true
}
}
Response Fields
| Field |
Type |
Description |
data.success |
boolean |
Whether the record was created successfully |
Errors
| Status |
Code |
Description |
| 400 |
INVALID_TYPE |
The provided DNS record type is not valid |
| 400 |
INVALID_NAME |
The provided record name is not valid |
| 400 |
INVALID_TTL |
The provided TTL value is not valid (must be at least 60) |
| 400 |
INVALID_DATA |
The provided record data is not valid |
| 404 |
NOT_FOUND |
The domain was not found |
| 502 |
PROVIDER_ERROR |
The DNS provider returned an error |
Example
curl -X POST https://site.quest/api/v1/domains/a1b2c3d4e5f6a1b2c3d4e5f6/dns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "A",
"name": "@",
"ttl": 3600,
"data": "1.2.3.4"
}'
MCP
This action is also available via the add_dns_record MCP tool.