Workspace

Envless.workspace.domain.remove

Detach the custom domain and certificate

def remove(timeout: nil)

Detaches the custom domain and tears down its certificate. The workspace falls back to its envless.cloud subdomain immediately, which breaks any exposed environment URL built on the custom hostname.

Removing a domain that was never claimed succeeds and does nothing, so this is safe to call defensively in teardown scripts. Unlike the other three domain methods this one returns the payload as sent: a removed_domain_resource, never a domain resource.

If the certificate cannot be detached at the edge the call fails with status 500 and the domain is left in the removing state. Call again to resume from there rather than re-claiming the hostname.

Example

ruby
require "envless/sdk"

result = Envless.workspace.domain.remove

puts result[:removed]

Parameters

ParameterTypeRequiredDescription
timeout:Integer | Float | RationalNoSeconds each attempt of this call may take, redirects and the response body included, before it raises Envless::NetworkError with timeout? set. Overrides the client's timeout for this call, and 0 turns the limit off.

Returns

removed_domain_resource whose removed flag confirms the detach.

Worth knowing

  • After a removal Envless.workspace.domain.get returns nil, the same as a workspace that never claimed a domain.

Required scopes

workspace:write

Underlying endpoint

DELETE /workspace/domain

Request and response schema, every error code, and a live playground.

In TypeScript

envless.workspace.domain.remove()

The same method in @goenvless/sdk, with the same request, retries and errors.