List Email Threads
curl --request GET \
--url https://api.example.com/v1/email/threadsimport requests
url = "https://api.example.com/v1/email/threads"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/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",
]);
$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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/email/threads")
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": {
"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://api.example.com/v1/email/threadsimport requests
url = "https://api.example.com/v1/email/threads"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/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://api.example.com/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",
]);
$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"
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")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/email/threads")
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": {
"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
integer
default:"1"
Page number for pagination.
integer
default:"25"
Results per page. Maximum 100.
string
Return only threads that include the given contact.
string
Return only threads linked to the given deal.
boolean
Filter to threads with at least one unread message.
string
ISO 8601 lower-bound filter on the thread’s most recent message.
Headers
Authorization: Bearer wbk_your_api_key_here
Response
object
Show properties
Show properties
array
Array of thread summaries
Show Thread object
Show Thread object
object
Pagination metadata:
page, per_page, and total.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 |