# Export all conversations for an agent
curl --location --request GET 'https://dashboard.laburen.com/api/agents/clt7x2a0r0000lb08d9z3f5k1/conversations-export' \
--header 'Authorization: Bearer <API_KEY>'
# Export conversations from specific date range and channel
curl --location --request GET 'https://dashboard.laburen.com/api/agents/clt7x2a0r0000lb08d9z3f5k1/conversations-export?from=2026-01-01T00:00:00Z&to=2026-06-16T23:59:59Z&channel=whatsapp&status=RESOLVED' \
--header 'Authorization: Bearer <API_KEY>'
const apiUrl = 'https://dashboard.laburen.com/api';
const apiKey = '<API_KEY>';
const agentId = 'clt7x2a0r0000lb08d9z3f5k1';
const response = await fetch(`${apiUrl}/agents/${agentId}/conversations-export?from=2026-01-01T00:00:00Z&to=2026-06-16T23:59:59Z`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
},
});
const csv = await response.text();
console.log(csv);
import requests
api_url = "https://dashboard.laburen.com/api"
api_key = "<API_KEY>"
agent_id = "clt7x2a0r0000lb08d9z3f5k1"
response = requests.get(
f"{api_url}/agents/{agent_id}/conversations-export",
headers={
"Authorization": f"Bearer {api_key}",
},
params={
"from": "2026-01-01T00:00:00Z",
"to": "2026-06-16T23:59:59Z",
"channel": "whatsapp",
}
)
csv_data = response.text
print(csv_data)
conversation_id,message_from,message_text,message_created_at
"conv_123abc","human","Hola, necesito ayuda","2026-06-16T10:30:00.000Z"
"conv_123abc","agent","Claro, ¿en qué puedo ayudarte?","2026-06-16T10:31:00.000Z"
"conv_123abc","human","Tengo una pregunta sobre mi pedido","2026-06-16T10:32:00.000Z"
"conv_456def","human","Hola","2026-06-16T15:00:00.000Z"
"conv_456def","agent","Bienvenido, ¿cómo estás?","2026-06-16T15:01:00.000Z"
Agentes
Agent - Export Conversations
Export conversation history for an agent as a CSV file with filtering options
GET
/
api
/
agents
/
{id}
/
conversations-export
# Export all conversations for an agent
curl --location --request GET 'https://dashboard.laburen.com/api/agents/clt7x2a0r0000lb08d9z3f5k1/conversations-export' \
--header 'Authorization: Bearer <API_KEY>'
# Export conversations from specific date range and channel
curl --location --request GET 'https://dashboard.laburen.com/api/agents/clt7x2a0r0000lb08d9z3f5k1/conversations-export?from=2026-01-01T00:00:00Z&to=2026-06-16T23:59:59Z&channel=whatsapp&status=RESOLVED' \
--header 'Authorization: Bearer <API_KEY>'
const apiUrl = 'https://dashboard.laburen.com/api';
const apiKey = '<API_KEY>';
const agentId = 'clt7x2a0r0000lb08d9z3f5k1';
const response = await fetch(`${apiUrl}/agents/${agentId}/conversations-export?from=2026-01-01T00:00:00Z&to=2026-06-16T23:59:59Z`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
},
});
const csv = await response.text();
console.log(csv);
import requests
api_url = "https://dashboard.laburen.com/api"
api_key = "<API_KEY>"
agent_id = "clt7x2a0r0000lb08d9z3f5k1"
response = requests.get(
f"{api_url}/agents/{agent_id}/conversations-export",
headers={
"Authorization": f"Bearer {api_key}",
},
params={
"from": "2026-01-01T00:00:00Z",
"to": "2026-06-16T23:59:59Z",
"channel": "whatsapp",
}
)
csv_data = response.text
print(csv_data)
conversation_id,message_from,message_text,message_created_at
"conv_123abc","human","Hola, necesito ayuda","2026-06-16T10:30:00.000Z"
"conv_123abc","agent","Claro, ¿en qué puedo ayudarte?","2026-06-16T10:31:00.000Z"
"conv_123abc","human","Tengo una pregunta sobre mi pedido","2026-06-16T10:32:00.000Z"
"conv_456def","human","Hola","2026-06-16T15:00:00.000Z"
"conv_456def","agent","Bienvenido, ¿cómo estás?","2026-06-16T15:01:00.000Z"
Export conversation history and message data from an agent in CSV format. Supports filtering by date range, channel, status, and search terms. Use this endpoint to:
- Extract conversation history for analysis or compliance
- Export specific conversations by ID
- Filter messages by channel, status, or date range
- Search for messages by text content
Path
string
required
The agent ID to export conversations from
Query
Optional
string
Start date in ISO 8601 format (e.g.,
2026-01-01T00:00:00Z)string
End date in ISO 8601 format (e.g.,
2026-06-16T23:59:59Z)string
Comma-separated conversation IDs to export (e.g.,
id1,id2,id3)enum
default:"all"
Filter by message sender type:
all, human, or agentenum
default:"all"
Filter by conversation status:
all, RESOLVED, UNRESOLVED, or HUMAN_REQUESTEDenum
default:"all"
Filter by channel:
all, website, whatsapp, telegram, slack, dashboard, meta, mercadolibre, chatwoot, or crmchatsappainumber
default:"5000"
Maximum number of messages to export (1-100000). Default is 5000.
boolean
When
true, limits results to 100 messages for preview purposesenum
default:"asc"
Sort messages by creation date:
asc (ascending) or desc (descending)string
Search messages by text content (case-insensitive). Maximum 500 characters.
Response
The response is a CSV file with the following columns:string
Unique identifier of the conversation
string
Sender of the message:
human or agentstring
The message content text
string
ISO 8601 timestamp of when the message was created
Error Responses
| Status Code | Type | Description |
|---|---|---|
| 400 | Bad Request | Invalid query parameters (e.g., invalid date format, search query too long) |
| 401 | UNAUTHORIZED | Missing or invalid authentication token |
| 404 | NOT_FOUND | Agent does not exist or does not belong to your organization |
| 500 | Internal Server Error | Server error during export processing |
Notes
The response is a CSV file attachment, not JSON. Set
Accept: text/csv header to explicitly request CSV format.If no conversations are found, the response will be an empty CSV with headers only:
conversation_id,message_from,message_text,message_created_atSpecial characters in CSV fields are automatically escaped to prevent CSV injection attacks. Text values are quoted and internal quotes are doubled.
# Export all conversations for an agent
curl --location --request GET 'https://dashboard.laburen.com/api/agents/clt7x2a0r0000lb08d9z3f5k1/conversations-export' \
--header 'Authorization: Bearer <API_KEY>'
# Export conversations from specific date range and channel
curl --location --request GET 'https://dashboard.laburen.com/api/agents/clt7x2a0r0000lb08d9z3f5k1/conversations-export?from=2026-01-01T00:00:00Z&to=2026-06-16T23:59:59Z&channel=whatsapp&status=RESOLVED' \
--header 'Authorization: Bearer <API_KEY>'
const apiUrl = 'https://dashboard.laburen.com/api';
const apiKey = '<API_KEY>';
const agentId = 'clt7x2a0r0000lb08d9z3f5k1';
const response = await fetch(`${apiUrl}/agents/${agentId}/conversations-export?from=2026-01-01T00:00:00Z&to=2026-06-16T23:59:59Z`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
},
});
const csv = await response.text();
console.log(csv);
import requests
api_url = "https://dashboard.laburen.com/api"
api_key = "<API_KEY>"
agent_id = "clt7x2a0r0000lb08d9z3f5k1"
response = requests.get(
f"{api_url}/agents/{agent_id}/conversations-export",
headers={
"Authorization": f"Bearer {api_key}",
},
params={
"from": "2026-01-01T00:00:00Z",
"to": "2026-06-16T23:59:59Z",
"channel": "whatsapp",
}
)
csv_data = response.text
print(csv_data)
conversation_id,message_from,message_text,message_created_at
"conv_123abc","human","Hola, necesito ayuda","2026-06-16T10:30:00.000Z"
"conv_123abc","agent","Claro, ¿en qué puedo ayudarte?","2026-06-16T10:31:00.000Z"
"conv_123abc","human","Tengo una pregunta sobre mi pedido","2026-06-16T10:32:00.000Z"
"conv_456def","human","Hola","2026-06-16T15:00:00.000Z"
"conv_456def","agent","Bienvenido, ¿cómo estás?","2026-06-16T15:01:00.000Z"
Was this page helpful?

