DNS Management
Full CRUD operations on DNS records for your Conway Domains.
All DNS endpoints require authentication and domain ownership.
List DNS Records
curl https://domain.conway.tech/domains/mysite.io/dns \
-H "Authorization: Bearer eyJ..."{
"records": [
{
"recordId": "rec_abc123",
"type": "A",
"host": "@",
"value": "1.2.3.4",
"ttl": 3600
},
{
"recordId": "rec_def456",
"type": "CNAME",
"host": "www",
"value": "mysite.io",
"ttl": 3600
}
],
"source": "live"
}Results are cached for 2 minutes. The source field indicates whether the response came from live, cache, or stale (fallback when the registrar is unreachable).
Add a DNS Record
curl -X POST https://domain.conway.tech/domains/mysite.io/dns \
-H "Authorization: Bearer eyJ..." \
-H "Content-Type: application/json" \
-d '{
"type": "A",
"host": "@",
"value": "1.2.3.4",
"ttl": 3600
}'{ "recordId": "rec_abc123" }Supported Record Types
| Type | Description | Example Value |
|---|---|---|
A | IPv4 address | 1.2.3.4 |
AAAA | IPv6 address | 2001:db8::1 |
CNAME | Canonical name | mysite.io |
MX | Mail exchange | mail.mysite.io |
TXT | Text record | v=spf1 include:_spf.google.com ~all |
SRV | Service record | 0 5 5269 xmpp.mysite.io |
CAA | Certificate authority | 0 issue "letsencrypt.org" |
NS | Name server | ns1.custom.com |
Record Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | One of: A, AAAA, CNAME, MX, TXT, SRV, CAA, NS |
host | string | Yes | Hostname (@ for root, www, mail, etc.) |
value | string | Yes | Record value |
ttl | integer | No | TTL in seconds, 300-86400 (default: 3600) |
distance | integer | No | Priority for MX records |
Update a DNS Record
curl -X PUT https://domain.conway.tech/domains/mysite.io/dns/rec_abc123 \
-H "Authorization: Bearer eyJ..." \
-H "Content-Type: application/json" \
-d '{ "value": "5.6.7.8" }'{ "success": true }All fields are optional -- only include the ones you want to change.
Delete a DNS Record
curl -X DELETE https://domain.conway.tech/domains/mysite.io/dns/rec_abc123 \
-H "Authorization: Bearer eyJ..."{ "success": true }Example: Deploy and Connect
A common pattern is deploying an app to Conway Cloud and pointing a domain at it:
# 1. Create a sandbox and deploy your app
sandbox_create { name: "my-app", vcpu: 2, memory_mb: 2048 }
sandbox_exec { sandbox_id: "...", command: "git clone ... && npm start" }
sandbox_expose_port { sandbox_id: "...", port: 3000, subdomain: "my-app" }
# 2. Register a domain
# POST /domains/register { domain: "myapp.dev" }
# 3. Point the domain at your sandbox
# POST /domains/myapp.dev/dns
# { type: "CNAME", host: "@", value: "my-app.life.conway.tech" }