List Email Threads
curl --request GET \
--url https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads \
--header 'Authorization: Bearer <token>'import requests
url = "https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads', 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://data.leadlex.com/functions/v1/api-gateway/v1/email/threads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://data.leadlex.com/functions/v1/api-gateway/v1/email/threads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"threads": [
{
"id": "<string>",
"subject": "<string>",
"snippet": "<string>",
"message_count": 123,
"unread_count": 123,
"participants": [
{}
],
"contact_ids": [
{}
],
"deal_id": "<string>",
"last_message_at": "<string>"
}
]
},
"meta": {}
}Email
List Email Threads
Paginate over synchronized email threads in the workspace
GET
/
v1
/
email
/
threads
List Email Threads
curl --request GET \
--url https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads \
--header 'Authorization: Bearer <token>'import requests
url = "https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads', 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://data.leadlex.com/functions/v1/api-gateway/v1/email/threads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://data.leadlex.com/functions/v1/api-gateway/v1/email/threads"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"threads": [
{
"id": "<string>",
"subject": "<string>",
"snippet": "<string>",
"message_count": 123,
"unread_count": 123,
"participants": [
{}
],
"contact_ids": [
{}
],
"deal_id": "<string>",
"last_message_at": "<string>"
}
]
},
"meta": {}
}Request
Query Parameters
Headers
Authorization: Bearer wbk_your_api_key_here
Response
Show properties
Show properties
Array of thread summaries
Show Thread object
Show Thread object
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
curl "https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads?per_page=50&unread=true" \
-H "Authorization: Bearer wbk_your_api_key_here"
import requests
API_KEY = "wbk_your_api_key_here"
BASE_URL = "https://data.leadlex.com/functions/v1/api-gateway"
params = {"per_page": 50, "unread": "true"}
r = requests.get(
f"{BASE_URL}/v1/email/threads",
headers={"Authorization": f"Bearer {API_KEY}"},
params=params,
)
for thread in r.json()["data"]["threads"]:
print(thread["subject"], thread["last_message_at"])
const url = new URL('https://data.leadlex.com/functions/v1/api-gateway/v1/email/threads');
url.searchParams.set('per_page', '50');
url.searchParams.set('unread', 'true');
const res = await fetch(url, {
headers: { Authorization: 'Bearer wbk_your_api_key_here' },
});
const { data } = await res.json();
console.log(data.threads.length);
Example Response
{
"data": {
"threads": [
{
"id": "18c9a4b2e7ff21aa",
"subject": "Proposal for Series B counsel",
"snippet": "Thanks for the introduction, we'd love to schedule a call...",
"message_count": 4,
"unread_count": 1,
"participants": ["jane@example.com", "team@emasex.de"],
"contact_ids": ["123e4567-e89b-12d3-a456-426614174000"],
"deal_id": null,
"last_message_at": "2026-04-17T09:14:00Z"
}
]
},
"meta": { "page": 1, "per_page": 50, "total": 137 }
}
Errors
| Status | Code | Description |
|---|---|---|
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing read:email permission, or no connected provider |
| 429 | rate_limited | Rate limit exceeded |