Check a domain

Check a domain’s DNS and move it on as far as its records allow. This is the one call that takes a domain from added to serving your site. Poll it after you add the DNS records, until the domain reads active. Propagation can take minutes to hours.

POST https://sitepaste.com/api/v1/public/domains/{domainId}/check

Requires the settings scope.

What a check looks at depends on the domain’s status:

StatusWhat the check does
pending_verificationLooks for the verification TXT record from add a domain. When it is found, the domain moves to pending. The CNAME is not looked at yet.
pending, active, or failedChecks the CNAME and the certificate, and sets the status (and its error note) to what it finds. A domain seen active for the first time starts serving your site.

So a new domain takes at least two checks: one that proves ownership, and one or more that find the CNAME and certificate in place.

Usage

curl -X POST "https://sitepaste.com/api/v1/public/domains/d8qjx2v7mz4r/check" \
  -H "Authorization: Bearer $TOKEN"

Authorizations

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication.

Response

200 OK with the domain in the status the check left it, and its DNS setup instructions. A domain whose ownership was just proved reads pending. Call again until it reads active.

A domain of an apex and www pair is checked together with its other half, so both halves move together.

Errors

CodeMeaning
409verification_failed: the TXT record was not found or does not match, and the domain stays pending_verification. Check the DNS configuration and call again after propagation. Or not_pending_verification: the domain is already past verification. Call again to run the next step.
429Too many checks of this domain. Checks are limited per domain to one every 12 seconds, with a burst of 5.
400{domainId} is malformed, or the domain’s certificate setup is not in place. Remove the domain and add it again.
404The workspace has no domain with that ID.
500The check did not complete. Retry, then re-read the domain to see where it stands.
503dns_lookup_failed: the DNS lookup itself failed. Retry in a few minutes. A 503 without that code means custom domains are unavailable right now. Retry later.