---
title: "Remove the email sending domain"
---

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

# Remove the email sending domain

Path: Nicer API › identity

`DELETE /identity/email-domain`

URL: `https://api.nicer.travel/identity/email-domain`

Stops sending from the agency's own domain: its emails come from Nicer's domain again and the domain is removed from the email service, so using it again means setting it and adding its DNS records anew. Answers status NONE. Agency admins only.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Header parameters

- `x-nicer-company` (`identity.emailDomain.delete.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
  headers: { "x-nicer-company": process.env.NICER_COMPANY },
});

await nicer.identity.emailDomain.delete();
```

### Nicer CLI

```bash
nicer identity email-domain delete --company "$NICER_COMPANY"
```

### cURL

```bash
curl --request DELETE \
  --url https://api.nicer.travel/identity/email-domain \
  --header 'Authorization: Bearer <token>' \
  --header 'x-nicer-company: string'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/identity/email-domain';
const options = {
  method: 'DELETE',
  headers: {'x-nicer-company': 'string', Authorization: 'Bearer <token>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/identity/email-domain"

headers = {
    "x-nicer-company": "string",
    "Authorization": "Bearer <token>"
}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "domain": "string",
  "from": "string",
  "records": [
    {
      "name": "string",
      "type": "CNAME",
      "value": "string"
    }
  ],
  "status": "NONE"
}
```

- `domain` (`identity.emailDomain.delete.response.200.domain`; any of, required)
  - any of the following: `string`, `null`
- `from` (`identity.emailDomain.delete.response.200.from`; any of, required)
  - any of the following: `string`, `null`
- `records` (`identity.emailDomain.delete.response.200.records`; array of object, required)
  - `name` (`identity.emailDomain.delete.response.200.records.name`; string, required)
  - `type` (`identity.emailDomain.delete.response.200.records.type`; string, required)
  - `value` (`identity.emailDomain.delete.response.200.records.value`; string, required)
- `status` (`identity.emailDomain.delete.response.200.status`; string, required)
  - one of `"NONE"`, `"PENDING"`, `"VERIFIED"`, `"FAILED"`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.emailDomain.delete.response.400.errorCode`; string, required)
- `errorMessage` (`identity.emailDomain.delete.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.emailDomain.delete.response.401.errorCode`; string, required)
- `errorMessage` (`identity.emailDomain.delete.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.emailDomain.delete.response.403.errorCode`; string, required)
- `errorMessage` (`identity.emailDomain.delete.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/identity/identity.emailDomain.delete/index.md
