Skip to main content
PUT
/
notifications
/
preferences
Update Notification Preferences
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/notifications/preferences \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "preferences": [
    {
      "channel": "email",
      "enabled": true
    },
    {
      "channel": "push",
      "enabled": false
    }
  ]
}'
{
  "status": "success",
  "message": "Notification preferences updated successfully",
  "data": [
    {
      "channel": "email",
      "enabled": true
    },
    {
      "channel": "push",
      "enabled": false
    },
    {
      "channel": "in_app",
      "enabled": true
    }
  ]
}
Updates the notification preferences for the current user.

Required Permissions

  • notifications:preferences:update

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Request Body

Request Schema

FieldTypeRequiredDescription
preferencesarrayāœ…

Responses

āœ… 200 - Notification preferences updated successfully

āš ļø 400 - undefined

āš ļø 401 - undefined

āŒ 500 - undefined

Tags

Notifications

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
preferences
object[]
required
Minimum length: 1
Example:
[
{ "channel": "email", "enabled": true },
{ "channel": "push", "enabled": false }
]

Response

Notification preferences updated successfully

status
string
Example:

"success"

message
string
Example:

"Notification preferences retrieved successfully"

data
object[]
⌘I