/v1/vms/{uid}/domains/{domain_uid}/verifyChecks the domain's DNS records against its authoritative nameserver and, if they match,
queues an expose operation that issues a TLS certificate and routes the domain to the
VM's app port. The domain stays pending until that operation finishes and becomes
active.
The CNAME must point to the VM's app_hostname, and the TXT record at
rumpty-challenge.<domain_name> must equal verification_txt. If either check fails,
the domain is marked failed with the reason in last_error, and the request returns
400 with the same message.
Calling this again is safe:
- If you resend an
X-Idempotencykey already used to verify a domain on this VM, that operation is returned with200andX-Idempotency-Replay: true. Reusing the key for another domain returns409withaction: idempotency_key_reused. - If the domain is already
active, you get202withstatus: succeeded, an emptyoperation_idandis_replay: false, and nothing is queued. - If a verification queued in the last 15 minutes is still running, that operation is
returned with
202andis_replay: falseinstead of a new one.
Otherwise 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 VM'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 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
DNS checks passed and the expose operation was queued, or an existing result was returned.
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. succeeded for a domain that is already active.
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 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_completedbooleanRequiredtrue when a replayed operation has already finished.
Response
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.
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. succeeded for a domain that is already active.
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 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_completedbooleanRequiredtrue when a replayed operation has already finished.
Errors
| Status | Meaning |
|---|---|
400 | DNS verification failed or the domain is a root domain. Example DNS messages: CNAME record has not propagated or does not point to <app_hostname>, verification TXT record not found or does not match: <verification_txt>, unable to locate authoritative DNS nameservers for domain. |
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 operation. |
Errors use the standard error format.