Skip to content
Start here

Registrar

Search for available domains
client.Registrar.Search(ctx, params) (*RegistrarSearchResponse, error)
GET/accounts/{account_id}/registrar/domain-search
Check domain availability
client.Registrar.Check(ctx, params) (*RegistrarCheckResponse, error)
POST/accounts/{account_id}/registrar/domain-check
ModelsExpand Collapse
type Registration struct{…}

A domain registration resource representing the current state of a registered domain.

AutoRenew bool

Whether the domain will be automatically renewed before expiration.

CreatedAt Time

When the domain was registered. Present when the registration resource exists.

formatdate-time
DomainName string

Fully qualified domain name (FQDN) including the extension (e.g., example.com, mybrand.app). The domain name uniquely identifies a registration — the same domain cannot be registered twice, making it a natural idempotency key for registration requests.

ExpiresAt Time

When the domain registration expires. Present when the registration is ready; may be null only while status is registration_pending.

formatdate-time
Locked bool

Whether the domain is locked for transfer.

PrivacyMode RegistrationPrivacyMode

Current WHOIS privacy mode for the registration.

Status RegistrationStatus

Current registration status.

  • active: Domain is registered and operational
  • registration_pending: Registration is in progress
  • expired: Domain has expired
  • suspended: Domain is suspended by the registry
  • redemption_period: Domain is in the redemption grace period
  • pending_delete: Domain is pending deletion by the registry
One of the following:
const RegistrationStatusActive RegistrationStatus = "active"
const RegistrationStatusRegistrationPending RegistrationStatus = "registration_pending"
const RegistrationStatusExpired RegistrationStatus = "expired"
const RegistrationStatusSuspended RegistrationStatus = "suspended"
const RegistrationStatusRedemptionPeriod RegistrationStatus = "redemption_period"
const RegistrationStatusPendingDelete RegistrationStatus = "pending_delete"
type WorkflowStatus struct{…}

Status of an async registration workflow.

Completed bool

Whether the workflow has reached a terminal state. true when state is succeeded or failed. false for pending, in_progress, action_required, and blocked.

CreatedAt Time
formatdate-time
State WorkflowStatusState

Workflow lifecycle state.

  • pending: Workflow has been created but not yet started processing.
  • in_progress: Actively processing. Continue polling links.self. The workflow has an internal deadline and will not remain in this state indefinitely.
  • action_required: Paused — requires action by the user (not the system). See context.action for what is needed. An automated polling loop must break on this state; it will not resolve on its own without user intervention.
  • blocked: The workflow cannot make progress due to a third party such as the domain extension’s registry or a losing registrar. No user action will help. Continue polling — the block may resolve when the third party responds.
  • succeeded: Terminal. The operation completed successfully. completed will be true. For registrations, context.registration contains the resulting registration resource.
  • failed: Terminal. The operation failed. completed will be true. See error.code and error.message for the reason. Do not auto-retry without user review.
One of the following:
const WorkflowStatusStatePending WorkflowStatusState = "pending"
const WorkflowStatusStateInProgress WorkflowStatusState = "in_progress"
const WorkflowStatusStateActionRequired WorkflowStatusState = "action_required"
const WorkflowStatusStateBlocked WorkflowStatusState = "blocked"
const WorkflowStatusStateSucceeded WorkflowStatusState = "succeeded"
const WorkflowStatusStateFailed WorkflowStatusState = "failed"
UpdatedAt Time
formatdate-time
Context map[string, unknown]Optional

Workflow-specific data for this workflow.

The workflow subject is identified by context.domain_name for domain-centric workflows.

Error WorkflowStatusErrorOptional

Error details when a workflow reaches the failed state. The specific error codes and messages depend on the workflow type (registration, update, etc.) and the underlying registry response. These workflow error codes are separate from immediate HTTP error errors[].code values returned by non-2xx responses. Surface error.message to the user for context.

Code string

Machine-readable error code identifying the failure reason.

Message string

Human-readable explanation of the failure. May include registry-specific details.

RegistrarDomains

List domains
Deprecated
client.Registrar.Domains.List(ctx, query) (*SinglePage[Domain], error)
GET/accounts/{account_id}/registrar/domains
Get domain
Deprecated
client.Registrar.Domains.Get(ctx, domainName, query) (*DomainGetResponse, error)
GET/accounts/{account_id}/registrar/domains/{domain_name}
Update domain
Deprecated
client.Registrar.Domains.Update(ctx, domainName, params) (*DomainUpdateResponse, error)
PUT/accounts/{account_id}/registrar/domains/{domain_name}
ModelsExpand Collapse
type Domain struct{…}
ID stringOptional

Domain identifier.

maxLength32
Available boolOptional

Shows if a domain is available for transferring into Cloudflare Registrar.

CanRegister boolOptional

Indicates if the domain can be registered as a new domain.

CreatedAt TimeOptional

Shows time of creation.

formatdate-time
CurrentRegistrar stringOptional

Shows name of current registrar.

ExpiresAt TimeOptional

Shows when domain name registration expires.

formatdate-time
Locked boolOptional

Shows whether a registrar lock is in place for a domain.

RegistrantContact DomainRegistrantContactOptional

Shows contact information for domain registrant.

Address string

Address.

City string

City.

Country string

The country in which the user lives.

maxLength30
FirstName string

User’s first name

maxLength60
LastName string

User’s last name

maxLength60
Organization string

Name of organization.

Phone string

User’s telephone number

maxLength20
State string

State.

Zip string

The zipcode or postal code where the user lives.

maxLength20
ID stringOptional

Contact Identifier.

maxLength32
Address2 stringOptional

Optional address line for unit, floor, suite, etc.

Email stringOptional

The contact email address of the user.

maxLength90
Fax stringOptional

Contact fax number.

RegistryStatuses stringOptional

A comma-separated list of registry status codes. A full list of status codes can be found at EPP Status Codes.

SupportedTLD boolOptional

Whether a particular TLD is currently supported by Cloudflare Registrar. Refer to TLD Policies for a list of supported TLDs.

TransferIn DomainTransferInOptional

Statuses for domain transfers into Cloudflare Registrar.

AcceptFoa DomainTransferInAcceptFoaOptional

Form of authorization has been accepted by the registrant.

One of the following:
const DomainTransferInAcceptFoaNeeded DomainTransferInAcceptFoa = "needed"
const DomainTransferInAcceptFoaOk DomainTransferInAcceptFoa = "ok"
ApproveTransfer DomainTransferInApproveTransferOptional

Shows transfer status with the registry.

One of the following:
const DomainTransferInApproveTransferNeeded DomainTransferInApproveTransfer = "needed"
const DomainTransferInApproveTransferOk DomainTransferInApproveTransfer = "ok"
const DomainTransferInApproveTransferPending DomainTransferInApproveTransfer = "pending"
const DomainTransferInApproveTransferTrying DomainTransferInApproveTransfer = "trying"
const DomainTransferInApproveTransferRejected DomainTransferInApproveTransfer = "rejected"
const DomainTransferInApproveTransferUnknown DomainTransferInApproveTransfer = "unknown"
CanCancelTransfer boolOptional

Indicates if cancellation is still possible.

DisablePrivacy DomainTransferInDisablePrivacyOptional

Privacy guards are disabled at the foreign registrar.

One of the following:
const DomainTransferInDisablePrivacyNeeded DomainTransferInDisablePrivacy = "needed"
const DomainTransferInDisablePrivacyOk DomainTransferInDisablePrivacy = "ok"
const DomainTransferInDisablePrivacyUnknown DomainTransferInDisablePrivacy = "unknown"
EnterAuthCode DomainTransferInEnterAuthCodeOptional

Auth code has been entered and verified.

One of the following:
const DomainTransferInEnterAuthCodeNeeded DomainTransferInEnterAuthCode = "needed"
const DomainTransferInEnterAuthCodeOk DomainTransferInEnterAuthCode = "ok"
const DomainTransferInEnterAuthCodePending DomainTransferInEnterAuthCode = "pending"
const DomainTransferInEnterAuthCodeTrying DomainTransferInEnterAuthCode = "trying"
const DomainTransferInEnterAuthCodeRejected DomainTransferInEnterAuthCode = "rejected"
UnlockDomain DomainTransferInUnlockDomainOptional

Domain is unlocked at the foreign registrar.

One of the following:
const DomainTransferInUnlockDomainNeeded DomainTransferInUnlockDomain = "needed"
const DomainTransferInUnlockDomainOk DomainTransferInUnlockDomain = "ok"
const DomainTransferInUnlockDomainPending DomainTransferInUnlockDomain = "pending"
const DomainTransferInUnlockDomainTrying DomainTransferInUnlockDomain = "trying"
const DomainTransferInUnlockDomainUnknown DomainTransferInUnlockDomain = "unknown"
UpdatedAt TimeOptional

Last updated.

formatdate-time

RegistrarRegistrations

Create Registration
client.Registrar.Registrations.New(ctx, params) (*WorkflowStatus, error)
POST/accounts/{account_id}/registrar/registrations
List Registrations
client.Registrar.Registrations.List(ctx, params) (*CursorPagination[Registration], error)
GET/accounts/{account_id}/registrar/registrations
Get Registration
client.Registrar.Registrations.Get(ctx, domainName, query) (*Registration, error)
GET/accounts/{account_id}/registrar/registrations/{domain_name}
Update Registration
client.Registrar.Registrations.Edit(ctx, domainName, params) (*WorkflowStatus, error)
PATCH/accounts/{account_id}/registrar/registrations/{domain_name}

RegistrarRegistration Status

Get Registration Status
client.Registrar.RegistrationStatus.Get(ctx, domainName, query) (*WorkflowStatus, error)
GET/accounts/{account_id}/registrar/registrations/{domain_name}/registration-status

RegistrarUpdate Status

Get Update Status
client.Registrar.UpdateStatus.Get(ctx, domainName, query) (*WorkflowStatus, error)
GET/accounts/{account_id}/registrar/registrations/{domain_name}/update-status