Endpoints
History
GET /api/zones/{id}/versions
string
ui, cli, api, dns_update, ddns, acme, caddy, traefik, proxy or transfer.integer
Change requests of this zone waiting for approval.
?before=<version> (and limit, up to 500). GET …/versions/{version} adds what the
version changed:
before when the record was added and no after when it was removed. Records carry
every field of the record format. settings is {"before": {...}, "after": {...}}
of enabled, default_ttl, forward_missing and dnssec when those changed.
GET /api/zones/{id}/diff?from=10&to=14 answers the same changes and settings between two
versions, with summary and the added, removed and changed counts. Leave out to to compare
with the zone as it is now. A version that isn’t kept any more answers 400.
Roll back
POST /api/zones/{id}/rollback
integer
required
The zone becomes as it was right after this version.
Edits that wait for approval
When an approval policy covers the caller, these writes are not applied:POST /api/zones/{id}/records,PATCHandDELETE /api/records/{id}POST /api/zones/{id}/records/bulkPATCH /api/zones/{id}POST /api/zones/{id}/importwithapplyPOST /api/zones/{id}/rollback
202 Accepted with a Location header:
202 when approval is in use.
Follow a change request
GET /api/changes/{id} returns the change_request object, plus comments. API tokens may call
it. Poll it until status is no longer pending:
A Cloudflare copy into an existing zone, which can take several zones at once, answers
200 with
"status": "pending" and change_request_id for each zone instead.
Decide
POST /api/changes/{id}/approve with an optional {"comment": "…"} applies the change as a whole,
checked against the zone as it is now. On a conflict it answers 409 with the reason, applies
nothing, and the request stays pending. POST /api/changes/{id}/reject needs {"comment": "why"}.
Both need a signed-in person with changes.approve, other than who asked; API tokens get 400.
Policies
mode is inherit (the division’s policy), on with its own roles and tokens, or off.
GET on either path also lists the roles and the division’s tokens to pick from.