Get Registration Status
Returns the current status of a domain registration workflow.
Use this endpoint to poll for completion when the POST response
returned 202 Accepted. The URL is provided in the links.self
field of the workflow status response.
Poll this endpoint until the workflow reaches a terminal state or a state that requires user attention.
Terminal states: succeeded and failed are terminal and always
have completed: true.
Non-terminal states:
action_requiredhascompleted: falseand will not resolve on its own. The workflow is paused pending user intervention.blockedhascompleted: falseand indicates the workflow is waiting on a third party such as the extension registry or losing registrar. Continue polling while informing the user of the delay.
Use increasing backoff between polls. When state: blocked, use a
longer polling interval and do not poll indefinitely.
A naive polling loop that only checks completed can run indefinitely
when state: action_required. Break explicitly on action_required:
let status;
do {
await new Promise(r => setTimeout(r, 2000));
status = await cloudflare.request({
method: 'GET',
path: reg.result.links.self,
});
} while (
!status.result.completed &&
status.result.state !== 'action_required'
);
if (status.result.state === 'action_required') {
// Surface context.action and context.confirmation_sent_to to the user.
// Do not re-submit the registration request.
}Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Path Parameters
Get Registration Status
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/registrar/registrations/$DOMAIN_NAME/registration-status \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"completed": false,
"created_at": "2019-12-27T18:11:19.117Z",
"links": {
"self": "/accounts/{account_id}/registrar/registrations/example.com/registration-status",
"resource": "/accounts/{account_id}/registrar/registrations/example.com"
},
"state": "in_progress",
"updated_at": "2019-12-27T18:11:19.117Z",
"context": {
"foo": "bar"
},
"error": {
"code": "registry_rejected",
"message": "Registry rejected the request."
}
},
"success": true
}{
"errors": [
{
"code": 10000,
"message": "No workflow found for example.com"
}
],
"messages": [],
"result": null,
"success": false
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"completed": false,
"created_at": "2019-12-27T18:11:19.117Z",
"links": {
"self": "/accounts/{account_id}/registrar/registrations/example.com/registration-status",
"resource": "/accounts/{account_id}/registrar/registrations/example.com"
},
"state": "in_progress",
"updated_at": "2019-12-27T18:11:19.117Z",
"context": {
"foo": "bar"
},
"error": {
"code": "registry_rejected",
"message": "Registry rejected the request."
}
},
"success": true
}{
"errors": [
{
"code": 10000,
"message": "No workflow found for example.com"
}
],
"messages": [],
"result": null,
"success": false
}