Export messages by location ID
GET/conversations/messages/export
Export messages for a specific location with cursor-based pagination support.
Channel Filtering Behavior:
- When channel is omitted: Returns all non-email message types, including messages that don't belong to any specific channel.
- When channel=Email: Returns email messages only.
- When channel is specified (SMS, Call, WhatsApp, etc.): Returns messages for that specific channel.
Limitations:
- Group Chat and SMS Review Request message types are not supported.
- Cursor validity is 2 minutes from the last request made.
Request
API Version
v3Location ID to filter messages by
Filter by message channel. Optional - when not provided, all non-email message types will be returned including activity messages (opportunity updates, appointments, etc.). To fetch email messages, you must explicitly set channel=Email.
CallSMSEmailWhatsAppInstagramFacebookNumber of messages to return per page
Possible values: >= 10 and <= 1000
100Cursor for pagination. Pass the nextCursor from previous response to get next page.
Field to sort by
createdAtupdatedAtSort order
ascdescFilter messages by conversation ID
Filter messages by contact ID
Start date to filter messages by
End date to filter messages by
List of messages for the location with pagination details.
- application/json
- Schema
- Example (auto)
Schema
Array of messages
Cursor for fetching next page. Null if no more results.
Total number of messages matching the query
{
"messages": [
{
"id": "ve9EPM428h8vShlRW1KT",
"altId": "msg_123456789",
"type": 1,
"messageType": "SMS",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"body": "Hi there",
"direction": "inbound",
"status": "connected",
"contentType": "text/plain",
"attachments": [
"string"
],
"meta": {
"callDuration": 120,
"callStatus": "completed",
"email": {
"email": {
"messageIds": [
"ve9EPM428kjkvShlRW1KT",
"ve9EPs1028kjkvShlRW1KT"
]
}
},
"ig": {
"ig": {
"page_id": "1234567890",
"page_name": "Instagram Page"
}
},
"fb": {
"fb": {
"page_id": "1234567890",
"page_name": "Facebook Page"
}
}
},
"source": "workflow",
"userId": "ve9EPM428kjkvShlRW1KT",
"conversationProviderId": "ve9EPM428kjkvShlRW1KT",
"chatWidgetId": "67b0cc8cf14b19d85ace7s35",
"from": "+14155551234",
"to": "+14155555678",
"error": "string"
}
],
"nextCursor": "a748514c-f49e-4fa8-9954-b53afc78d81d",
"total": 1234
}