Skip to content
sproutboatDocs
Esc
↑↓navigate↵open⌘Jpreview

Check the DNS proof

Looks the TXT record up through two public resolvers; both must agree. 400 reason explains a miss (the record is not there yet, or the resolvers disagree). One check per domain every 10 seconds (429 verify-cooldown, retry_after_s), and 20 new verifications an hour platform-wide (429 verify-cap). DNS can take minutes to propagate, so poll no faster than the cooldown.

POST/v1/domains/{host}/verify
Authorization
AuthorizationBearer token · headerrequired

A team API key, sbk_..., from Settings, API keys.

or
x-api-keyAPI key · headerrequired

The same key, in a header of its own.

Path parameters
hoststringrequired

A custom domain, lowercase, percent-encoded if needed.

Responses
200

The claim, now verified if the proof was found.

hoststring
statestring
Allowed:pendingverifiedlost
methodstring
Allowed:txtoperator
verified_atstring<date-time> | null
last_checked_atstring<date-time> | null
lost_atstring<date-time> | null
lost_reasonstring | null
created_atstring<date-time>
txtobject | null

The DNS record to publish while the claim is pending (and after a loss, to take the name back). Null once verified.

Show properties
typestring
namestring
valuestring
routesobject[]

The team's apps that route this host.

Show properties
Array of object
projectstring
keystring
400

The DNS proof is not there yet or could not be confirmed (txt-missing, txt-unconfirmed); expected is the record to publish.

One of:
ErrorTxtMissing
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:txt-missing
expectedDnsTxtRecordrequired
Show properties
typestringrequired
namestringrequired
valuestringrequired
detailstringrequired

What the resolvers answered.

ErrorTxtUnconfirmed
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:txt-unconfirmed
expectedDnsTxtRecordrequired
Show properties
typestringrequired
namestringrequired
valuestringrequired
detailstringrequired

What went wrong.

ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
401

No key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
403

The key lacks a grant (reason: forbidden, need: "<resource>:<action>").

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:forbidden
needstringrequired

The grant, as <resource>:<action>, for example app:write.

404

The team has no claim on this hostname (reason: no-claim).

One of:
ErrorNoClaim
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:no-claim
ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
409

Another team holds the name (host-claimed), or the claim changed during the check (claim-changed).

One of:
ErrorHostClaimed
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:host-claimed
ErrorClaimChanged
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:claim-changed
429

One check per domain every 10 seconds (verify-cooldown), 20 new verifications an hour platform-wide (verify-cap), or key-rate-limited. Honor Retry-After.

One of:
ErrorKeyRateLimited
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:key-rate-limited
retry_after_sintegerrequired

Seconds to wait; also the Retry-After header.

ErrorVerifyCooldown
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:verify-cooldown
retry_after_sintegerrequired
ErrorVerifyCap
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:verify-cap
retry_after_sintegerrequired
Request
curl -X POST 'https://dash.sproutboat.com/v1/domains/app.example.com/verify' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "host": "string",
  "state": "pending",
  "method": "txt",
  "verified_at": "2019-08-24T14:15:22Z",
  "last_checked_at": "2019-08-24T14:15:22Z",
  "lost_at": "2019-08-24T14:15:22Z",
  "lost_reason": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "txt": {
    "type": "TXT",
    "name": "_sproutboat-challenge.app.example.com",
    "value": "sproutboat-verify=..."
  },
  "routes": [
    {
      "project": "string",
      "key": "string"
    }
  ]
}