Return to Homepage

Create Record

http
POST /dns/{domain}/records

Parameters

Field Type Required Default Description
name string Yes Record name: www, mail.sub, @ for the domain itself, or a full name ending in a dot
type string Yes Record type: A, AAAA, CNAME, MX, TXT, NS, SRV or CAA (the types staff allow)
content string Yes Record value. MX is priority host (10 mail.example.com), SRV priority weight port target (10 5 5060 sip.example.com), CAA flags tag value (0 issue "letsencrypt.org"). TXT values are quoted for you and hostnames get their trailing dot
ttl integer No TTL in seconds (60-86400). It sets the TTL of every record with this name and type; leave it out to keep theirs, or to get our default (1 hour) for a new name and type

Response (201)

json
{
  "id": "3f9c2a71b04d8e65",
  "name": "www.example.com.",
  "display_name": "www",
  "type": "A",
  "content": "1.2.3.4",
  "ttl": 3600
}

Example

bash
curl -X POST -H "Authorization: Bearer crane_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "www", "type": "A", "content": "1.2.3.4", "ttl": 3600}' \
  https://namecrane.org/api/v1/dns/example.com/records

Snagged on something?

Our sysadmins answer tickets around the clock.