> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unosend.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Domain

> Add a new sending domain to your account.

<ParamField body="name" type="string" required>
  The domain name to add (e.g., "yourdomain.com").
</ParamField>

### Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.unosend.co/domains \
    -H "Authorization: Bearer un_xxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "yourdomain.com"
    }'
  ```

  ```javascript JavaScript theme={null}
  await fetch('https://api.unosend.co/domains', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer un_xxxxxxxxxx',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ name: 'yourdomain.com' })
  });
  ```

  ```python Python theme={null}
  import requests

  requests.post('https://api.unosend.co/domains',
    headers={'Authorization': 'Bearer un_xxxxxxxxxx'},
    json={'name': 'yourdomain.com'}
  )
  ```
</CodeGroup>

### Response

```json 201 theme={null}
{
  "success": true,
  "data": {
    "id": "dom_123",
    "domain": "yourdomain.com",
    "status": "pending",
    "dns_records": [
      {
        "type": "TXT",
        "name": "@",
        "value": "v=spf1 include:spf.unosend.co ~all",
        "purpose": "spf"
      },
      {
        "type": "CNAME",
        "name": "bounce",
        "value": "cname.unosend.co",
        "purpose": "bounce"
      }
    ],
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}
```

<Note>
  After creating a domain, add the provided DNS records to your domain provider, then call the verify endpoint.
</Note>

<Info>
  All plans include **unlimited domains**. Domain creation is rate limited to 10 per hour per organization to prevent abuse.
</Info>
