Notifications
List in-app notifications for the API key owner, mark them read, tune preferences, or clear history.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /notifications | List notifications (canonical pagination, filter: ?unreadOnly=true) |
| GET | /notifications/unread-count | Unread count |
| PUT | /notifications/:id/read | Mark one as read |
| PUT | /notifications/read-all | Mark all as read. Method is PUT (idempotent) — a POST to this path returns 405 METHOD_NOT_ALLOWED. |
| GET | /notifications/preferences | Current notification preferences |
| PUT | /notifications/preferences | Update preferences |
| DELETE | /notifications/:id | Delete one notification (an unknown or foreign id also answers 200; nothing is deleted) |
| DELETE | /notifications | Delete all read notifications; answers { "deletedCount": N } |
List notifications
Canonical pagination shape (the legacy totalPages alias has been retired in favour of pages).
curl -s -H "Authorization: Bearer pk_YOUR_KEY_HERE" \
"https://api.dcast.pro/api/v1/notifications?page=1&limit=20"
# Response
{
"success": true,
"data": {
"notifications": [
{
"id": "...",
"type": "VIDEO_READY",
"title": "Your video is ready",
"message": "...",
"read": false,
"createdAt": "2026-05-25T18:42:11.000Z"
}
],
"pagination": { "page": 1, "limit": 20, "total": 143, "pages": 8 }
}
}Unread count
curl -s -H "Authorization: Bearer pk_YOUR_KEY_HERE" \
"https://api.dcast.pro/api/v1/notifications/unread-count"
# Response
{ "success": true, "data": { "count": 7 } }Security & scope
Notifications are scoped to the API key owner. pk_* keys cannot list, read, or mutate notifications on any other user's feed. PUT /notifications/:id/read with a foreign id returns 404 NOT_FOUND.
