Eliminar un dominio propio

Usalo para dar de baja un dominio propio: deja de usarse de inmediato y no se puede deshacer. Requiere el permiso accounts:operate.

DELETE
/custom-domains/{customDomain}

Unregister a custom domain: delete it from Cloudflare, then hard-delete the local row (design.md D6)

Escritura · requiere el permiso accounts:operate.

⚠️ Operación irreversible. No hay papelera ni deshacer: resetear o limpiar un número mata su sesión de WhatsApp (hay que volver a escanear el código), purgar la cola descarta los mensajes encolados sin dejar registro de lo descartado, y los borrados eliminan el recurso.

By design the local row is removed even when the Cloudflare delete call fails (communities must stop treating the hostname as resolvable immediately) — the failure is logged with the cloudflare_id for later manual cleanup of the orphaned Custom Hostname (design.md Risks: "Cloudflare falla el DELETE pero borramos * local"). CloudflareCustomHostnameClient::delete() already logs the raw Cloudflare error before throwing; this method logs the follow-up decision to proceed with the local deletion anyway.

Since Increment 9 (design.md Addendum 5 D35), the Worker Route created in store() is also torn down here, best-effort and INDEPENDENTLY from the Custom Hostname delete (each in its own try/catch — one failing never prevents attempting the other). Guarded by cloudflare_route_id !== null for any row without one (e.g. a theoretical pre-Increment-9 row). The local row is hard-deleted UNCONDITIONALLY, whether or not either Cloudflare call succeeded — orphaned Cloudflare resource ids are logged for later manual cleanup.

Autorización

http
headerAuthorizationBearer <clave>

Parámetros de la ruta

customDomain*integer

Cuerpo de la respuesta

No content

curl -X DELETE "https://example.com/custom-domains/0"
Vacío