Workspace

envless.workspace.domain.verify()

Run one verification pass on the domain

ts
domain.verify(options?: DomainVerifyOptions): Promise<CustomDomainResource | null>

Runs a single verification pass against the DNS you published. A domain that is not ready yet is not an error: the promise resolves with the new status and failureReason, so branch on status instead of on whether the call rejected.

Verification is two staged. The Envless ownership TXT record has to resolve first, and only then is the certificate requested and its own validation records appear in records. A full setup therefore needs at least two calls with a DNS publish between them.

Calls are debounced. Verifying inside the window resolves the current state untouched and retryAfterSeconds says when the next real attempt is allowed. Attempts are also capped, and once the cap is spent the only way forward is to remove the domain and claim it again.

Example

ts
const domain = await envless.workspace.domain.verify()

if (domain?.status !== 'active') {
    console.log(domain?.status, domain?.failureReason, domain?.retryAfterSeconds)
}

Parameters

ParameterTypeRequiredDescription
options.reattemptbooleanNoForces a fresh certificate attempt after a failure instead of only re-reading the current state.
options.signalAbortSignalNoCancels the request.

Returns

CustomDomainResource reflecting the pass just run, or null when the API returns no domain.

Worth knowing

  • This method takes only options. There is no positional hostname, because the domain is whichever one the workspace claimed.
  • reattempt is always sent, defaulting to false when you omit it.
  • Status 409 with domain.attempt_limit is terminal for that claim. Remove the domain and claim it again.

Required scopes

workspace:write

Underlying endpoint

POST /workspace/domain/verify

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

In Python

envless.workspace.domain.verify()

The same method in envless-sdk, the Python SDK, with the same request, retries and errors.

In Ruby

Envless.workspace.domain.verify

The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.

In PHP

$envless->workspace->domain->verify()

The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.