Skip to main content

Notifications

The Notifications API gives you programmatic access to your own notification feed. List notifications with cursor pagination, mark them read or unread, and delete the ones you no longer need.

Quick Start​

# List your notification feed (cursor pagination)
curl -X GET https://api.copera.ai/public/v1/notifications \
-H "Authorization: Bearer cp_pat_YOUR_TOKEN"

# Mark a notification as read
curl -X PATCH https://api.copera.ai/public/v1/notifications/NOTIFICATION_ID \
-H "Authorization: Bearer cp_pat_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "status": "read" }'

# Delete a notification
curl -X DELETE https://api.copera.ai/public/v1/notifications/NOTIFICATION_ID \
-H "Authorization: Bearer cp_pat_YOUR_TOKEN"

Available in​

Public APICLIMCPCopera AI
✅ Full✅ Full✅ Full—

The CLI and the hosted MCP server cover listing, status changes, and deletion. Notifications are not exposed to the in-app Copera AI assistant.

The notification model​

A notification belongs to a single user in a single workspace. Each one carries:

  • type — what kind of event it represents.
  • status — READ or UNREAD.
  • data — a type-specific payload describing the event.
  • sender — who triggered it (when applicable), plus readAt and timestamps.
  • Grouping fields — groupCount, groupStartedAt, and groupSenderIds for notifications that bundle several related events.

Listing notifications​

GET the notifications endpoint to retrieve your feed. It uses cursor pagination based on notification ids:

  • after — return notifications newer than this id.
  • before — return notifications older than this id.

The response includes the notifications array, the total count, and the current unreadCount:

{
"notifications": [ /* … */ ],
"count": 40,
"unreadCount": 3
}

See Pagination for the cursor conventions.

Marking read or unread​

PATCH a single notification with a status of read or unread:

curl -X PATCH "https://api.copera.ai/public/v1/notifications/{notificationId}" \
-H "Authorization: Bearer cp_pat_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "status": "read" }'

The response is the updated notification object.

Deleting a notification​

DELETE a notification to remove it from your feed. The response returns the deleted notification's _id.

Authentication & scope​

Notifications endpoints require a Personal Access Token (cp_pat_) with the access_notifications scope — they always operate on the token holder's own feed. A token missing the scope gets a 403. See Authentication.

Reference​