def verify(reattempt: false, timeout: nil)def verify: (
?reattempt: bool?,
?timeout: seconds?
) -> custom_domain_resource?Runs a single verification pass against the DNS you published. A domain that is not ready yet is not an error: the call returns the new status and failureReason, so branch on status instead of on whether the call raised.
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 returns 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
require "envless/sdk"
domain = Envless.workspace.domain.verify
if domain && domain[:status] != "active"
puts "#{domain[:status]} #{domain[:failureReason]}"
puts domain[:retryAfterSeconds]
endParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
reattempt: | bool | No | Forces a fresh certificate attempt after a failure instead of only re-reading the current state. |
timeout: | Integer | Float | Rational | No | Seconds 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
custom_domain_resource reflecting the pass just run, or nil 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.
reattemptis always sent, defaulting to false when you omit it.- Status 409 with
domain.attempt_limitis 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 TypeScript
envless.workspace.domain.verify()
The same method in @goenvless/sdk, with the same request, retries and errors.