curl --request GET \
--url https://services.leadconnectorhq.com/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Version: <version>'{
"messages": {
"lastMessageId": "p1mRSHeLDhAms5q0LMr4",
"nextPage": true,
"messages": [
{
"id": "ve9EPM428h8vShlRW1KT",
"type": 1,
"messageType": "SMS",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"direction": "inbound",
"contentType": "text/plain",
"altId": "msg_123456789",
"body": "Hi there",
"status": "connected",
"attachments": [
"<string>"
],
"meta": {
"callDuration": 120,
"callStatus": "completed",
"email": {
"email": {
"messageIds": [
"ve9EPM428kjkvShlRW1KT",
"ve9EPs1028kjkvShlRW1KT"
]
}
}
},
"source": "workflow",
"userId": "ve9EPM428kjkvShlRW1KT",
"conversationProviderId": "ve9EPM428kjkvShlRW1KT",
"chatWidgetId": "67b0cc8cf14b19d85ace7s35"
}
]
}
}Get messages by conversation id.
curl --request GET \
--url https://services.leadconnectorhq.com/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Version: <version>'{
"messages": {
"lastMessageId": "p1mRSHeLDhAms5q0LMr4",
"nextPage": true,
"messages": [
{
"id": "ve9EPM428h8vShlRW1KT",
"type": 1,
"messageType": "SMS",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"direction": "inbound",
"contentType": "text/plain",
"altId": "msg_123456789",
"body": "Hi there",
"status": "connected",
"attachments": [
"<string>"
],
"meta": {
"callDuration": 120,
"callStatus": "completed",
"email": {
"email": {
"messageIds": [
"ve9EPM428kjkvShlRW1KT",
"ve9EPs1028kjkvShlRW1KT"
]
}
}
},
"source": "workflow",
"userId": "ve9EPM428kjkvShlRW1KT",
"conversationProviderId": "ve9EPM428kjkvShlRW1KT",
"chatWidgetId": "67b0cc8cf14b19d85ace7s35"
}
]
}
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-04-15 Conversation ID as string
"tDtDnQdgm2LXpyiqYvZ6"
Message ID of the last message in the list as a string
"tDtDnQdgm2LXpyiqYvZ6"
Number of messages to be fetched from the conversation. Default limit is 20
20
Types of message to fetched separated with comma
TYPE_CALL, TYPE_SMS, TYPE_EMAIL, TYPE_FACEBOOK, TYPE_GMB, TYPE_INSTAGRAM, TYPE_WHATSAPP, TYPE_ACTIVITY_APPOINTMENT, TYPE_ACTIVITY_CONTACT, TYPE_ACTIVITY_INVOICE, TYPE_ACTIVITY_PAYMENT, TYPE_ACTIVITY_OPPORTUNITY, TYPE_LIVE_CHAT, TYPE_INTERNAL_COMMENTS, TYPE_ACTIVITY_EMPLOYEE_ACTION_LOG "TYPE_SMS,TYPE_CALL"
List of messages for the conversation id of the given type.
Show child attributes
Was this page helpful?