Skip to main content
Version: .1.1.3

Notifications API

The Notifications API provides a per-user notification feed for tracking activity across projects, tasks, milestones, and comments. Notifications are user-scoped and support filtering by read status and event type.

Data model

FieldTypeDescription
idstringUnique identifier (e.g. notif_01)
usernamestringUsername of the notification recipient
typestringEvent type: task_assigned, comment_added, milestone_reached, or project_updated
messagestringHuman-readable notification text
resourceTypestringType of the related resource (task, project, milestone, comment)
resourceIdstringID of the related resource
readbooleanWhether the notification has been read
createdAtstringISO 8601 creation timestamp

Endpoints

List notifications

GET /api/notifications

Query parameters:

ParameterTypeDescription
usernamestringFilter by notification recipient
typestringFilter by event type
readbooleanFilter by read status (true or false)

All filters are optional and can be combined.

Response: 200 OK

{
"data": [
{
"id": "notif_01",
"username": "bob",
"type": "task_assigned",
"message": "You were assigned to \"Implement responsive navigation\".",
"resourceType": "task",
"resourceId": "task_02",
"read": false,
"createdAt": "2025-12-01T09:05:00Z"
}
],
"count": 1
}

Get notification

GET /api/notifications/:id

Response: 200 OK with the full notification object.

Error: 404 Not Found if the notification does not exist.

Create notification

POST /api/notifications

Request body:

{
"username": "alice",
"type": "comment_added",
"message": "New comment on your task",
"resourceType": "task",
"resourceId": "task_05"
}
FieldRequiredDefault
usernameyes
typeyes
messageyes
resourceTypenonull
resourceIdnonull

Response: 201 Created with the new notification including auto-generated id, read (always false), and createdAt fields.

Mark notification as read

PATCH /api/notifications/:id/read

Sets the read field to true for a single notification.

Response: 200 OK with the updated notification.

Error: 404 Not Found if the notification does not exist.

Mark all notifications as read

PATCH /api/notifications/read-all

Marks all notifications as read. Optionally filter by user.

Query parameters:

ParameterTypeDescription
usernamestringMark only this user's notifications as read

Response: 200 OK

{
"data": {
"markedRead": 3
}
}

The markedRead count reflects how many notifications changed from unread to read.

Delete notification

DELETE /api/notifications/:id

Response: 200 OK

{
"data": {
"id": "notif_01",
"deleted": true
}
}

Error: 404 Not Found if the notification does not exist.