Set
Changed onSets the authenticated user's notification preferences, each addressed by scope rather than by ID. The batch is applied in one transaction: if any entry is rejected, none are written. Experience levels are applied before topic overrides, because setting a level replaces every topic preference for that experience, so an override sent alongside a level wins. The response reports what each scope now resolves to, in the order the entries were sent.
Request
- Base URLhttps://api.whop.com/api/v1
- AuthHTTP bearer
Headers
Pins the request to a dated API version.
Request body
The preferences to set, at most 100 per request.
Example request
{
"preferences": [
{
"level": "nothing",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
}
}
]
}Response
preferences set
Example response
{
"data": [
{
"level": "nothing",
"scope": {
"account_id": "biz_xxxxxxxxxxxxxx",
"channel": "in_app",
"experience_id": "exp_xxxxxxxxxxxxxx",
"team_account_id": "biz_xxxxxxxxxxxxxx",
"topic_id": "topic_xxxxxxxxxxxxxx"
},
"type": "notification_preference"
}
]
}Changes
- warning
added the new
emailenum value to thedata/items/scope/channelresponse property for the response status - info
added the new
emailenum value to the request propertypreferences/items/scope/channel
- warning
- breaking
removed the required property
data/items/objectfrom the response with the status
1 more change in this revision
- breaking