
# Remove a domain

Remove a custom domain. Its paired `www.`/apex variant is removed with it.

```sh
DELETE https://sitepaste.com/api/v1/public/domains/{domainId}
```

Requires the `settings` scope.

## Usage

```bash
curl -X DELETE "https://sitepaste.com/api/v1/public/domains/d8qjx2v7mz4r" \
  -H "Authorization: Bearer $TOKEN"
```

## Authorizations

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| Authorization | string | Yes | Bearer token (`Authorization: Bearer sp_...`). Created in the dashboard under Account > Tokens. See [authentication](/api/authentication). |

## Response

204 No Content. A domain added with its `www.` pair is removed together with it.

400 when `{domainId}` is malformed; 404 when it is well formed but no domain in your workspace has that ID. 500 when the removal did not complete. Retry it, or re-read the domain to see where it stands.