/v1/deployments/{uid}/custom-domains/{domain_uid}Removes the custom domain. It disappears from
List custom domains immediately, and its route is
torn down by a delete_custom_domain operation. If it was the deployment's primary
domain, public_url goes back to the platform hostname, and URL-derived environment
variables are rewritten and re-applied.
This is asynchronous. It returns 202 Accepted with an operation_id. See
Get an operation.
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Path parameters
uidstringRequiredThe deployment's uid.
domain_uidstringRequiredThe custom domain's uid.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
X-IdempotencystringOptional key that makes retries safe. Repeating a request with a key already used for
the same action on the same deployment returns the original operation with 200 OK and
is_replay: true instead of queuing it again. Reusing it for a different action or
deployment returns 409 with action: idempotency_key_reused.
Response
The domain was removed and the route teardown was queued.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Empty when verifying a domain that is already active.
statusstringRequiredStatus of the operation. queued for a new request, succeeded for a domain that is already active, and the original operation's status on a replay.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the server-sent events stream with the operation's progress. Empty when operation_id is empty.
is_replaybooleanRequiredtrue when an X-Idempotency key was reused and the original operation is returned instead of a new one.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Response
Replay. The X-Idempotency key was already used for this action on this domain, so the original operation is returned and nothing is queued.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredUID of the queued operation. Empty when verifying a domain that is already active.
statusstringRequiredStatus of the operation. queued for a new request, succeeded for a domain that is already active, and the original operation's status on a replay.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the server-sent events stream with the operation's progress. Empty when operation_id is empty.
is_replaybooleanRequiredtrue when an X-Idempotency key was reused and the original operation is returned instead of a new one.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Errors
| Status | Meaning |
|---|---|
400 | The app has never been deployed. |
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | The resource does not exist or you cannot access it. |
409 | The X-Idempotency key was already used for a different action or a different resource. Send a new key. |
Errors use the standard error format.