# Claim Domain

> POST /domains/claim — claim a domain that is already verified by another account.

`POST /domains/claim`

Claims a domain that is already verified by **another SendPing account**. Use this when [creating a domain](https://www.sendping.co/docs/api/domains-create) fails because the domain is already in use elsewhere. SendPing creates a placeholder domain on your account and returns a `domain_claim` object with a single TXT `record` to publish at your DNS provider. After publishing it, call [Verify Domain Claim](https://www.sendping.co/docs/api/domains-verify-claim) and poll [Get Domain Claim](https://www.sendping.co/docs/api/domains-get-claim) to follow the `status`.

**Body parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The name of the domain you want to claim, e.g. `yourdomain.com`. |
| `region` | string | No | Optional. When supplied it must be an available region — `us-east-1` or `ap-south-1`. Any other value, including a region listed as coming soon, returns a `validation_error` (422); this endpoint does not fall back to the default. Omit it to use the default region. See [Choosing a region](https://www.sendping.co/docs/domains/region). |

**Node.js**

```js
import { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

const { data, error } = await mb.domains.claim({
  "name": "yourdomain.com"
});
console.log({ data, error });
```

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Domains.claim({
  "name": "yourdomain.com"
})
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

$sendping->domains->claim([
  'name' => "yourdomain.com"
]);
```

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Domains.claim({
  "name": "yourdomain.com"
})
```

**Go**

```go
import "github.com/shekhu10/sendping-sdks/sendping-go"

client := sendping.NewClient("mb_xxxxxxxxx")

claim, err := client.Domains.Claim(&sendping.ClaimDomainRequest{
    Name: "yourdomain.com",
})
```

**Rust**

```rust
use sendping::{ClaimDomainOptions, SendPing};

let mb = SendPing::new("mb_xxxxxxxxx");

let _claim = mb.domains.claim(ClaimDomainOptions::new("yourdomain.com")).await?;
```

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;
import co.sendping.requests.ClaimDomainRequest;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.domains().claim(ClaimDomainRequest.builder().name("yourdomain.com").build());
```

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

var resp = await sendping.DomainClaimAsync(new DomainClaimOptions { Name = "yourdomain.com" });
```

**cURL**

```bash
curl -X POST 'https://www.sendping.co/api/domains/claim' \
  -H 'Authorization: Bearer mb_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "yourdomain.com"
}'
```

**CLI**

```bash
sendping domains claim start yourdomain.com
```

### Response

The `domain_claim` object. The `domain_id` is the placeholder domain id — use it for the get and verify calls below.

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

> **Note:** The claim `expires_at` roughly a week after creation. Publish the TXT record and verify before then, or start a new claim.

Errors: `missing_required_field` (422) if `name` is absent; `validation_error` (422) if `name` is not a valid domain, the domain already exists on your account, or `region` is not an available region; `plan_limit_reached` (402) when your account is already at its plan's domain limit — the body carries `kind: "domains"` with `used`, `limit`, `requested` and `next_plan`. See [Errors](https://www.sendping.co/docs/api/errors).
