Skip to main content
PATCH
/
v1
/
notifications
/
{id}
/
read
Mark as read
curl --request PATCH \
  --url https://api.example.com/v1/notifications/{id}/read

Overview

Marks a single notification as read. This updates the notification’s status from unread to read and decrements the user’s unread count. Use List notifications to retrieve notification IDs. Required role: admin or member

Path parameters

id
string
required
The unique identifier of the notification to mark as read.

Response

Returns 200 OK with the updated notification object.
{
  "id": "ntf_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "type": "approval.requested",
  "message": "Remediation 'Scale payment processor connection pool from 50 to 150' requires your approval.",
  "status": "read",
  "incidentId": "inc_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "remediationId": "rem_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "createdAt": "2024-04-01T14:35:05Z",
  "readAt": "2024-04-01T14:40:22Z"
}
FieldTypeDescription
idstringUnique identifier for the notification
typestringNotification type
messagestringHuman-readable notification message
statusstringAlways read after a successful call
incidentIdstringAssociated incident identifier. May be null for system notifications
remediationIdstringAssociated remediation identifier. null if not remediation-related
createdAtstringISO 8601 timestamp when the notification was created
readAtstringISO 8601 timestamp when the notification was marked as read

Error responses

StatusError codeDescription
404not_foundNo notification with the given id exists for the authenticated user

Examples

curl https://api.causeflow.ai/v1/notifications/ntf_01HX9VTPQR3KF8MZWBYD5N6JCE/read \
  -X PATCH \
  -H "Authorization: Bearer <token>"