Skip to main content

Get notification

GET /api/notifications/{id}
Returns detailed information about a specific notification, including the associated subject and meeting data.

Path parameters

id
string
required
Unique notification identifier

Response

id
string
Unique notification identifier
userId
string
User who received the notification
subject
object
The council subject this notification is about
channel
string
Notification delivery channel: email, whatsapp, or sms
status
string
Notification status: pending, sent, failed, or cancelled
sentAt
string | null
Timestamp when notification was sent (ISO 8601)
readAt
string | null
Timestamp when notification was read (ISO 8601)
createdAt
string
Timestamp when notification was created (ISO 8601)

Error responses

404
Error
Notification not found
{
  "error": "Notification not found"
}
500
Error
Internal server error
{
  "error": "Internal server error"
}

Notification channels

OpenCouncil supports multiple notification delivery channels:

Email

Notifications sent via email using the Resend service. Includes rich formatting and links to the relevant subject.

WhatsApp

Notifications sent via WhatsApp using the Bird API. Supports text messages with subject information and meeting links.

SMS

Notifications sent via SMS using the Bird API. Concise text notifications for users who prefer traditional messaging.

Notification matching

Notifications are sent based on user preferences:
  • Topic preferences: Users receive notifications for subjects matching their selected topics
  • Location preferences: Users can subscribe to subjects in specific geographic areas
  • Person preferences: Users can follow specific council members
  • Party preferences: Users can follow specific political parties

Notification workflow

  1. Creation: When a new meeting is released, notifications are generated for matching user preferences
  2. Approval: Notifications go through an approval queue before being sent
  3. Delivery: Approved notifications are sent via the user’s preferred channel(s)
  4. Tracking: Delivery status and read receipts are tracked for analytics

Rate limiting

The notification system includes rate limiting to prevent overwhelming users and external services:
  • 500ms delay between consecutive sends
  • Batch processing for multiple recipients
  • Retry logic with exponential backoff for failed deliveries

Build docs developers (and LLMs) love