curl --request GET \
--url https://api.royalti.io/notifications/preferences \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "Notification preferences retrieved 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"
},
{
"id": "9e522898-358c-4208-9f7d-94bac43b7cf4",
"notificationType": "Artist deleted",
"channels": [
"email",
"in_app",
"push"
],
"isEnabled": true,
"TenantId": 2,
"TenantUserId": "c75c54e3-b6e0-4b89-b443-928727b9a931",
"createdAt": "2025-05-27T21:17:56.973Z",
"updatedAt": "2025-05-27T21:17:56.973Z"
}
]
}
}Retrieves the notification preferences for the current user.
curl --request GET \
--url https://api.royalti.io/notifications/preferences \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "Notification preferences retrieved 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"
},
{
"id": "9e522898-358c-4208-9f7d-94bac43b7cf4",
"notificationType": "Artist deleted",
"channels": [
"email",
"in_app",
"push"
],
"isEnabled": true,
"TenantId": 2,
"TenantUserId": "c75c54e3-b6e0-4b89-b443-928727b9a931",
"createdAt": "2025-05-27T21:17:56.973Z",
"updatedAt": "2025-05-27T21:17:56.973Z"
}
]
}
}const response = await fetch('https://api.royalti.io/notifications/preferences', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"