/v1/deployments/{uid}/custom-domains/{domain_uid}/verifyChecks the domain's DNS records against its authoritative nameserver and, if they match,
queues a verify_custom_domain operation that issues a TLS certificate and routes the
domain to the deployment. The domain stays pending until that operation finishes and
becomes active.
As soon as the checks pass, the deployment's custom_domain and public_url switch to
this domain. Environment variables that were seeded from the public URL (as one-click apps
do) are rewritten to the new domain and re-applied if the app is live.
If a DNS check fails, the domain is marked failed with the reason in last_error, and
the request returns 400 with the same message. The app must have been deployed first.
Calling this again is safe:
- If the domain is already
active, you getstatus: succeededwith an emptyoperation_idand nothing is queued. - If a verification queued in the last 15 minutes is still running, that operation is returned instead of a new one.
Otherwise this is asynchronous and 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 deployment'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 key that makes retries safe. Repeating a request with a key already used for
the same action on the same deployment returns the original operation with 200 OK and
is_replay: true instead of queuing it again. Reusing it for a different action or
deployment returns 409 with action: idempotency_key_reused.
Response
DNS checks passed and the routing 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. queued for a new request, succeeded for a domain that is already active, and the original operation's status on a replay.
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 X-Idempotency key was reused and the original operation is returned instead of a new one.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Response
Replay. The X-Idempotency key was already used for this action on this domain, so the original 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. queued for a new request, succeeded for a domain that is already active, and the original operation's status on a replay.
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 X-Idempotency key was reused and the original operation is returned instead of a new one.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Errors
| Status | Meaning |
|---|---|
400 | DNS verification failed, the domain is a root domain, or the app is not deployed yet (deploy the app before verifying a custom domain, deployment does not have a default hostname yet). Example DNS messages: CNAME record has not propagated or does not point to <hostname>, verification TXT record not found or does not match: <verification_txt>. |
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 action or a different resource. Send a new key. |
Errors use the standard error format.