---
title: Get Registration
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Registrar](https://developers.cloudflare.com/api/go/resources/registrar)

[Registrations](https://developers.cloudflare.com/api/go/resources/registrar/subresources/registrations)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get Registration

client.Registrar.Registrations.Get(ctx, domainName, query) (\*[Registration](<https://developers.cloudflare.com/api/go/resources/registrar#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/registrar/registrations/{domain\_name}

Returns the current state of a domain registration.

This is the canonical read endpoint for a domain you own. It returns the full registration resource including current settings and expiration. When the registration resource is ready, both `created_at` and `expires_at` are present in the response.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### ParametersExpand Collapse

domainName string

Provides a fully qualified domain name (FQDN), including the extension (e.g., `example.com`, `mybrand.app`). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.

[Link to this property](<#(resource)%20registrar.registrations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20domain_name%20%3E%20(schema)>)

<details>

<summary>

query RegistrationGetParams

</summary>

AccountID param.Field\[string]

Identifier.

maxLength32

<a href="#(resource)%20registrar.registrations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20registrar.registrations%20%3E%20(method)%20get%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type Registration struct{…}

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

</summary>

AutoRenew bool

Whether automatic renewal occurs before expiration.

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20auto_renew">Link to this property</a>

CreatedAt Time

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

formatdate-time

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

DomainName string

Provides a fully qualified domain name (FQDN), including the extension (e.g., <code>example.com</code>, <code>mybrand.app</code>). The domain name uniquely identifies a registration. Cloudflare permits only one registration per domain, making the domain name a natural idempotency key for registration requests.

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20domain_name">Link to this property</a>

ExpiresAt Time

When the domain registration expires. Ready registrations include this value; only <code>registration_pending</code> and <code>transfer_pending</code> may return null.

formatdate-time

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20expires_at">Link to this property</a>

Locked bool

Whether the domain is locked for transfer.

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20locked">Link to this property</a>

<details>

<summary>

PrivacyMode RegistrationPrivacyMode

Current WHOIS privacy mode for the registration.

</summary>

One of the following:

const RegistrationPrivacyModeOff RegistrationPrivacyMode = "off"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20privacy_mode%20%3E%20(member)%200">Link to this property</a>

const RegistrationPrivacyModeRedaction RegistrationPrivacyMode = "redaction"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20privacy_mode%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20privacy_mode">Link to this property</a>

<details>

<summary>

Status RegistrationStatus

Current registration status.

- <code>active</code>: The domain operates with an active registration.
- <code>registration_pending</code>: Registration remains in progress.
- <code>transfer_pending</code>: Domain transfer is in progress.
- <code>expired</code>: The domain registration expired.
- <code>suspended</code>: The registry suspended the domain.
- <code>redemption_period</code>: The domain entered the redemption grace period.
- <code>pending_delete</code>: The registry scheduled the domain for deletion.

</summary>

One of the following:

const RegistrationStatusActive RegistrationStatus = "active"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

const RegistrationStatusRegistrationPending RegistrationStatus = "registration\_pending"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

const RegistrationStatusTransferPending RegistrationStatus = "transfer\_pending"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

const RegistrationStatusExpired RegistrationStatus = "expired"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

const RegistrationStatusSuspended RegistrationStatus = "suspended"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

const RegistrationStatusRedemptionPeriod RegistrationStatus = "redemption\_period"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%205">Link to this property</a>

const RegistrationStatusPendingDelete RegistrationStatus = "pending\_delete"

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)%20%3E%20(property)%20status">Link to this property</a>

</details>

[Link to this property](<#(resource)%20registrar%20%3E%20(model)%20registration%20%3E%20(schema)>)

### Get Registration

Go

HTTPTypeScriptPythonGoTerraform

```
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"),
  )
  registration, err := client.Registrar.Registrations.Get(
    context.TODO(),
    "example.com",
    registrar.RegistrationGetParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", registration.AutoRenew)
}
```

200 example

4XX example

4XX example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "auto_renew": true,
    "created_at": "2025-01-15T10:00:00Z",
    "domain_name": "example.com",
    "expires_at": "2026-01-15T10:00:00Z",
    "locked": true,
    "privacy_mode": "redaction",
    "status": "active"
  },
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 10000,
      "message": "Domain not found"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 10000,
      "message": "Invalid domain name"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

##### Returns Examples

200 example

4XX example

4XX example

```
{
  "errors": [],
  "messages": [],
  "result": {
    "auto_renew": true,
    "created_at": "2025-01-15T10:00:00Z",
    "domain_name": "example.com",
    "expires_at": "2026-01-15T10:00:00Z",
    "locked": true,
    "privacy_mode": "redaction",
    "status": "active"
  },
  "success": true
}
```

```
{
  "errors": [
    {
      "code": 10000,
      "message": "Domain not found"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```

```
{
  "errors": [
    {
      "code": 10000,
      "message": "Invalid domain name"
    }
  ],
  "messages": [],
  "result": null,
  "success": false
}
```