Domain routes: transfer, verify
The Domain Verbs transfer, verify as api.sb routes, with inputs, result, refusals and an example.
Reference for Domain, one group of Domain routes.
Domain.transfer
Transfer moves a Domain’s registration to another holder or registrar, with its records intact. Verb page.
POST /{namespace}/ domains/ {domain}/ transferPath: domain. Body, as JSON: the other inputs. Emits Domain.transferred.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
domain | Domain | required | The Domain to move. |
to | string | required | The receiving holder or registrar. |
kind | string | required | in from another registrar, registrant to a new owner, push between accounts, or out to leave. |
code | Secret | The transfer code, for in and out. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
domain | Domain | required | The transferred Domain. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Before transferableAt | refused | Clear what the check names, then call it again. | None. |
Example
curl -X POST https: //api.sb/ kilnbakery.com/ domains/ domain_VbYut4CTsH/ transfer \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"to": "Example to", "kind": "in"}'{
"api": "https: //api.sb/ kilnbakery.com",
"domain": {
"$id": "https: //api.sb/ kilnbakery.com/ domains/ domain_VbYut4CTsH",
"$type": "Domain",
"hostname": "kilnbakery.com",
"role": "canonical",
"state": "verifying"
},
"action": {
"$id": "https: //api.sb/ kilnbakery.com/ actions/ act_0y76a1jB6k",
"operation": "Domain.transfer",
"status": "done"
},
"links": {
"self": "https: //api.sb/ kilnbakery.com/ actions/ act_0y76a1jB6k"
}
}Domain.verify
Verify checks a Domain’s DNS, ownership and certificate again and records each result, with the fix for any failure. Verb page.
POST /{namespace}/ domains/ {domain}/ verifyPath: domain. Emits Domain.verified.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
domain | Domain | required | The Domain to check. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
checks | json | required | Each check with its status and, on failure, its reason and fix. |
domain | Domain | required | The Domain with its state after the checks. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X POST https: //api.sb/ kilnbakery.com/ domains/ domain_VbYut4CTsH/ verify \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"api": "https: //api.sb/ kilnbakery.com",
"checks": {},
"domain": {
"$id": "https: //api.sb/ kilnbakery.com/ domains/ domain_VbYut4CTsH",
"$type": "Domain",
"hostname": "kilnbakery.com",
"role": "canonical",
"state": "verifying"
},
"action": {
"$id": "https: //api.sb/ kilnbakery.com/ actions/ act_0y76a1jB6k",
"operation": "Domain.verify",
"status": "done"
},
"links": {
"self": "https: //api.sb/ kilnbakery.com/ actions/ act_0y76a1jB6k"
}
}