Get email by Id
GET https://services.leadconnectorhq.com/conversations/messages/email/{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 - Email object for the id given.
id(string, required): Example:ve9EPM428h8vShlRW1KTaltId(string): External Id Example:ve9EPM428h8vShlRW1KTthreadId(string, required): Message Id or thread Id Example:ve9EPM428h8vShlRW1KTlocationId(string, required): Example:ve9EPM428h8vShlRW1KTcontactId(string, required): Example:ve9EPM428h8vShlRW1KTconversationId(string, required): Example:ve9EPM428h8vShlRW1KTdateAdded(string, required): Example:2024-03-27T18:13:49.000Zsubject(string): Example:Order confirmbody(string, required): Example:Hi theredirection(string, required): Possible values: 'inbound', 'outbound'status(string): Possible values: 'pending', 'scheduled', 'sent', 'delivered', 'read', 'undelivered', 'connected', 'failed', 'opened'contentType(string, required): Example:text/plainattachments(string[]): An array of attachment URLs.provider(string)from(string, required): Name and Email Id of the senderto(string[], required): List of email Ids of the receiverscc(string[]): List of email Ids of the people in the cc fieldbcc(string[]): List of email Ids of the people in the bcc fieldreplyToMessageId(string): In case of reply, email message Id of the reply to emailsource(string): Email source Possible values: 'workflow', 'bulk_actions', 'campaign', 'api', 'app'conversationProviderId(string): Conversation provider ID Example:cI08i1Bls3iTB9bKgF01
{
"id": "ve9EPM428h8vShlRW1KT",
"altId": "ve9EPM428h8vShlRW1KT",
"threadId": "ve9EPM428h8vShlRW1KT",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"subject": "Order confirm",
"body": "Hi there",
"direction": "inbound",
"status": "pending",
"contentType": "text/plain",
"attachments": [
"string"
],
"provider": "string",
"from": "string",
"to": [
"string"
],
"cc": [
"string"
],
"bcc": [
"string"
],
"replyToMessageId": "string",
"source": "workflow",
"conversationProviderId": "cI08i1Bls3iTB9bKgF01"
}Example
curl -X GET 'https://services.leadconnectorhq.com/conversations/messages/email/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/email/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/email/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/email/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);