Announcements
What's-new items and page/intro guides: a catalogue owned by the backend, shown once per user.
Live announcements for the caller's role
Only the ones published now and addressed to one of the caller's roles. Unseen by default; include_seen=1 also returns the seen ones, with their seen_at.
Mark an announcement as seen
Idempotent: a second call keeps the first timestamp.
Every announcement, drafts and expired included
Every announcement, drafts and expired included
Create an announcement
Required: key (unique slug), kind, title. Optional: page, audience (roles, empty = everyone), body, content, priority, published_from / published_to (Y-m-d H:i:s, default from = now), status (active|draft).
One announcement, with how many users have seen it
One announcement, with how many users have seen it
Soft-delete an announcement
status becomes deleted and deleted_at is set; the view rows are kept.
Update an announcement
Only the fields sent are changed. Changing key is allowed even when users already saw the item.