Get message by message id.
GET https://services.leadconnectorhq.com/conversations/messages/{id}Authorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Responses
200 - Message object for the id given.
id(string, required): Example:ve9EPM428h8vShlRW1KTtype(number, required): Example:1messageType(string, required): Type of the message as a string Possible values: 'TYPE_CALL', 'TYPE_SMS', 'TYPE_RCS', 'TYPE_EMAIL', 'TYPE_SMS_REVIEW_REQUEST', 'TYPE_WEBCHAT', 'TYPE_SMS_NO_SHOW_REQUEST', 'TYPE_CAMPAIGN_SMS', 'TYPE_CAMPAIGN_CALL', 'TYPE_CAMPAIGN_EMAIL', 'TYPE_CAMPAIGN_VOICEMAIL', 'TYPE_FACEBOOK', 'TYPE_CAMPAIGN_FACEBOOK', 'TYPE_CAMPAIGN_MANUAL_CALL', 'TYPE_CAMPAIGN_MANUAL_SMS', 'TYPE_GMB', 'TYPE_CAMPAIGN_GMB', 'TYPE_REVIEW', 'TYPE_INSTAGRAM', 'TYPE_WHATSAPP', 'TYPE_CUSTOM_SMS', 'TYPE_CUSTOM_EMAIL', 'TYPE_CUSTOM_PROVIDER_SMS', 'TYPE_CUSTOM_PROVIDER_EMAIL', 'TYPE_IVR_CALL', 'TYPE_ACTIVITY_CONTACT', 'TYPE_ACTIVITY_INVOICE', 'TYPE_ACTIVITY_PAYMENT', 'TYPE_ACTIVITY_OPPORTUNITY', 'TYPE_LIVE_CHAT', 'TYPE_LIVE_CHAT_INFO_MESSAGE', 'TYPE_ACTIVITY_APPOINTMENT', 'TYPE_FACEBOOK_COMMENT', 'TYPE_INSTAGRAM_COMMENT', 'TYPE_CUSTOM_CALL', 'TYPE_INTERNAL_COMMENT', 'TYPE_ACTIVITY_EMPLOYEE_ACTION_LOG', 'TYPE_TIKTOK', 'TYPE_TIKTOK_COMMENT', 'TYPE_ACTIVITY_WHATSAPP', 'TYPE_FORM_SUBMISSION', 'TYPE_SMS_REACTION' Example:SMSlocationId(string, required): Example:ve9EPM428h8vShlRW1KTcontactId(string, required): Example:ve9EPM428h8vShlRW1KTconversationId(string, required): Example:ve9EPM428h8vShlRW1KTdateAdded(string, required): Example:2024-03-27T18:13:49.000Zbody(string): Example:Hi theredirection(string, required): Possible values: 'inbound', 'outbound'status(string): Possible values: 'connected', 'delivered', 'failed', 'opened', 'pending', 'read', 'scheduled', 'sent', 'undelivered', 'clicked', 'opt_out', 'queued'contentType(string, required): Example:text/plainattachments(string[]): An array of attachment URLs. Attachments will be empty for Call and Voicemails, type 1 and 10. Please use get call recording API to fetch call recording and voicemails.meta(object)callDuration(string): Call duration in seconds Example:120callStatus(string): Call status - can be pending, completed, answered, busy, no-answer, failed, canceled, or voicemail Possible values: 'pending', 'completed', 'answered', 'busy', 'no-answer', 'failed', 'canceled', 'voicemail' Example:completedemail(object): meta will contain email, for message type 3 (email). messageIds is list of all email message ids under the message thread
source(string): Message source Possible values: 'workflow', 'bulk_actions', 'campaign', 'api', 'app'userId(string): User Id Example:ve9EPM428kjkvShlRW1KTconversationProviderId(string): Conversation Provider Id Example:ve9EPM428kjkvShlRW1KTchatWidgetId(string): Chat Widget Id Example:67b0cc8cf14b19d85ace7s35
{
"id": "ve9EPM428h8vShlRW1KT",
"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"
]
}
}
},
"source": "workflow",
"userId": "ve9EPM428kjkvShlRW1KT",
"conversationProviderId": "ve9EPM428kjkvShlRW1KT",
"chatWidgetId": "67b0cc8cf14b19d85ace7s35"
}400 - Bad Request
{}Example
curl -X GET 'https://services.leadconnectorhq.com/conversations/messages/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/messages/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/conversations/messages/YOUR_id');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);