## List Registrations `client.Registrar.Registrations.List(ctx, params) (*CursorPagination[Registration], error)` **get** `/accounts/{account_id}/registrar/registrations` Returns a paginated list of domain registrations owned by the account. This endpoint uses cursor-based pagination. Results are ordered by registration date by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. ### Parameters - `params RegistrationListParams` - `AccountID param.Field[string]` Path param: Identifier - `Cursor param.Field[string]` Query param: Opaque token from a previous response's `result_info.cursor`. Pass this value to fetch the next page of results. Omit (or pass an empty string) for the first page. - `Direction param.Field[RegistrationListParamsDirection]` Query param: Sort direction for results. Defaults to ascending order. - `const RegistrationListParamsDirectionAsc RegistrationListParamsDirection = "asc"` - `const RegistrationListParamsDirectionDesc RegistrationListParamsDirection = "desc"` - `PerPage param.Field[int64]` Query param: Number of items to return per page. - `SortBy param.Field[RegistrationListParamsSortBy]` Query param: Column to sort results by. Defaults to registration date (`registry_created_at`) when omitted. - `const RegistrationListParamsSortByRegistryCreatedAt RegistrationListParamsSortBy = "registry_created_at"` - `const RegistrationListParamsSortByRegistryExpiresAt RegistrationListParamsSortBy = "registry_expires_at"` - `const RegistrationListParamsSortByName RegistrationListParamsSortBy = "name"` ### Returns - `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. - `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`. - `Locked bool` Whether the domain is locked for transfer. - `PrivacyMode RegistrationPrivacyMode` Current WHOIS privacy mode for the registration. - `const RegistrationPrivacyModeRedaction RegistrationPrivacyMode = "redaction"` - `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 - `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"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/registrar" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.Registrar.Registrations.List(context.TODO(), registrar.RegistrationListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [], "messages": [], "result": [], "result_info": { "count": 0, "cursor": "", "per_page": 20 }, "success": true } ```