Update user notification preferences
PUT {{baseUrl}}/notification_preferences
Update a user's notification preferences. These preferences will be applied only to channels you enabled for your project.
Request Body
{"notification_preferences"=>{"categories"=>[{"label"=>"<string>", "slug"=>"<string>", "channels"=>[{"label"=>"<string>", "slug"=>"<string>", "enabled"=>"<boolean>"}, {"label"=>"<string>", "slug"=>"<string>", "enabled"=>"<boolean>"}]}, {"label"=>"<string>", "slug"=>"<string>", "channels"=>[{"label"=>"<string>", "slug"=>"<string>", "enabled"=>"<boolean>"}, {"label"=>"<string>", "slug"=>"<string>", "enabled"=>"<boolean>"}]}]}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-MAGICBELL-API-KEY | string | (Required) The (public) API key of your MagicBell project. | |
X-MAGICBELL-USER-EXTERNAL-ID | string | ID of the user. Provide the X-MAGICBELL-USER-EMAIL header instead if you identify users by email. | |
X-MAGICBELL-USER-EMAIL | string | Email address of the user. Provide the X-MAGICBELL-USER-EXTERNAL-ID header instead if you identify users by ID. | |
X-MAGICBELL-USER-HMAC | string | HMAC calculated with the API secret and ID, or email, of the user. Required if the project has HMAC enabled. | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"notification_preferences":{"categories":[{"label":"\u003cstring\u003e","slug":"\u003cstring\u003e","channels":[{"label":"\u003cstring\u003e","slug":"\u003cstring\u003e","enabled":"\u003cboolean\u003e"},{"label":"\u003cstring\u003e","slug":"\u003cstring\u003e","enabled":"\u003cboolean\u003e"}]},{"label":"\u003cstring\u003e","slug":"\u003cstring\u003e","channels":[{"label":"\u003cstring\u003e","slug":"\u003cstring\u003e","enabled":"\u003cboolean\u003e"},{"label":"\u003cstring\u003e","slug":"\u003cstring\u003e","enabled":"\u003cboolean\u003e"}]}]}}