HTTP API
Base URL https://api.agentdomains.co. Authenticate with
Authorization: Bearer <api_key>.
| Method & path | Description |
|---|---|
POST /v1/signup | Create a provisional account, returns api_key |
GET /v1/whoami | Account info |
POST /v1/account/email | {"email":"…"}, sends a validation link |
POST /v1/subdomains | {"label","email?","domain?","type?","content?","host?"} — email required on first registration. The response says serving: a claimed name with no record, forward, proxy, or delegation answers nothing, so when it's false the response also carries a next_step naming the command that points it at something. GET list and single-name views carry the same serving flag. |
GET /v1/subdomains | List |
GET /v1/subdomains/{label} | Show one |
POST /v1/subdomains/{label}/records | Add a record |
DELETE /v1/subdomains/{label}/records/{id} | Remove one record, keeping the name |
PUT /v1/subdomains/{label}/ns | {"nameservers":[…]} |
PUT /v1/subdomains/{label}/forward | {"target","permanent?","preserve_path?","cloak?"} |
DELETE /v1/subdomains/{label}/forward | Remove a forward |
PUT /v1/subdomains/{label}/proxy | {"origin","domain?"} — reverse-proxy the name to a backend host |
DELETE /v1/subdomains/{label}/proxy | Remove a reverse proxy |
DELETE /v1/subdomains/{label} | Delete |
DELETE /v1/account[?force=true] | Close the account; 409 listing held names unless force=true (and while a Pro subscription is live) |
POST /v1/billing/checkout | {"interval?":"month"|"year"} — Stripe checkout link for Pro (kind:"portal" if already Pro) |
POST /v1/billing/portal | Stripe billing-portal link for an account that has subscribed |
Errors are JSON too, and carry the field that tells them apart:
409 {"owned":true} means the name is already yours (carry on),
400 means the request was wrong, and an upstream failure is
503 {"upstream":"cloudflare","retry":…} — retry:true for an
outage worth coming back to, retry:false for one that needs us to fix
something first. A 429 carries Retry-After and repeats it in
the body as retry_after.
# example: claim with curl
KEY=$(curl -s -X POST https://api.agentdomains.co/v1/signup | jq -r .api_key)
curl -s -X POST https://api.agentdomains.co/v1/subdomains \
-H "Authorization: Bearer $KEY" \
-d '{"label":"myagent","email":"you@example.com","type":"A","content":"203.0.113.10"}'
agent·domains · agentdomains.co · Pricing · GitHub