---
title: "Stop sharing the caller's saved list"
---

> 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.

# Stop sharing the caller's saved list

Path: Nicer API › favorites

`DELETE /favorites/share`

URL: `https://api.nicer.travel/favorites/share`

Stops sharing the caller's saved list: the link stops working at once, and sharing again creates a new one. Idempotent.

## Authentication

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

## Code samples

### JavaScript SDK

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

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

await nicer.favorites.share.delete();
```

### Nicer CLI

```bash
nicer favorites share delete
```

### cURL

```bash
curl --request DELETE \
  --url https://api.nicer.travel/favorites/share \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/favorites/share';
const options = {method: 'DELETE', headers: {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/favorites/share"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "shareId": null
}
```

- `shareId` (`favorites.share.delete.response.200.shareId`; null, required)

### 400

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

#### Example

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

- `errorCode` (`favorites.share.delete.response.400.errorCode`; string, required)
- `errorMessage` (`favorites.share.delete.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`favorites.share.delete.response.401.errorCode`; string, required)
- `errorMessage` (`favorites.share.delete.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`favorites.share.delete.response.403.errorCode`; string, required)
- `errorMessage` (`favorites.share.delete.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/favorites/favorites.share.delete/index.md
