Skip to main content
PUT
/
notifications
/
preferences
Update Notification Preferences
curl --request PUT \
  --url https://api.royalti.io/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.

Description

Required Permissions

  • notifications:preferences:update
Request Body The request body array must contain at least one notification preference object. The object must contain the following properties:
  • notificationType: The notification type
  • channels: The notification channels
  • isEnabled: Whether the notification is enabled
The notificationType can be any of the following:
  • USER_CREATED
  • USER_UPDATED
  • USER_DEACTIVATED
  • USER_DELETED
  • USER_ADDED_TO_SPLIT
  • USER_INVITATION_SENT
  • USER_REMOVED_FROM_SPLIT
  • ARTIST_CREATED
  • ARTIST_UPDATED
  • ARTIST_DEACTIVATED
  • ARTIST_DELETED
  • ASSET_CREATED
  • ASSET_UPDATED
  • ASSET_DEACTIVATED
  • ASSET_DELETED
  • PRODUCT_CREATED
  • PRODUCT_UPDATED
  • PRODUCT_DEACTIVATED
  • PRODUCT_DELETED
  • PAYMENT_REQUEST_SENT
  • PAYMENT_REQUEST_APPROVED
  • PAYMENT_REQUEST_REJECTED
  • PAYMENT_MADE_PROCESSING
  • PAYMENT_MADE_COMPLETED
  • PAYMENT_MADE_FAILED
  • PAYMENT_DELETED
  • EXPENSE_CREATED
  • EXPENSE_UPDATED
  • EXPENSE_DELETED
  • REVENUE_CREATED
  • REVENUE_UPDATED
  • REVENUE_DELETED
The channels can be any of the following:
  • EMAIL
  • IN_APP
  • PUSH
The isEnabled can be any of the following:
  • true
  • false

Code Examples

const response = await fetch('https://api.royalti.io/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 array 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[]