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"
}
}
Create a new announcement (Admin only)
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"
}
}
true if not specified.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"
}
}