Skip to main content
POST
/
api
/
comunicados
/
admin
curl -X POST "https://api.example.com/api/comunicados/admin" \
  -H "Authorization: Bearer ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "titulo": "New Feature Release",
    "contenido": "We have released a new feature that allows you to track your requests in real-time.",
    "fecha_publicacion": "2026-03-10T09:00:00Z",
    "activo": true,
    "media_url": "https://example.com/media/feature-release.png"
  }'
{
  "message": "Comunicado creado exitosamente.",
  "comunicado": {
    "id_comunicado": 3,
    "titulo": "New Feature Release",
    "contenido": "We have released a new feature that allows you to track your requests in real-time.",
    "fecha_publicacion": "2026-03-10T09:00:00Z",
    "activo": true,
    "media_url": "https://example.com/media/feature-release.png",
    "fecha_creacion": "2026-03-09T14:25:00Z",
    "fecha_actualizacion": "2026-03-09T14:25:00Z"
  }
}

Overview

This endpoint allows administrators to create new announcements. Announcements can be created as active (published immediately) or inactive (draft mode).
This endpoint requires admin authentication. Only users with admin privileges can create announcements.

Request Body

titulo
string
required
The title of the announcement. This field is mandatory.
contenido
string
required
The content/body of the announcement. This field is mandatory.
fecha_publicacion
string
Publication date in ISO 8601 format. If not provided, defaults to the current timestamp.
activo
boolean
default:true
Whether the announcement should be active (published). Defaults to true if not specified.
media_url
string
URL to associated media such as images or videos.

Response

message
string
Success message confirming the announcement creation
comunicado
object
The newly created announcement object
id_comunicado
integer
Unique identifier for the announcement
titulo
string
Title of the announcement
contenido
string
Content/body of the announcement
fecha_publicacion
string
Publication date in ISO 8601 format
activo
boolean
Whether the announcement is active
media_url
string
URL to associated media
fecha_creacion
string
Creation timestamp in ISO 8601 format
fecha_actualizacion
string
Last update timestamp in ISO 8601 format
curl -X POST "https://api.example.com/api/comunicados/admin" \
  -H "Authorization: Bearer ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "titulo": "New Feature Release",
    "contenido": "We have released a new feature that allows you to track your requests in real-time.",
    "fecha_publicacion": "2026-03-10T09:00:00Z",
    "activo": true,
    "media_url": "https://example.com/media/feature-release.png"
  }'
{
  "message": "Comunicado creado exitosamente.",
  "comunicado": {
    "id_comunicado": 3,
    "titulo": "New Feature Release",
    "contenido": "We have released a new feature that allows you to track your requests in real-time.",
    "fecha_publicacion": "2026-03-10T09:00:00Z",
    "activo": true,
    "media_url": "https://example.com/media/feature-release.png",
    "fecha_creacion": "2026-03-09T14:25:00Z",
    "fecha_actualizacion": "2026-03-09T14:25:00Z"
  }
}

Update Announcement

Update an existing announcement

Deactivate Announcement

Deactivate an announcement to hide it from users

Build docs developers (and LLMs) love