---
title: "Turns notification types on or off, for the notifications list and browser push alike."
---

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

Path: Sherpo customer API › profile

`PATCH /v1/stores/{store}/notification_settings`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `profile:write`

## Path parameters

- `store` (`updateNotificationSettings.path.store`; string, required) — A hostname of the store.

## Request body

_Required._

- `types` (`updateNotificationSettings.types`; object, required) — Each type to turn on (true) or off (false); a type left out keeps its setting.
  - `portfolio_trade` (`updateNotificationSettings.types.portfolio_trade`; boolean, optional)
  - `new_lesson` (`updateNotificationSettings.types.new_lesson`; boolean, optional)
  - `new_episode` (`updateNotificationSettings.types.new_episode`; boolean, optional)
  - `new_post` (`updateNotificationSettings.types.new_post`; boolean, optional)
  - `new_file` (`updateNotificationSettings.types.new_file`; boolean, optional)
  - `new_product` (`updateNotificationSettings.types.new_product`; boolean, optional)
  - `new_discount` (`updateNotificationSettings.types.new_discount`; boolean, optional)
  - `event_reminder` (`updateNotificationSettings.types.event_reminder`; boolean, optional)
  - `event_follow_up` (`updateNotificationSettings.types.event_follow_up`; boolean, optional)

## Example request

```json
{
  "types": {
    "portfolio_trade": true,
    "new_lesson": true,
    "new_episode": true,
    "new_post": true,
    "new_file": true,
    "new_product": true,
    "new_discount": true,
    "event_reminder": true,
    "event_follow_up": true
  }
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.sherpo.io/customer/v1/stores/<store>/notification_settings' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "types": {
    "portfolio_trade": true,
    "new_lesson": true,
    "new_episode": true,
    "new_post": true,
    "new_file": true,
    "new_product": true,
    "new_discount": true,
    "event_reminder": true,
    "event_follow_up": true
  }
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/customer/v1/stores/<store>/notification_settings';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    types: {
      portfolio_trade: true,
      new_lesson: true,
      new_episode: true,
      new_post: true,
      new_file: true,
      new_product: true,
      new_discount: true,
      event_reminder: true,
      event_follow_up: true
    }
  })
};

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

### Python

```python
import requests

url = "https://api.sherpo.io/customer/v1/stores/<store>/notification_settings"

payload = { "types": {
        "portfolio_trade": True,
        "new_lesson": True,
        "new_episode": True,
        "new_post": True,
        "new_file": True,
        "new_product": True,
        "new_discount": True,
        "event_reminder": True,
        "event_follow_up": True
    } }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Turns notification types on or off, for the notifications list and browser push alike.

#### Example

```json
{
  "types": [
    {
      "type": "string",
      "enabled": true
    }
  ]
}
```

- `types` (`updateNotificationSettings.response.200.types`; array<object>, required)
  - `type` (`updateNotificationSettings.response.200.types.type`; string, required)
  - `enabled` (`updateNotificationSettings.response.200.types.enabled`; boolean, required)

### default

A problem; see https://api.sherpo.io/customer/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`updateNotificationSettings.response.default.type`; string, required)
  - format `uri`
- `title` (`updateNotificationSettings.response.default.title`; string, required)
- `status` (`updateNotificationSettings.response.default.status`; integer, required)
- `detail` (`updateNotificationSettings.response.default.detail`; string, required)
- `code` (`updateNotificationSettings.response.default.code`; string, optional)
- `context` (`updateNotificationSettings.response.default.context`; object, optional)
- `reached_core` (`updateNotificationSettings.response.default.reached_core`; boolean, optional)
- `core_answer` (`updateNotificationSettings.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/customer-api/reference/update-notification-settings/index.md
