Predict.aiDocs
Notifications

Read the feed

List your notifications, mark one read, or mark everything read.

List notifications

Newest first, paginated:

curl "$API_BASE/v1/notifications/?per_page=25&unread=true" \
  -H "Authorization: Bearer $TOKEN"
{
  "data": {
    "items": [
      {
        "notification_id": "ntf_7C0A91B4E2D64F58A31006",
        "event_code": "training.completed",
        "category": "modeling",
        "severity": "success",
        "title": "Training complete",
        "body": "Daily sales forecaster finished in 4m 12s.",
        "link": "/workspaces/8b1f3c2a-…/trainings/5d9e02f7-…",
        "metadata": {
          "training_id": "5d9e02f7-…",
          "model_name": "Daily sales forecaster",
          "workspace_id": "8b1f3c2a-…",
          "duration_s": 252
        },
        "created_at": "2026-07-15T09:41:07+00:00",
        "read_at": null
      }
    ],
    "pagination": { "page": 1, "per_page": 25, "total": 42 },
    "unread_count": 3
  }
}

metadata is the raw context of the event (IDs, names, numbers) so you can route on it without parsing the human-readable body.

Query parameters

ParameterMeaning
per_page optionalPage size, capped at 100. Defaults to 50.
page optional1-based page number. Defaults to 1.
unread optionaltrue returns only items with read_at: null.
since optionalISO 8601 datetime; only items created after it. Useful for fetching deltas after a stream reconnect.

Errors

StatusWhyExample message
400page or per_page isn't an integer"Invalid pagination args"
401Missing or invalid token"Unauthorized"

Mark one read

curl -X POST "$API_BASE/v1/notifications/ntf_7C0A91B4E2D64F58A31006/read" \
  -H "Authorization: Bearer $TOKEN"
{
  "data": {
    "notification_id": "ntf_7C0A91B4E2D64F58A31006",
    "read_at": "2026-07-15T09:45:31+00:00"
  }
}

The call is idempotent: re-marking an already-read notification (or an ID that doesn't exist in your feed) still returns 200.

Mark all read

Stamps every unread item in your feed in one call:

curl -X POST "$API_BASE/v1/notifications/mark-all-read" \
  -H "Authorization: Bearer $TOKEN"
{ "data": { "read_at": "2026-07-15T09:46:02+00:00" } }

On this page