Skip to main content
PUT
/
api
/
comunicados
/
admin
/
:id
curl -X PUT "https://api.example.com/api/comunicados/admin/3" \
  -H "Authorization: Bearer ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "titulo": "Updated Feature Release",
    "contenido": "We have released an updated version of the feature with improved performance."
  }'
{
  "message": "Comunicado actualizado exitosamente."
}

Overview

This endpoint allows administrators to update an existing announcement. Any fields provided in the request body will be updated, while omitted fields will remain unchanged.
This endpoint requires admin authentication. Only users with admin privileges can update announcements.

Path Parameters

id
integer
required
The unique identifier of the announcement to update

Request Body

titulo
string
Updated title of the announcement
contenido
string
Updated content/body of the announcement
fecha_publicacion
string
Updated publication date in ISO 8601 format
activo
boolean
Whether the announcement should be active (published)
media_url
string
Updated URL to associated media. Can be set to null to remove existing media.

Response

message
string
Success message confirming the announcement update
curl -X PUT "https://api.example.com/api/comunicados/admin/3" \
  -H "Authorization: Bearer ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "titulo": "Updated Feature Release",
    "contenido": "We have released an updated version of the feature with improved performance."
  }'
{
  "message": "Comunicado actualizado exitosamente."
}

Notes

Only the fields included in the request body will be updated. You don’t need to send all fields - partial updates are supported.
If no changes are detected (i.e., the provided data is identical to the existing data), the API will return a 404 status with the message “Comunicado no encontrado o sin cambios para actualizar.”

Create Announcement

Create a new announcement

Deactivate Announcement

Deactivate an announcement to hide it from users

Get Announcement by ID

View the current state of an announcement

Build docs developers (and LLMs) love