Notifications
3 API calls in this section.
List Notifications
/messaging/notifications?page=1&limit=20&read_status=false¬ification_type=&tenant_id={{tenant_id}}Retrieve a paginated list of notifications for the current logged-in user, sorted by latest first. Authorization: - Requires valid authentication token - Users can only view their own notifications Query Parameters: - page: Page number for pagination (default: 1) - limit: Number of notifications per page (max 100, default: 20) - read_status: Filter by read status ('true', 'false', or omit for all) - notification_type: Filter by notification type - tenant_id: UUID of the tenant (required if not in auth token) Response: - Returns paginated list of notifications - Includes total unread count - Notifications are sorted by created_at descending (latest first)
1curl --request GET "$ONDI_BASE_URL/messaging/notifications?page=1&limit=20&read_status=false¬ification_type=&tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json"Query parameters
pageOptional1
Page number for pagination (default: 1)
limitOptional20
Number of notifications per page (max 100, default: 20)
read_statusOptionalfalse
Filter by read status: 'true', 'false', or omit for all
notification_typeOptionalFilter by notification type (delivery_status_update, new_assignment, etc.)
tenant_idOptional{{tenant_id}}
UUID of the tenant (required if not in auth token)
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
Mark Notifications as Read
/messaging/notifications/mark-read?tenant_id={{tenant_id}}Mark notifications as read for the current user. Users can only mark their own notifications as read. Request Body (Optional): - If notification_ids array is provided: marks only those specific notifications as read - If request body is empty or not provided: marks all unread notifications as read Validation: - The system validates that all provided notification IDs belong to the authenticated user - Only unread notifications are updated (already read notifications are skipped) - Returns error invalid_notification_ids with list of invalid IDs if any provided IDs don't exist or don't belong to the user
1curl --request PUT "$ONDI_BASE_URL/messaging/notifications/mark-read?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "notification_ids": [7 "uuid1",8 "uuid2",9 "uuid3"10 ]11}'1{2 "notification_ids": [3 "uuid1",4 "uuid2",5 "uuid3"6 ]7}Query parameters
tenant_idOptional{{tenant_id}}
UUID of the tenant (required if not in auth token)
Request body fields
notification_idsExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
Get Notification Statistics
/messaging/notifications/stats?tenant_id={{tenant_id}}Get notification statistics for the current user including total, unread, and read counts. Authorization: - Requires valid authentication token - Users can only view their own notification statistics Response: - Returns notification counts (total, unread, read) - Useful for displaying notification badges in UI
1curl --request GET "$ONDI_BASE_URL/messaging/notifications/stats?tenant_id={{tenant_id}}" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json"Query parameters
tenant_idOptional{{tenant_id}}
UUID of the tenant (required if not in auth token)
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json