Conway

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

TypeDescriptionExample Value
AIPv4 address1.2.3.4
AAAAIPv6 address2001:db8::1
CNAMECanonical namemysite.io
MXMail exchangemail.mysite.io
TXTText recordv=spf1 include:_spf.google.com ~all
SRVService record0 5 5269 xmpp.mysite.io
CAACertificate authority0 issue "letsencrypt.org"
NSName serverns1.custom.com

Record Parameters

ParameterTypeRequiredDescription
typestringYesOne of: A, AAAA, CNAME, MX, TXT, SRV, CAA, NS
hoststringYesHostname (@ for root, www, mail, etc.)
valuestringYesRecord value
ttlintegerNoTTL in seconds, 300-86400 (default: 3600)
distanceintegerNoPriority 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" }