Skip to main content

Notifications

3 API calls in this section.

List Notifications

Communications & Feedback / Messaging / Notifications
GET/messaging/notifications?page=1&limit=20&read_status=false&notification_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)

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/messaging/notifications?page=1&limit=20&read_status=false&notification_type=&tenant_id={{tenant_id}}" \2  --header "Authorization: Bearer {{access_token}}" \3  --header "Content-Type: application/json"

Query parameters

pageOptional
query string

1

Page number for pagination (default: 1)

limitOptional
query string

20

Number of notifications per page (max 100, default: 20)

read_statusOptional
query string

false

Filter by read status: 'true', 'false', or omit for all

notification_typeOptional
query string

Filter by notification type (delivery_status_update, new_assignment, etc.)

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth token)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200OK
Error - Tenant Not Found404Not Found

Mark Notifications as Read

Communications & Feedback / Messaging / Notifications
PUT/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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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}'
Request body
json
1{2  "notification_ids": [3    "uuid1",4    "uuid2",5    "uuid3"6  ]7}

Query parameters

tenant_idOptional
query string

{{tenant_id}}

UUID of the tenant (required if not in auth token)

Request body fields

notification_idsExample
array<string>

Example field from the request body.

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200OK
Error - Invalid Notification IDs400Bad Request
Error - Tenant Not Found404Not Found

Get Notification Statistics

Communications & Feedback / Messaging / Notifications
GET/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

Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
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
query string

{{tenant_id}}

UUID of the tenant (required if not in auth token)

Headers

AuthorizationOptional
header string

Bearer {{access_token}}

Content-TypeOptional
header string

application/json

Responses

Success Response200OK
Error - Tenant Not Found404Not Found