---
title: Get Registration
---

[Skip to content](#%5Ftop) 

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

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

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

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Get Registration

registrar\_sandbox.registrations.get(strdomain\_name, RegistrationGetParams\*\*kwargs)  \-> [RegistrationGetResponse](https://developers.cloudflare.com/api/python/resources/registrar%5Fsandbox#%28resource%29%20registrar%5Fsandbox.registrations%20%3E%20%28model%29%20registration%5Fget%5Fresponse%20%3E%20%28schema%29)

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 

account\_id: str

Identifier.

maxLength32

domain\_name: str

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.

##### ReturnsExpand Collapse 

class RegistrationGetResponse: …

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

auto\_renew: bool

Whether automatic renewal occurs before expiration.

created\_at: datetime

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

formatdate-time

domain\_name: str

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.

expires\_at: Optional\[datetime\]

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.

privacy\_mode: Literal\["off", "redaction"\]

Current WHOIS privacy mode for the registration.

One of the following:

"off"

"redaction"

status: Literal\["active", "registration\_pending", "expired", 3 more\]

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:

"active"

"registration\_pending"

"expired"

"suspended"

"redemption\_period"

"pending\_delete"

### Get Registration

Python

HTTPHTTP

TypeScriptTypeScript

PythonPython

GoGo

TerraformTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
registration = client.registrar_sandbox.registrations.get(
    domain_name="example.com",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(registration.auto_renew)
```

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
}
```