Skip to main content
POST
/
api
/
v1
/
notifications
/
mark-read
curl --request POST \
  --url "${UNSTRUCTURED_API_URL}/api/v1/notifications/mark-read" \
  --header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}" \
  --header "Content-Type: application/json" \
  --data '{
    "notification_ids": [
      "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "b2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    ]
  }'
{
  "marked_count": 2
}

Documentation Index

Fetch the complete documentation index at: https://docs.unstructured.io/llms.txt

Use this file to discover all available pages before exploring further.

Provide exactly one of notification_ids, before, or mark_all. workflow_id is only valid when used with before or mark_all. This results in the following behaviors:
  • If you specify notification_ids only, it will mark all notifications with the specified IDs as read.
  • If you specify before only, it will mark all notifications created in the workspace before the specified timestamp as read.
  • If you specify mark_all only, it will mark at the time of the API call all existing notifications in the workspace as read.
  • If you specify workflow_id and before, it will mark all notifications created before the specified timestamp for the specified workflow as read.
  • If you specify workflow_id and mark_all, it will mark at the time of the API call all existing notifications associated with the specified workflow as read.

Body

notification_ids
array
Specific notification IDs to mark as read. Maximum 100 UUIDs.
before
string
Mark all notifications created before this ISO 8601 timestamp (in format YYYY-MM-DDTHH:MM:SSZ) as read.
mark_all
boolean
If true, mark all unread notifications as read. Default: false.
workflow_id
string
Scope the operation to a specific workflow. Only valid when used with before or mark_all.

Response

marked_count
integer
required
Number of notifications newly marked as read.
curl --request POST \
  --url "${UNSTRUCTURED_API_URL}/api/v1/notifications/mark-read" \
  --header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}" \
  --header "Content-Type: application/json" \
  --data '{
    "notification_ids": [
      "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "b2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e"
    ]
  }'
{
  "marked_count": 2
}