Skip to main content

Notifications

Fetch and manage your in-app notification feed. Supports both session auth and API key auth.

Each notification has a severity field (info, warning, error) and an optional link for deep-linking to a related resource.


List Notifications​

GET https://api.indreelforge.com/api/notifications

Returns the 50 most recent notifications for the authenticated user, ordered newest first, along with a total unread count.

curl \
-H 'Authorization: Apikey YOUR_API_KEY' \
https://api.indreelforge.com/api/notifications

Response​

{
"notifications": [
{
"id": 42,
"type": "upload_failed",
"title": "Upload failed",
"message": "Your post to Instagram could not be published.",
"link": "/dashboard/history/123",
"severity": "error",
"read_at": null,
"created_at": "2025-06-01T10:00:00.000Z"
},
{
"id": 41,
"type": "upload_success",
"title": "Post published",
"message": "Your video was posted to YouTube.",
"link": "/dashboard/history/122",
"severity": "info",
"read_at": "2025-06-01T09:45:00.000Z",
"created_at": "2025-06-01T09:30:00.000Z"
}
],
"unread": 1
}

A read_at value of null means the notification has not been read.


Mark All Notifications Read​

POST https://api.indreelforge.com/api/notifications/mark-all-read

Sets read_at to the current timestamp on every unread notification for the authenticated user.

curl \
-H 'Authorization: Apikey YOUR_API_KEY' \
-X POST https://api.indreelforge.com/api/notifications/mark-all-read

Response​

{
"success": true
}

Mark Single Notification Read​

POST https://api.indreelforge.com/api/notifications/:id/read

Marks one notification as read. Returns 404 if the notification does not exist, belongs to another user, or is already marked read.

curl \
-H 'Authorization: Apikey YOUR_API_KEY' \
-X POST https://api.indreelforge.com/api/notifications/42/read

Response​

{
"success": true
}

Error cases:

StatusReason
400:id is not a valid positive integer
404Notification not found or already read

Delete Notification​

DELETE https://api.indreelforge.com/api/notifications/:id

Permanently deletes a notification. Only the owning user's notifications can be deleted.

curl \
-H 'Authorization: Apikey YOUR_API_KEY' \
-X DELETE https://api.indreelforge.com/api/notifications/42

Response​

{
"success": true
}

Error cases:

StatusReason
400:id is not a valid positive integer
404Notification not found or belongs to another user