Skip to content

Commit e66b21a

Browse files
fix: Update Inbox Preferences docs
1 parent 4e77b27 commit e66b21a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

inbox/headless/api-reference.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ await novu.notifications.revertSecondary({
471471
### Methods
472472

473473
- [list](#list)
474-
- [update](#update)
475474

476475
### Preference Interface
477476

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

517+
## Preference
518+
519+
### Methods
520+
521+
- [update](#update)
522+
518523
### update
519524

520-
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.
525+
Update the global or per workflow channel preferences of the subscriber.
526+
527+
If `workflowId` is provided, it updates the channel preferences of the specific workflow. Otherwise, it updates the global channel preferences.
521528

522529
#### Params
523530

@@ -537,7 +544,7 @@ type ChannelPreference = {
537544
#### Usage
538545

539546
```typescript
540-
await novu.preferences.update({
547+
await preference.update({
541548
workflowId: 'workflow_id',
542549
channelPreferences: { email: false, sms: false },
543550
});

0 commit comments

Comments
 (0)