Skip to content

Commit

Permalink
fix: Update Inbox Preferences docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SokratisVidros committed Dec 27, 2024
1 parent 4e77b27 commit e66b21a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions inbox/headless/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ await novu.notifications.revertSecondary({
### Methods

- [list](#list)
- [update](#update)

### Preference Interface

Expand Down Expand Up @@ -515,9 +514,17 @@ Method fetch the global and workflows channel preferences of the subscriber.
await novu.preferences.list();
```

## Preference

### Methods

- [update](#update)

### update

Method updates the channel preferences of the subscriber. It updates the channel preferences of the subscriber for the specific workflow if `workflowId` is provided. If `workflowId` is not provided, it updates the global channel preferences of the subscriber. Multiple channels can be updated at once.
Update the global or per workflow channel preferences of the subscriber.

If `workflowId` is provided, it updates the channel preferences of the specific workflow. Otherwise, it updates the global channel preferences.

#### Params

Expand All @@ -537,7 +544,7 @@ type ChannelPreference = {
#### Usage

```typescript
await novu.preferences.update({
await preference.update({
workflowId: 'workflow_id',
channelPreferences: { email: false, sms: false },
});
Expand Down

0 comments on commit e66b21a

Please sign in to comment.