# Claim

`POST /workspaces/:workspace/domains/claim`

Claim an existing domain

**Required Scopes:** `ZONE_WRITE`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
}
```

## Body Parameters

```typescript
interface BodyParameters {
  /** The subdomain to claim under a claimable domain */
  name?: string;
  /** Whether to claim the domain on the workspace owner's behalf */
  on_owner_behalf?: boolean;
}
```

## Response Body

```typescript
interface ResponseBody {
  /** The type of the domain */
  type?: "REGISTERED" | "POINTED" | "PRIVATE" | "CLAIMED";
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The name of the domain */
  name?: string;
  /** The ID of the domain */
  id?: string;
  pointed_via?: string[];
  /** Whether the domain is set to auto-renew */
  auto_renew?: boolean;
  /** Whether the domain has transfer lock enabled */
  transfer_lock?: boolean;
  /** Whether DNSSEC is enabled for the domain */
  dnssec?: boolean;
  /** The expiration date of the domain registration */
  expiry_date?: string;
}
```

## Request Example

```bash
curl -X POST "https://api.buddy.works/workspaces/:workspace/domains/claim" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "mydomain.claim.net",
  "on_owner_behalf": false
}'
```

## Response Example

**Status:** `201 Created`

```json
{
  "url": "https://api.buddy.works/workspaces/my-company/domains/ZyQBXwrX",
  "html_url": "https://app.buddy.works/my-company/-/domain/ZyQBXwrX",
  "name": "mydomain.claim.net",
  "id": "ZyQBXwrX",
  "type": "CLAIMED"
}
```

---
Original source: https://buddy.works/docs/api/domains/claim