---
title: Remove Domain
protocol: rest
method: DELETE
endpoint: /v1/projects/{projectId}/domains/{domainId}
description: "Remove a custom domain from a project"
---

# Remove Domain

Remove a custom domain from a project. The documentation will no longer be accessible via this domain.

<Endpoint method="DELETE" path="/v1/projects/{projectId}/domains/{domainId}" />

## Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID (e.g., `prj_abc123`).
</ParamField>

<ParamField path="domainId" type="string" required>
  The domain ID (e.g., `dom_xyz789`).
</ParamField>

## Response

Returns `204 No Content` on success.

## Example

<CodeGroup>
```bash cURL
curl -X DELETE https://api.syntext.dev/v1/projects/prj_abc123/domains/dom_xyz789 \
  -H "Authorization: Bearer stx_abc12345_..."
```

```typescript SDK
import { Syntext } from '@syntext/sdk'

const client = new Syntext('stx_abc12345_...')
await client.domains.remove('prj_abc123', 'dom_xyz789')
```

```python Python
from syntext import Syntext

client = Syntext("stx_abc12345_...")
client.domains.remove("prj_abc123", "dom_xyz789")
```
</CodeGroup>

### Response

```
HTTP/1.1 204 No Content
```

<Warning>
After removing a domain, visitors to that domain will see an error page. The documentation will still be accessible via the default `*.syntext.dev` URL.
</Warning>

## Error Responses

### 404 Not Found

Returned when the domain or project does not exist.

```json
{
  "error": {
    "code": "not_found",
    "message": "Domain or project does not exist"
  }
}
```
