Skip to main content
For what these endpoints do, see Caddy. They take a signed-in session (see API overview); API tokens can’t hold integrations.manage, so with a token only the zones.read endpoints work.

Endpoints

A Caddy

Give either addresses (A/AAAA) or target (a CNAME), not both. On PATCH, fields left out keep their value, and an absent api_password keeps the stored one ("" removes it). interval_secs is 15 to 86400. Answers never include the password; they have has_password instead, plus enabled, last_read_at, last_sync_at, last_error, record_count (records the Caddy keeps in DNS), summary (counts per outcome) and last_plan (the hostnames of the last read). check takes the same body, plus caddy_id to use a saved Caddy’s password when none is given.

Plans

plan and sync return the hostnames with what happens to each:
status is ok (in DNS already), add, update, remove (left Caddy’s config), stale (left it, kept because the Caddy only adds), taken (records made by hand or by another Caddy) or skipped; reason says why for the last three. sync also returns added, removed and the Caddy. When the Caddy can’t be read, plan, sync and check answer 502 with "code": "caddy_unreachable" and the reason.

Records

Records come back with "caddy_id": the Caddy that keeps them, or null for records made by hand (see Records). Changing a record with PATCH /api/records/{id} clears it, so the Caddy leaves that record alone from then on.