Skip to main content
GET
/
api
/
contacto
List Contact Messages
curl --request GET \
  --url https://api.example.com/api/contacto
{
  "contactos": [
    {
      "id": 123,
      "cliente_id": 123,
      "asunto": "<string>",
      "mensaje": "<string>",
      "created_at": "<string>",
      "cliente": {
        "cliente.nombres": "<string>",
        "cliente.apellidos": "<string>",
        "cliente.telefono": "<string>",
        "cliente.email": "<string>"
      }
    }
  ],
  "500 Internal Server Error": {}
}
This endpoint retrieves all contact messages submitted by public clients, ordered by creation date (newest first). Each message includes the associated client’s information.

Authentication

No authentication required based on the source code.

Response

contactos
array
Array of contact message objects
id
number
Message ID
cliente_id
number
ID of the public client who sent the message
asunto
string
Message subject or title
mensaje
string
Message content
created_at
string
Message creation timestamp
cliente
object
Associated client information
cliente.nombres
string
Client’s first name(s)
cliente.apellidos
string
Client’s last name(s)
cliente.telefono
string
Client’s phone number
cliente.email
string
Client’s email address

Error Responses

500 Internal Server Error
object
Returned when a server error occurs
{
  "message": "Error al listar contactos"
}

Example Request

curl -X GET https://api.example.com/api/contacto \
  -H "Content-Type: application/json"

Example Response

[
  {
    "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",
    "cliente": {
      "nombres": "Juan",
      "apellidos": "Pérez",
      "telefono": "+502 5555-1234",
      "email": "[email protected]"
    }
  },
  {
    "id": 77,
    "cliente_id": 42,
    "asunto": "Solicitud de información sobre especialidades",
    "mensaje": "Me gustaría saber qué especialidades médicas ofrecen.",
    "created_at": "2026-03-04T10:20:00.000Z",
    "cliente": {
      "nombres": "María",
      "apellidos": "González",
      "telefono": "+502 5555-5678",
      "email": "[email protected]"
    }
  }
]

Notes

  • Messages are ordered by created_at in descending order (newest first)
  • The endpoint includes related client information to facilitate message management

Build docs developers (and LLMs) love