Skip to content

Notifications

Notifications are messages generated by the system to inform users about important events. Notifications are user-specific and are returned only for the currently authenticated user. Notifications can be triggered by various actions around the application and allows users to stay informed about relevant updates.

FieldTypeDescriptionRequired
AuthorizationstringBearer token for authentication.Yes
FieldTypeDescriptionRequired
entitystringName or ID of the entity to import.Yes
FieldTypeDescriptionRequired
limitnumberPage size for notification list.No
pagenumberPagination page.No
readbooleanFilter by read state.No
FieldTypeDescription
idstringUnique identifier for the notification.
titlestringShort title of the notification.
messagestringDetailed message of the notification.
readbooleanWhether the notification has been read.
createdAtstringTimestamp when the notification was created.
unreadCountnumberCount of unread notifications (for unread count endpoint).
updatedCountnumberCount of notifications marked as read (for read-all endpoint).

Get all notifications for the current user

Section titled “Get all notifications for the current user”

Retrieve all notifications for the current user.

GET /api/v1/notifications

Example response:

{
"errors": [],
"status": 200,
"error": false,
"message": "Notifications fetched",
"data": [ { <Notification> } ],
"pagination": { <Pagination> }
}

Get count of unread notifications for the current user

Section titled “Get count of unread notifications for the current user”

Get count of unread notifications for the current user.

GET /api/v1/notifications/unread-count

Example response:

{
"errors": [],
"status": 200,
"error": false,
"message": "Unread count",
"data": { "unreadCount": 0 }
}

Mark a single notification as read.

PUT /api/v1/notifications/F0123456-7890-ABCD-EF00-00000000000/read

Example response:

{
"errors": [],
"status": 200,
"error": false,
"message": "Notification marked as read",
"data": {
"id": "F0123456-7890-ABCD-EF00-00000000000",
"read": true
}
}

Mark all unread notifications as read.

PUT /api/v1/notifications/read-all

Example response:

{
"errors": [],
"status": 200,
"error": false,
"message": "All notifications marked as read",
"data": { "updatedCount": 100 }
}

Delete a notification by ID.

DELETE /api/v1/notifications/F0123456-7890-ABCD-EF00-00000000000

Example response:

{
"errors": [],
"status": 200,
"error": false,
"message": "Notification deleted",
"data": {
"id": "F0123456-7890-ABCD-EF00-00000000000"
}
}