Overview
The Announcements API allows administrators to create, update, and manage site-wide announcements that are displayed to users during a specified time period.Authentication
All endpoints require:- Valid authentication token
- Administrator role/permissions
- Bearer token in Authorization header
Announcement Structure
Announcements contain the following fields:| Field | Type | Description |
|---|---|---|
announcement_id | integer | Unique identifier for the announcement |
content | string | The announcement message content |
start_at | datetime | When the announcement becomes active |
end_at | datetime | When the announcement expires |
created_at | datetime | When the announcement was created |
updated_at | datetime | When the announcement was last updated |
Endpoints
List Announcements
Get a paginated list of current announcements.By default, this endpoint returns only current announcements (where the current time is between
start_at and end_at).- Standard pagination and filtering parameters
- Supports field selection and includes
Create Announcement
Create a new announcement.content- The announcement messagestart_at- Start date/time for the announcementend_at- End date/time for the announcement
Get Announcement
Retrieve a specific announcement by ID.id- The announcement ID
Update Announcement
Update an existing announcement.id- The announcement ID
Delete Announcement
Permanently delete an announcement.id- The announcement ID
Usage Examples
Creating a Maintenance Announcement
Updating an Announcement
Best Practices
Timing Announcements
Timing Announcements
Set
start_at slightly before the actual event to ensure users see the announcement in advance. For maintenance, consider starting the announcement 24-48 hours early.Clear Messaging
Clear Messaging
Keep announcement content concise and actionable. Include specific times with timezone information (UTC recommended).
Cleanup
Cleanup
Regularly delete expired announcements to keep the database clean. Consider setting up automated cleanup for announcements older than 30 days past their
end_at date.Related
Feature Flags
Manage feature toggles
Database Dumps
Download database backups