Announcements
Deactivate Announcement
Deactivate an announcement to hide it from users (Admin only)
PUT
Overview
This endpoint allows administrators to deactivate (hide) an announcement from regular users. Deactivated announcements will not appear in the active announcements list and cannot be accessed by non-admin users.This endpoint requires admin authentication. Only users with admin privileges can deactivate announcements.
This is a soft delete operation. The announcement remains in the database but is hidden from users. Administrators can reactivate it later using the update endpoint.
Path Parameters
The unique identifier of the announcement to deactivate
Response
Success message confirming the announcement deactivation
Behavior
When an announcement is deactivated:- The
activofield is set tofalsein the database - The announcement will no longer appear in the GET
/api/comunicadosendpoint (active announcements list) - Attempts to access it via GET
/api/comunicados/:idwill return a 403 Forbidden error - Admin users can still view and manage the announcement through admin endpoints
Reactivating an Announcement
To reactivate a deactivated announcement, use the Update Announcement endpoint and setactivo: true in the request body:
Related Endpoints
Update Announcement
Update an announcement or reactivate it
Create Announcement
Create a new announcement
Get Active Announcements
View all currently active announcements