Skip to main content
POST
/
api
/
v2
/
conversations
curl -X POST https://app.horneross.com/api/v2/conversations \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Consulta de producto",
    "channel": "api",
    "agentId": "ag_xyz789",
    "metadata": {
      "source": "mi_app",
      "userId": "user_123"
    },
    "initialMessage": "Hola, necesito información sobre precios"
  }'
{
  "conversation": {
    "id": "conv_new123",
    "title": "Consulta de producto",
    "channel": "api",
    "status": "UNRESOLVED",
    "agentId": "ag_xyz789",
    "createdAt": "2024-01-21T16:00:00Z"
  }
}

Endpoint

POST /api/v2/conversations

Headers

Authorization
string
required
Bearer token con tu API key de organización.
Content-Type
string
required
Siempre application/json

Request Body

channel
string
required
Canal de origen. Valores: api, dashboard, website, agent_builder
title
string
Título descriptivo de la conversación. Si no se proporciona, se genera automáticamente.
agentId
string
ID del agente a vincular con la conversación
metadata
object
Datos personalizados para la conversación
initialMessage
string
Primer mensaje de la conversación (se crea automáticamente como mensaje del usuario)
curl -X POST https://app.horneross.com/api/v2/conversations \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Consulta de producto",
    "channel": "api",
    "agentId": "ag_xyz789",
    "metadata": {
      "source": "mi_app",
      "userId": "user_123"
    },
    "initialMessage": "Hola, necesito información sobre precios"
  }'

Response

conversation
object
required
Conversación creada
{
  "conversation": {
    "id": "conv_new123",
    "title": "Consulta de producto",
    "channel": "api",
    "status": "UNRESOLVED",
    "agentId": "ag_xyz789",
    "createdAt": "2024-01-21T16:00:00Z"
  }
}