Skip to main content
POST
/
api
/
contacto
Submit Contact Message
curl --request POST \
  --url https://api.example.com/api/contacto \
  --header 'Content-Type: application/json' \
  --data '
{
  "cliente_id": 123,
  "asunto": "<string>",
  "mensaje": "<string>"
}
'
{
  "message": "<string>",
  "contacto": {
    "contacto.id": 123,
    "contacto.cliente_id": 123,
    "contacto.asunto": "<string>",
    "contacto.mensaje": "<string>",
    "contacto.created_at": "<string>"
  },
  "400 Bad Request": {},
  "500 Internal Server Error": {}
}
This endpoint allows public clients to submit contact messages or inquiries to the medical center.

Authentication

No authentication required - this is a public endpoint.

Request Body

cliente_id
number
required
ID of the public client submitting the message
asunto
string
required
Subject or title of the message
mensaje
string
required
Message content or description

Response

message
string
Success message: “Mensaje enviado correctamente”
contacto
object
The created contact message object
contacto.id
number
Message ID
contacto.cliente_id
number
ID of the public client
contacto.asunto
string
Message subject
contacto.mensaje
string
Message content
contacto.created_at
string
Creation timestamp

Error Responses

400 Bad Request
object
Returned when required fields are missing
{
  "message": "cliente_id, asunto y mensaje son obligatorios"
}
500 Internal Server Error
object
Returned when a server error occurs
{
  "message": "Error al enviar mensaje"
}

Example Request

curl -X POST https://api.example.com/api/contacto \
  -H "Content-Type: application/json" \
  -d '{
    "cliente_id": 45,
    "asunto": "Consulta sobre horarios de atención",
    "mensaje": "Buenos días, quisiera saber si atienden los días sábados y cuál es el horario. Gracias."
  }'

Example Response

{
  "message": "Mensaje enviado correctamente",
  "contacto": {
    "id": 78,
    "cliente_id": 45,
    "asunto": "Consulta sobre horarios de atención",
    "mensaje": "Buenos días, quisiera saber si atienden los días sábados y cuál es el horario. Gracias.",
    "created_at": "2026-03-05T14:45:00.000Z"
  }
}

Notes

  • The cliente_id should correspond to an existing public client record in the database
  • Contact messages are typically reviewed by administrative staff
  • Messages are stored with timestamps for tracking and follow-up purposes

Build docs developers (and LLMs) love