Update Custom Domain

PUT /v1/domains/self/{uuid}

Update settings on an existing custom domain — most commonly to rotate DNS-provider credentials when the underlying API token has been refreshed. The domain name itself can't be changed; if you need a different name, register a new one and migrate.

New provider_config is validated against the provider before being persisted (same path as create) — bad credentials return 400 with the specific error.

Subject to the same 10-mutations/min/user rate limit as the rest of /domains/self.

Path parameters

uuid string (uuid) Req
Domain UUID. Get from /domains/available.

Request body

provider string
New DNS provider slug. Switching providers also requires a fresh provider_config.
provider_config string (json)
JSON-encoded credentials. Same schema as on create. Encrypted at rest. Validated against the provider before persisting — bad credentials are rejected with the provider's error.
plan_access string
Admin-only marker. Non-admin updates ignore this.

Response (200 OK)

Returns the updated domain — same shape as domain list entries.

Errors

400 Bad Request
Invalid JSON, provider-credential validation failure.
401 Unauthorized
Missing auth.
404 Not Found
Domain doesn't exist or doesn't belong to the calling user.
429 Too Many Requests
Rate limit hit (10 mutations/min/user).
502 Bad Gateway
Couldn't reach the provider for validation.
Request — rotate Cloudflare token
curl -X PUT "https://api.ngris.com/v1/domains/self/<uuid>" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "provider_config": "{\"api_token\":\"<new-token>\",\"zone_id\":\"<zone-id>\"}" }'
Python
import json from ngris import Ngris client = Ngris(api_key="<your_api_key>") client.domains.update("<domain_uuid>", { "provider_config": json.dumps({ "api_token": "<new-token>", "zone_id": "<zone-id>", }), })
Response — 200 OK
{ "id": 42, "uuid": "9f1a3c00-...", "name": "example.com", "provider": "cloudflare", "is_active": true, "updated_at": "2026-04-29T13:00:00Z" }
On this page
Update Custom Domain
Iris