Enviar un mensaje en una conversación de prueba
Envía el siguiente mensaje del lead simulado en una conversación de prueba y recibe la respuesta del agente, con las herramientas que usó y la etapa del lead.
Antes de empezar
- Corre en el canal que elegiste al iniciar la conversación.
- Las mismas reglas que al iniciar una conversación: solo API key secreta,
workflows:writeen keys de MCP, siempre simulado. - Envía un mensaje a la vez. Mientras un turno está en curso, otro mensaje a la misma conversación devuelve
turn_in_progress. Espera la respuesta y luego envía el siguiente. - Si el agente rechaza el turno a propósito, por ejemplo porque el lead se derivó a una persona o la IA está apagada para él, recibes 409
turn_refusedcon la causa enreason, comolead_in_support,human_takeoveroai_not_enabled. Reenviar el mismo mensaje da la misma respuesta. Una falla real devuelveturn_failed. - Solo se aceptan conversaciones de prueba de tu cuenta. Un lead real, o una conversación de otra cuenta, devuelve
conversation_not_found.
Qué envías
Qué recibes
Los mismos campos que al iniciar una conversación:conversation_id, channel, reply, messages, tool_calls, status y no_reply_reason cuando el agente no respondió a propósito.
Leer un turno en detalle
Con el MCP de Nexor, pasaconversation_id como ID del lead a list_lead_turns y get_lead_turn para ver el razonamiento completo de un turno.
Límites
- 30 turnos por minuto por API key, compartidos con el inicio de conversaciones.
- Un turno que tarda más de 90 segundos devuelve
turn_failedcon motivotimeout.
Autorizaciones
API key for authentication. Keys are prefixed with nxr_live_.
Parámetros de ruta
The conversation_id you got when you started the conversation. Conversations started in Playground also work.
Cuerpo
What the simulated lead writes.
1 - 4000Respuesta
The agent answered.
ID of the test conversation. It is the test lead's ID, so it also works with GET /test-conversations and GET /leads/{id}/turns.
Same value as conversation_id.
Task ID (workflow in the API) the conversation runs on.
Simulated channel the conversation runs on. The agent writes as it would on that channel; nothing is sent.
whatsapp, webchat, sms, imessage, unsupervised-whatsapp, email, instagram, messenger The agent's text for this turn, bubbles joined by a blank line. null when the agent stayed silent on purpose.
Every message the agent sent in this turn, in order, as the lead would receive them.
Tools the agent called in this turn, in order. API keys and tokens in the arguments are masked.
Key of the lead's stage in the task after this turn.
Only when the agent stayed silent on purpose, for example terminal_tool (it reacted with an emoji) or status_paused (the stage pauses the agent).