Skip to content

Mark all notifications read

Platform module

POST/notifications/mark-all-readnotifications.markAllRead

Marks every unread notification of the caller as read. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requires the capability inbox.notifications.write.
  • OAuth scopes: inbox.
  • Send an Idempotency-Key header. A replay with the same key returns the original response.
  • Error statuses: 400, 401, 409, 422, 429. Errors are RFC 9457 problem details.

Response 200: MarkAllReadResult

notifications.markAllRead: MarkAllReadResult
FieldTypeRequiredDescription
updated_countintegerYes
{
  "updated_count": 12
}

Code samples

curl -X POST "$XOS_BASE_URL/notifications/mark-all-read" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
const { data } = await xos.notifications.markAllRead();
response = xos.notifications.mark_all_read()
xos notifications mark-all-read