Dynamic DNS
http
POST /dns/{domain}/ddns
Replaces all records matching the given name and type with a single record pointing at the IP, with a TTL of 60. Useful for dynamic IP updates; sending an address that hasn’t changed changes nothing. 422 when the address doesn’t fit the type (without ip, the caller’s address is used, so an IPv4 caller can’t set AAAA that way).
Routers don’t call this: they speak DynDNS2, which has its own server and a login per name. See Dynamic DNS for Routers.
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | Yes | Record name (e.g., home, vpn, or @ for the domain itself) |
|
| type | string | No | A | Record type (A or AAAA) |
| ip | string | No | Requester’s IP | IP address to set |
Response
json
{
"message": "DDNS updated.",
"name": "home.example.com.",
"type": "A",
"content": "203.0.113.42",
"ttl": 60
}
Example
bash
curl -X POST -H "Authorization: Bearer crane_..." \
-H "Content-Type: application/json" \
-d '{"name": "home"}' \
https://namecrane.org/api/v1/dns/example.com/ddns