string
Get Email Thread
curl --request GET \
--url https://api.example.com/v1/email/threads/{id}import requests
url = "https://api.example.com/v1/email/threads/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/email/threads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/email/threads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/email/threads/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/email/threads/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/email/threads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"subject": "<string>",
"participants": [
{}
],
"contact_ids": [
{}
],
"deal_id": "<string>",
"messages": [
{
"id": "<string>",
"from": "<string>",
"to": [
{}
],
"cc": [
{}
],
"sent_at": "<string>",
"direction": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [
{}
]
}
]
}
}Email
Get Email Thread
Retrieve a single email thread with its full message list
GET
/
v1
/
email
/
threads
/
{id}
Get Email Thread
curl --request GET \
--url https://api.example.com/v1/email/threads/{id}import requests
url = "https://api.example.com/v1/email/threads/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/email/threads/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/email/threads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/email/threads/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/email/threads/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/email/threads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"subject": "<string>",
"participants": [
{}
],
"contact_ids": [
{}
],
"deal_id": "<string>",
"messages": [
{
"id": "<string>",
"from": "<string>",
"to": [
{}
],
"cc": [
{}
],
"sent_at": "<string>",
"direction": "<string>",
"body_text": "<string>",
"body_html": "<string>",
"attachments": [
{}
]
}
]
}
}Request
Path Parameters
string
required
Thread identifier, as returned by
GET /v1/email/threads.Query Parameters
boolean
default:"true"
When
true, the full HTML and text body of each message is returned. Set to false for a lightweight summary response.Headers
Authorization: Bearer wbk_your_api_key_here
Response
object
Show properties
Show properties
string
Thread identifier
string
Thread subject
array
Email addresses involved in the thread
array
Linked contact UUIDs
string
Linked deal UUID, if any
array
Ordered array of messages, oldest first
Show Message object
Show Message object
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID headers.
curl https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads/18c9a4b2e7ff21aa \
-H "Authorization: Bearer wbk_your_api_key_here"
import requests
API_KEY = "wbk_your_api_key_here"
thread_id = "18c9a4b2e7ff21aa"
r = requests.get(
f"https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads/{thread_id}",
headers={"Authorization": f"Bearer {API_KEY}"},
)
thread = r.json()["data"]
print(thread["subject"], len(thread["messages"]))
const threadId = '18c9a4b2e7ff21aa';
const res = await fetch(
`https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads/${threadId}`,
{ headers: { Authorization: 'Bearer wbk_your_api_key_here' } },
);
const { data } = await res.json();
console.log(data.messages.length);
Example Response
{
"data": {
"id": "18c9a4b2e7ff21aa",
"subject": "Proposal for Series B counsel",
"participants": ["jane@example.com", "team@emasex.de"],
"contact_ids": ["123e4567-e89b-12d3-a456-426614174000"],
"deal_id": null,
"messages": [
{
"id": "m1",
"from": "jane@example.com",
"to": ["team@emasex.de"],
"cc": [],
"sent_at": "2026-04-15T09:01:00Z",
"direction": "inbound",
"body_text": "Can you send over your standard engagement letter?",
"body_html": "<p>Can you send over your standard engagement letter?</p>",
"attachments": []
}
]
}
}
Errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing read:email permission |
| 404 | not_found | No thread with the given ID exists in this workspace |
| 429 | rate_limited | Rate limit exceeded |