API Reference
Notifications API
API reference for reading notifications and managing notification preferences in Taifa Mail.
Base URL: https://govconnect.ke/v1
All endpoints require authentication via API Key or JWT cookie. API keys use the tfm_k_ prefix.
See Notification preferences for concepts.
List notifications
Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
unread | boolean | false | If true, return only unread notifications. |
category | string | -- | Filter by category (e.g. alerts, sends). |
limit | integer | 50 | Maximum results to return (1-200). |
Response:
total is the count of all notifications for the user; unread is the
count of those with read_at unset. Both ignore the limit and filters.
Mark a notification as read
Mark all as read
Get notification preferences
Returns the per-category channel matrix for the authenticated user.
Response:
Update notification preferences
Request body:
Valid channels are web, email and slack. Unknown keys are ignored.
Errors
| Status | Cause |
|---|---|
400 Bad Request | preferences is not an object. |
401 Unauthorized | Missing or invalid authentication. |
404 Not Found | Notification ID does not exist. |