Obtener los mensajes de una conversación específica con paginación.
curl -X GET "https://app.horneross.com/api/v2/conversations/conv_abc123/messages?limit=50" \
-H "Authorization: Bearer sk_live_xxx"
{
"messages": [
{
"id": "msg_001",
"role": "user",
"content": "Hola, necesito ayuda con mi pedido",
"from": "human",
"type": "TEXT",
"eval": null,
"createdAt": "2024-01-21T10:00:00Z"
},
{
"id": "msg_002",
"role": "assistant",
"content": "¡Hola! Con gusto te ayudo. ¿Podrías darme el número de pedido?",
"from": "agent",
"type": "TEXT",
"eval": "good",
"metadata": {
"model": "gpt-4o",
"sources": ["FAQ Pedidos"]
},
"createdAt": "2024-01-21T10:00:05Z"
},
{
"id": "msg_003",
"role": "user",
"content": "Mi pedido es #12345",
"from": "human",
"type": "TEXT",
"attachments": [
{
"name": "captura.png",
"url": "https://storage.horneross.com/files/captura.png",
"size": 45000,
"mimeType": "image/png"
}
],
"createdAt": "2024-01-21T10:01:00Z"
}
],
"conversation": {
"id": "conv_abc123",
"title": "Consulta de pedido",
"channel": "website",
"status": "UNRESOLVED",
"agentId": "ag_xyz789",
"agent": {
"id": "ag_xyz789",
"name": "Agente de Soporte",
"iconUrl": "https://storage.horneross.com/icons/support.png",
"description": "Agente especializado en soporte",
"currentVersion": {
"id": "ver_001",
"modelName": "gpt-4o",
"temperature": 0.7
}
},
"metadata": {},
"createdAt": "2024-01-21T10:00:00Z",
"updatedAt": "2024-01-21T10:01:00Z"
},
"pagination": {
"limit": 100,
"offset": 0,
"total": 3,
"hasMore": false
}
}
GET /api/v2/conversations/{id}/messages
visitorId para identificar al visitante.curl -X GET "https://app.horneross.com/api/v2/conversations/conv_abc123/messages?limit=50" \
-H "Authorization: Bearer sk_live_xxx"
Show Propiedades de cada mensaje
user, assistant, systemhuman, agent, systemTEXT, ACTION, TOOL_CALLgood, bad, o nullShow Propiedades de conversation
{
"messages": [
{
"id": "msg_001",
"role": "user",
"content": "Hola, necesito ayuda con mi pedido",
"from": "human",
"type": "TEXT",
"eval": null,
"createdAt": "2024-01-21T10:00:00Z"
},
{
"id": "msg_002",
"role": "assistant",
"content": "¡Hola! Con gusto te ayudo. ¿Podrías darme el número de pedido?",
"from": "agent",
"type": "TEXT",
"eval": "good",
"metadata": {
"model": "gpt-4o",
"sources": ["FAQ Pedidos"]
},
"createdAt": "2024-01-21T10:00:05Z"
},
{
"id": "msg_003",
"role": "user",
"content": "Mi pedido es #12345",
"from": "human",
"type": "TEXT",
"attachments": [
{
"name": "captura.png",
"url": "https://storage.horneross.com/files/captura.png",
"size": 45000,
"mimeType": "image/png"
}
],
"createdAt": "2024-01-21T10:01:00Z"
}
],
"conversation": {
"id": "conv_abc123",
"title": "Consulta de pedido",
"channel": "website",
"status": "UNRESOLVED",
"agentId": "ag_xyz789",
"agent": {
"id": "ag_xyz789",
"name": "Agente de Soporte",
"iconUrl": "https://storage.horneross.com/icons/support.png",
"description": "Agente especializado en soporte",
"currentVersion": {
"id": "ver_001",
"modelName": "gpt-4o",
"temperature": 0.7
}
},
"metadata": {},
"createdAt": "2024-01-21T10:00:00Z",
"updatedAt": "2024-01-21T10:01:00Z"
},
"pagination": {
"limit": 100,
"offset": 0,
"total": 3,
"hasMore": false
}
}
Was this page helpful?
curl -X GET "https://app.horneross.com/api/v2/conversations/conv_abc123/messages?limit=50" \
-H "Authorization: Bearer sk_live_xxx"
{
"messages": [
{
"id": "msg_001",
"role": "user",
"content": "Hola, necesito ayuda con mi pedido",
"from": "human",
"type": "TEXT",
"eval": null,
"createdAt": "2024-01-21T10:00:00Z"
},
{
"id": "msg_002",
"role": "assistant",
"content": "¡Hola! Con gusto te ayudo. ¿Podrías darme el número de pedido?",
"from": "agent",
"type": "TEXT",
"eval": "good",
"metadata": {
"model": "gpt-4o",
"sources": ["FAQ Pedidos"]
},
"createdAt": "2024-01-21T10:00:05Z"
},
{
"id": "msg_003",
"role": "user",
"content": "Mi pedido es #12345",
"from": "human",
"type": "TEXT",
"attachments": [
{
"name": "captura.png",
"url": "https://storage.horneross.com/files/captura.png",
"size": 45000,
"mimeType": "image/png"
}
],
"createdAt": "2024-01-21T10:01:00Z"
}
],
"conversation": {
"id": "conv_abc123",
"title": "Consulta de pedido",
"channel": "website",
"status": "UNRESOLVED",
"agentId": "ag_xyz789",
"agent": {
"id": "ag_xyz789",
"name": "Agente de Soporte",
"iconUrl": "https://storage.horneross.com/icons/support.png",
"description": "Agente especializado en soporte",
"currentVersion": {
"id": "ver_001",
"modelName": "gpt-4o",
"temperature": 0.7
}
},
"metadata": {},
"createdAt": "2024-01-21T10:00:00Z",
"updatedAt": "2024-01-21T10:01:00Z"
},
"pagination": {
"limit": 100,
"offset": 0,
"total": 3,
"hasMore": false
}
}