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.

Suspended for an expired registration (status expired): setting is_active or switching to a different provider is refused with 409 — only renewing the domain at your registrar lifts the suspension, and the domain and its endpoints are then reactivated automatically (see Check again). Updating the provider_config credentials of the same provider is still allowed — e.g. replace an expired Cloudflare API token so the platform can read the Cloudflare Registrar record again.

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.
is_active boolean
Switch the domain on (true) or off (false).
plan_access string
Admin-only marker. Non-admin updates ignore this.

Response (200 OK)

{"ok": true} (an empty 200 when the body changed nothing). Read the updated domain back from /domains/available.

Errors

400 Bad Request
Invalid JSON, provider-credential validation failure.
401 Unauthorized
Missing auth.
404 Not Found
Domain doesn't exist or belongs to another account.
409 Conflict
code: "domain_expiry_suspended" — the domain is suspended because its registration expired, so it can't be switched on by hand or moved to a different DNS provider. Renew it at your registrar; it is reactivated automatically.
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/019bd08f-98db-71b2-8e54-f518d319f111" \ -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("019bd08f-98db-71b2-8e54-f518d319f111", { "provider_config": json.dumps({ "api_token": "<new-token>", "zone_id": "<zone-id>", }), })
Response — 200 OK
{ "ok": true }
Was this helpful?
On this page
Update Custom Domain
Was this helpful?