# Announcements

Manage workspace announcements: the banners set on Tools → Announcements, shown on members' dashboards from `start_date` to `end_date`. The endpoints call the page's own service, so they apply its limits (subject 255 characters, message 500), strip HTML the same way and write the same audit log entries. An announcement with no teams is shown to the whole workspace. A new one is always active; `status` on update pauses or resumes it. The banner is cached for up to 10 minutes, so other members can see a change that much later, on the page and through the API alike. Owner and Executive Manager only, whichever roles the workspace owner switches on for the API (403 otherwise). The public id and the team ids are opaque encoded strings: a malformed id or one from another workspace answers 422, a deleted announcement 404.

 - [GET /announcements](https://api-docs.webwork-tracker.com/api/announcements/getannouncements.md): List the workspace's announcements, paginated, with `visibility` (`workspace`: every member; `teams`: only the listed teams) and the teams each one is shown to. Deleted announcements are not listed. *
 - [POST /announcements](https://api-docs.webwork-tracker.com/api/announcements/createannouncement.md): Create an announcement. It is active at once and shows from `start_date` to `end_date` to the audience `visibility` names: every member (`workspace`), or only the members of `team_ids` (`teams`). It i
 - [GET /announcements/{announcement_id}](https://api-docs.webwork-tracker.com/api/announcements/getannouncement.md): Retrieve one announcement with the teams it is shown to. A malformed id or one from another workspace answers 422; a deleted announcement answers 404. **Access by role**: the Owner and an Executive Ma
 - [PUT /announcements/{announcement_id}](https://api-docs.webwork-tracker.com/api/announcements/updateannouncement.md): Edit an announcement. **Partial**: only the fields sent change, and at least one is required (422). `team_ids` replaces the teams and cannot be emptied on its own: only `visibility` `workspace` opens
 - [DELETE /announcements/{announcement_id}](https://api-docs.webwork-tracker.com/api/announcements/deleteannouncement.md): Delete an announcement: its banner stops showing. The row is soft-deleted, as on the page, and neither the page nor the API restores it; afterwards the id answers 404. Writes the page's audit log entr
