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

KeyDatatypeRequiredDescription
X-MAGICBELL-API-KEYstring(Required) The (public) API key of your MagicBell project.
X-MAGICBELL-USER-EXTERNAL-IDstringID of the user. Provide the X-MAGICBELL-USER-EMAIL header instead if you identify users by email.
X-MAGICBELL-USER-EMAILstringEmail address of the user. Provide the X-MAGICBELL-USER-EXTERNAL-ID header instead if you identify users by ID.
X-MAGICBELL-USER-HMACstringHMAC calculated with the API secret and ID, or email, of the user. Required if the project has HMAC enabled.
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;notification_preferences&quot;:{&quot;categories&quot;:[{&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;slug&quot;:&quot;\u003cstring\u003e&quot;,&quot;channels&quot;:[{&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;slug&quot;:&quot;\u003cstring\u003e&quot;,&quot;enabled&quot;:&quot;\u003cboolean\u003e&quot;},{&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;slug&quot;:&quot;\u003cstring\u003e&quot;,&quot;enabled&quot;:&quot;\u003cboolean\u003e&quot;}]},{&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;slug&quot;:&quot;\u003cstring\u003e&quot;,&quot;channels&quot;:[{&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;slug&quot;:&quot;\u003cstring\u003e&quot;,&quot;enabled&quot;:&quot;\u003cboolean\u003e&quot;},{&quot;label&quot;:&quot;\u003cstring\u003e&quot;,&quot;slug&quot;:&quot;\u003cstring\u003e&quot;,&quot;enabled&quot;:&quot;\u003cboolean\u003e&quot;}]}]}}