Agentes
Agent - Query Agent
Add agent messages to conversation history. Designed for integrating with external systems like WhatsApp, Chatwoot, and CRM platforms to sync agent messages into the conversation thread.
POST
Key Features:Documentation Index
Fetch the complete documentation index at: https://docs.laburen.com/llms.txt
Use this file to discover all available pages before exploring further.
- Add agent messages to existing or new conversations
- Support for external channel integrations (WhatsApp, Chatwoot, CRM)
- Automatic contact creation and association
This endpoint is different from the Query endpoint, which sends user messages and receives AI responses. This endpoint is for adding agent messages to the conversation history.
Path
The ID of the agent (CUID format).
Body
Required
The agent message text to add to the conversation history.
Optional - Basic Configuration
If
true, responds with Server-Sent Events in real-time.ID of the conversation to add the message to. Auto-generated if not provided.
Unique ID of the visitor/user. Auto-generated if not provided.
Source channel for the message. Valid values:
api, dashboard, website, form, whatsapp, telegram, slack, meta, crisp, zapier, mail, mercadolibre, agent_builder, chatwoot, crmchatsappai.External channel identifier for integration with third-party systems. Format varies by integration:
- WhatsApp:
{organizationId}_{agentId}_{telephoneNumber}
If
true, creates a draft message. Requires authentication.ID of an existing contact to associate with the conversation.
Optional - Contact
Contact data to create or associate with the conversation. If a contact with matching email, phone number, or userId exists, it will be used. Otherwise, a new contact will be created.
Optional - Metadata
Additional metadata for the message.
Response (without streaming)
ID of the created message.
ID of the conversation (save this to continue adding messages to the same conversation).
ID of the visitor/user.
Conversation status (e.g.,
UNRESOLVED, RESOLVED).Error Responses
| Status Code | Type | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid authentication when isDraft is true, or when required for the operation. |
| 404 | NOT_FOUND | Agent with the specified ID does not exist. |
Integration Examples
WhatsApp Embedding Integration
When integrating with WhatsApp via our appchannelExternalId format: {organizationId}_{agentId}_{telephoneNumber}

