Skip to content

Delete a custom domain

DELETE/v1/vms/{uid}/domains/{domain_uid}

Removes the custom domain. It disappears from List custom domains immediately. Its route is torn down by an unexpose operation.

This is asynchronous. It returns 202 Accepted with an operation_id. See Get an operation. Send an X-Idempotency key to make retries safe: a retry with the same key returns the original operation with 200, even though the domain is already gone. Without a key, a retry returns 404 (custom domain not found).

The key is tied to the domain: reusing it for another domain returns 409 with action: idempotency_key_reused.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The VM's uid.

domain_uidstringRequired

The custom domain's uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

X-Idempotencystring

Optional unique key for this request, such as a UUID. Leading and trailing spaces are ignored. If you send a key you already used for the same action on the same resource, the original operation is returned with 200 OK and X-Idempotency-Replay: true, and nothing new is queued. The replay check runs before the resource is loaded or its state is checked, so a retry gets the original result even after the action has finished. Reusing a key for a different action, resource type or resource returns 409 with action: idempotency_key_reused. Keys are shared across the workspace. Without a key, every request is treated as new.

Response

202

The domain was removed and the route teardown was queued.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
operation_idstringRequired

UID of the queued operation. Empty when verifying a domain that is already active.

statusstringRequired

Status of the operation. succeeded for a domain that is already active.

One ofqueuedrunningsucceededfailed

events_urlstringRequired

Path of the server-sent events stream with the operation's progress. Empty when operation_id is empty.

is_replaybooleanRequired

true when an existing operation was returned for a reused X-Idempotency key. false when a verify returns an already-active domain or an in-flight verification.

is_completedbooleanRequired

true when a replayed operation has already finished.

Response

200

Replay. The X-Idempotency key was already used for this kind of custom domain action on this VM, so the existing operation is returned and nothing is queued.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
operation_idstringRequired

UID of the queued operation. Empty when verifying a domain that is already active.

statusstringRequired

Status of the operation. succeeded for a domain that is already active.

One ofqueuedrunningsucceededfailed

events_urlstringRequired

Path of the server-sent events stream with the operation's progress. Empty when operation_id is empty.

is_replaybooleanRequired

true when an existing operation was returned for a reused X-Idempotency key. false when a verify returns an already-active domain or an in-flight verification.

is_completedbooleanRequired

true when a replayed operation has already finished.

Errors

StatusMeaning
400The request was malformed or failed validation.
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.
409The X-Idempotency key was already used for a different operation.

Errors use the standard error format.