Get messages by conversation id
Get messages by conversation id.
GET
/
conversations
/
{conversationId}
/
messages
Get messages by conversation id
curl --request GET \
--url https://services.leadconnectorhq.com/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Version: <version>'const options = {
method: 'GET',
headers: {Version: '<version>', Authorization: 'Bearer <token>'}
};
fetch('https://services.leadconnectorhq.com/conversations/{conversationId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/conversations/{conversationId}/messages"
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"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"
}
]
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}Authorizations
Query Parameters
Types of message to fetched separated with comma
Available options:
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 Example:
"TYPE_SMS,TYPE_CALL"
Last modified on March 8, 2026
Was this page helpful?
Get messages by conversation id
curl --request GET \
--url https://services.leadconnectorhq.com/conversations/{conversationId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Version: <version>'const options = {
method: 'GET',
headers: {Version: '<version>', Authorization: 'Bearer <token>'}
};
fetch('https://services.leadconnectorhq.com/conversations/{conversationId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/conversations/{conversationId}/messages"
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text){
"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"
}
]
}
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}