Notifications
Use this endpoint to manipulate and obtain details on Salesbox’s Notifications.
Base Endpoint
https://segmentai.salesbox.com.br/api/notifications
Get Notification
GET /api/notifications/{id}
Get an individual Notification by ID.
HTTP Request
GET /api/notifications/ID
Response
Expected Response Code: 200
{
"notification": {
"id": 1,
"message": "New lead assigned to you",
"type": "lead_assigned",
"isRead": false,
"createdAt": "2024-01-15T10:00:00+00:00",
"modifiedAt": "2024-01-15T10:00:00+00:00",
"userId": 1,
"userName": "John Smith",
"details": {
"leadId": 123,
"leadName": "Jane Doe"
}
}
}
Notification Properties
Name |
Type |
Description |
|---|---|---|
|
int |
ID of the Notification |
|
string |
Notification message |
|
string |
Type of notification |
|
boolean |
Whether the notification has been read |
|
datetime |
Notification creation date/time |
|
datetime/null |
Notification last modified date/time |
|
int |
ID of the User the notification is for |
|
string |
Name of the User the notification is for |
|
object |
Additional details specific to the notification type |
List Notifications
GET /api/notifications
Get a list of notifications.
Query Parameters
Name |
Type |
Description |
|---|---|---|
|
string |
Text to search notifications by |
|
int |
Which page to display |
|
int |
How many records to return |
|
string |
Column to sort by |
|
string |
Sort direction: asc or desc |
|
boolean |
Filter by read status |
|
string |
Filter by notification type |
Mark as Read
POST /api/notifications/{id}/read
Mark a notification as read.
Mark All as Read
POST /api/notifications/read-all
Mark all notifications as read.
Delete Notification
DELETE /api/notifications/{id}/delete
Delete an existing notification.