# Claim Domain

POST

/

domains

/

claim

:::code-group
```typescript title="Node.js"
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.domains.claims.create({
  name: 'example.com',
});
```

```php title="PHP"
$resend = Resend::client('re_xxxxxxxxx');

$resend->domains->claims->create([
  'name' => 'example.com'
]);
```

```python title="Python"
import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Domains.Claims.CreateParams = {
  "name": "example.com",
}

resend.Domains.Claims.create(params)
```

```ruby title="Ruby"
require "resend"

Resend.api_key = "re_xxxxxxxxx"

params = {
  name: "example.com",
}
claim = Resend::Domains::Claims.create(params)
puts claim
```

```go title="Go"
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	params := &resend.CreateDomainClaimRequest{
		Name: "example.com",
	}

	client.DomainClaims.Create(params)
}
```

```rust title="Rust"
use resend_rs::{Resend, Result, types::CreateDomainClaimOptions};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let domain_claim = CreateDomainClaimOptions::new("example.com");
  let _data = resend.domains.claim(domain_claim).await?;

  Ok(())
}
```

```java title="Java"
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.domains.model.ClaimDomainOptions;
import com.resend.services.domains.model.DomainClaimResponseSuccess;

public class Main {
    public static void main(String[] args) throws ResendException {
        Resend resend = new Resend("re_xxxxxxxxx");

        ClaimDomainOptions params = ClaimDomainOptions
                .builder()
                .name("example.com").build();

        DomainClaimResponseSuccess claim = resend.domains().claims().create(params);
    }
}
```

```shellscript title="cURL"
curl -X POST 'https://api.resend.com/domains/claim' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d $'{
  "name": "example.com"
}'
```

```shellscript title="CLI"
resend domains claim create --name example.com
```
:::

:::code-group
```json title="Response"
{
  "object": "domain_claim",
  "id": "dacf4072-4119-4d88-932f-6c6126d3a9d1",
  "name": "example.com",
  "status": "pending",
  "domain_id": "d91cd9bd-1176-453e-8fc1-35364d380206",
  "region": "us-east-1",
  "record": {
    "type": "TXT",
    "name": "example.com",
    "value": "resend-domain-verification=3f8a1c2d4e5b6a7f8091a2b3c4d5e6f7",
    "ttl": "Auto"
  },
  "blocked_reason": null,
  "failure_reason": null,
  "created_at": "2026-06-16 17:12:02.059593+00",
  "expires_at": "2026-06-23 17:12:02.059593+00"
}
```
:::

:::callout{intent="note"}
Use this endpoint when [creating a domain](/guides/domains-2-create-domain) fails because the domain is already verified by another team. Resend creates a placeholder domain on your team and returns a `domain_claim` with a TXT record to add to your DNS. Learn more in [Claiming a domain](/guides/learn-dashboard-domains-claim).
:::

## Body Parameters

string

required

The name of the domain you want to claim.

string

default:"us-east-1"

The region where emails will be sent from. Possible values: `'us-east-1' | 'eu-west-1' | 'sa-east-1' | 'ap-northeast-1'`

:::code-group
```typescript title="Node.js"
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.domains.claims.create({
  name: 'example.com',
});
```

```php title="PHP"
$resend = Resend::client('re_xxxxxxxxx');

$resend->domains->claims->create([
  'name' => 'example.com'
]);
```

```python title="Python"
import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Domains.Claims.CreateParams = {
  "name": "example.com",
}

resend.Domains.Claims.create(params)
```

```ruby title="Ruby"
require "resend"

Resend.api_key = "re_xxxxxxxxx"

params = {
  name: "example.com",
}
claim = Resend::Domains::Claims.create(params)
puts claim
```

```go title="Go"
package main

import "github.com/resend/resend-go/v4"

func main() {
	client := resend.NewClient("re_xxxxxxxxx")

	params := &resend.CreateDomainClaimRequest{
		Name: "example.com",
	}

	client.DomainClaims.Create(params)
}
```

```rust title="Rust"
use resend_rs::{Resend, Result, types::CreateDomainClaimOptions};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let domain_claim = CreateDomainClaimOptions::new("example.com");
  let _data = resend.domains.claim(domain_claim).await?;

  Ok(())
}
```

```java title="Java"
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.domains.model.ClaimDomainOptions;
import com.resend.services.domains.model.DomainClaimResponseSuccess;

public class Main {
    public static void main(String[] args) throws ResendException {
        Resend resend = new Resend("re_xxxxxxxxx");

        ClaimDomainOptions params = ClaimDomainOptions
                .builder()
                .name("example.com").build();

        DomainClaimResponseSuccess claim = resend.domains().claims().create(params);
    }
}
```

```shellscript title="cURL"
curl -X POST 'https://api.resend.com/domains/claim' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d $'{
  "name": "example.com"
}'
```

```shellscript title="CLI"
resend domains claim create --name example.com
```
:::

```json
{
  "object": "domain_claim",
  "id": "dacf4072-4119-4d88-932f-6c6126d3a9d1",
  "name": "example.com",
  "status": "pending",
  "domain_id": "d91cd9bd-1176-453e-8fc1-35364d380206",
  "region": "us-east-1",
  "record": {
    "type": "TXT",
    "name": "example.com",
    "value": "resend-domain-verification=3f8a1c2d4e5b6a7f8091a2b3c4d5e6f7",
    "ttl": "Auto"
  },
  "blocked_reason": null,
  "failure_reason": null,
  "created_at": "2026-06-16 17:12:02.059593+00",
  "expires_at": "2026-06-23 17:12:02.059593+00"
}
```

Was this page helpful?

⌘I

## Related pages

- [Account Management](./account-management-index.md)
- [API Keys](./api-keys-2-index.md)
- [API Keys](./api-keys-index.md)
- [API Reference](./api-reference-index.md)
- [AudiencesDEPRECATED](./audiencesdeprecated-index.md)
- [Authorized Apps](./authorized-apps-index.md)
- [Automations](./automations-index.md)
- [Broadcasts](./broadcasts-index.md)
- [Build with AI](./build-with-ai-index.md)
- [Changelog](../changelog.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
