Mark all notifications read
Módulo Platform
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`.
- Requiere la capacidad inbox.notifications.write.
- Alcances de OAuth: inbox.
- Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
- Estados de error: 400, 401, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Respuesta 200: MarkAllReadResult
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| updated_count | integer | Sí |
{
"updated_count": 12
}Ejemplos de código
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