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: Roster Events:
  • User created - When a user is created
  • User updated - When a user is updated
  • User deactivated - When a user is deactivated
  • User deleted - When a user is deleted
  • User added to Split - When a user is added to a split
  • User invitation sent - When a user invitation is sent
  • User removed from Split - When a user is removed from a split
  • Artist created - When an artist is created
  • Artist updated - When an artist is updated
  • Artist deactivated - When an artist is deactivated
  • Artist deleted - When an artist is deleted
Catalog Events:
  • Track created - When an asset/track is created
  • Track updated - When an asset/track is updated
  • Track deactivated - When an asset/track is deactivated
  • Track deleted - When an asset/track is deleted
  • Release created - When a product/release is created
  • Release updated - When a product/release is updated
  • Release deactivated - When a product/release is deactivated
  • Release deleted - When a product/release is deleted
Accounting Events:
  • Payment request sent - When a payment request is sent
  • Payment request approved - When a payment request is approved
  • Payment request rejected - When a payment request is rejected
  • Payment made processing - When payment is being processed
  • Payment made completed - When payment is completed
  • Payment made failed - When payment fails
  • Payment deleted - When a payment is deleted
  • Payment processing - When payment processing starts
  • Payment completed - When payment is completed
  • Expense created - When an expense is created
  • Expense updated - When an expense is updated
  • Expense deleted - When an expense is deleted
  • Revenue created - When revenue is created
  • Revenue updated - When revenue is updated
  • Revenue deleted - When revenue is deleted
Royalty File Events:
  • Royalty File uploaded - When a royalty file is uploaded
  • Royalty File processed - When a royalty file is processed
  • Royalty File processing failed - When royalty file processing fails
  • royalty_file_deleted - When a royalty file is deleted
Release Management Events:
  • Release submitted for review - When a release is submitted
  • Release approved - When a release is approved
  • Release rejected - When a release is rejected
  • Release auto-created - When a release is auto-created
  • Release auto-creation failed - When release auto-creation fails
  • Release feedback added - When feedback is added to a release
  • Release updated (management) - When a release is updated by management
  • Release created (Auto) - When a release is auto-created
  • Release deleted (Auto) - When a release is auto-deleted
  • Release error - When a release error occurs
  • Release status reverted - When release status is reverted
File Processing Events:
  • File processing started - When file processing starts
  • File processing complete - When file processing completes
  • File processing failed - When file processing fails
DDEX Provider Events:
  • Provider delivery initiated - When provider delivery starts
  • Provider delivery completed - When provider delivery completes
  • Provider delivery failed - When provider delivery fails
  • Provider delivery acknowledged - When provider acknowledges delivery
  • Provider status update - When provider status is updated
Artist Resolution Events:
  • Artist auto-created - When an artist is auto-created
  • Artist resolution failed - When artist resolution fails
Merlin Import Events:
  • Merlin files discovered - When Merlin files are discovered
  • Merlin download complete - When Merlin download completes
  • Merlin import approved - When Merlin import is approved
  • Merlin import completed - When Merlin import completes
  • Merlin import failed - When Merlin import fails
Billing Events:
  • Billing success - When billing succeeds
  • Billing error - When billing error occurs
  • Billing warning - When billing warning occurs
The channels can be any of the following:
  • email - Email notifications
  • in_app - In-app notifications
  • push - Push notifications
  • webhook - Webhook notifications
The isEnabled must be a boolean:
  • true - Enable notifications
  • false - Disable notifications
Note: Channel values are case-sensitive and must be lowercase.

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[]