Fetch user notification preferences
GET {{baseUrl}}/notification_preferences
Fetch a user's notification preferences. If a user does not disable a channel explicitly, we would send notifications through that channel as long as your project is enabled.
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. | |
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"}]}]}}