---
title: Get Registration
---

[Skip to content](#%5Ftop) 

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

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

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

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Get Registration

client.RegistrarSandbox.Registrations.Get(ctx, domainName, query) (\*[RegistrationGetResponse](https://developers.cloudflare.com/api/go/resources/registrar%5Fsandbox#%28resource%29%20registrar%5Fsandbox.registrations%20%3E%20%28model%29%20RegistrationGetResponse%20%3E%20%28schema%29), error)

GET/accounts/{account\_id}/registrar-sandbox/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

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

API Email + API Key

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

**Example:**`X-Auth-Email: user@example.com`

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

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

##### 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.

query RegistrationGetParams

AccountID param.Field\[string\]

Identifier.

maxLength32

##### ReturnsExpand Collapse 

type RegistrationGetResponse struct{…}

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

AutoRenew bool

Whether automatic renewal occurs before expiration.

CreatedAt Time

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

formatdate-time

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.

ExpiresAt Time

When the domain registration expires. Ready registrations include this value; only `registration_pending` may return null.

formatdate-time

Locked bool

Whether the domain is locked for transfer.

PrivacyMode RegistrationGetResponsePrivacyMode

Current WHOIS privacy mode for the registration.

One of the following:

const RegistrationGetResponsePrivacyModeOff RegistrationGetResponsePrivacyMode \= "off"

const RegistrationGetResponsePrivacyModeRedaction RegistrationGetResponsePrivacyMode \= "redaction"

Status RegistrationGetResponseStatus

Current registration status.

* `active`: The domain operates with an active registration.
* `registration_pending`: Registration remains in progress.
* `expired`: The domain registration expired.
* `suspended`: The registry suspended the domain.
* `redemption_period`: The domain entered the redemption grace period.
* `pending_delete`: The registry scheduled the domain for deletion.

One of the following:

const RegistrationGetResponseStatusActive RegistrationGetResponseStatus \= "active"

const RegistrationGetResponseStatusRegistrationPending RegistrationGetResponseStatus \= "registration\_pending"

const RegistrationGetResponseStatusExpired RegistrationGetResponseStatus \= "expired"

const RegistrationGetResponseStatusSuspended RegistrationGetResponseStatus \= "suspended"

const RegistrationGetResponseStatusRedemptionPeriod RegistrationGetResponseStatus \= "redemption\_period"

const RegistrationGetResponseStatusPendingDelete RegistrationGetResponseStatus \= "pending\_delete"

### Get Registration

Go

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/registrar_sandbox"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  registration, err := client.RegistrarSandbox.Registrations.Get(
    context.TODO(),
    "example.com",
    registrar_sandbox.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
}
```