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": [
    {
      "notificationType": "ARTIST_CREATED",
      "channels": [
        "email",
        "in_app",
        "push"
      ],
      "isEnabled": true
    },
    {
      "notificationType": "ARTIST_DELETED",
      "channels": [
        "email",
        "in_app",
        "push"
      ],
      "isEnabled": true
    }
  ]
}'
{
  "status": "success",
  "message": "Notification preferences updated successfully",
  "data": {
    "preferences": [
      {
        "id": "65fdcd80-cada-4c76-83ec-70d8e895774d",
        "notificationType": "USER_INVITATION_SENT",
        "channels": [
          "EMAIL",
          "IN_APP"
        ],
        "isEnabled": true,
        "TenantId": 2,
        "TenantUserId": "c75c54e3-b6e0-4b89-b443-928727b9a931",
        "createdAt": "2025-05-27T19:55:02.423Z",
        "updatedAt": "2025-05-27T19:55:02.423Z"
      }
    ]
  }
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/notifications/preferences', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "preferences": [
      {
        "notificationType": "ARTIST_CREATED",
        "channels": [
          "email",
          "in_app",
          "push"
        ],
        "isEnabled": true
      },
      {
        "notificationType": "ARTIST_DELETED",
        "channels": [
          "email",
          "in_app",
          "push"
        ],
        "isEnabled": true
      }
    ]
  })
});

const data = await response.json();
console.log(data);

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:
[
{
"notificationType": "ARTIST_CREATED",
"channels": ["email", "in_app", "push"],
"isEnabled": true
},
{
"notificationType": "ARTIST_DELETED",
"channels": ["email", "in_app", "push"],
"isEnabled": true
}
]

Response

Notification preferences updated successfully

status
string
Example:

"success"

message
string
Example:

"Notification preferences retrieved successfully"

data
object[]