Skip to main content
GET
/
v1
/
email
/
threads
List Email Threads
curl --request GET \
  --url https://api.example.com/v1/email/threads
{
  "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

page
integer
default:"1"
Page number for pagination.
per_page
integer
default:"25"
Results per page. Maximum 100.
contact_id
string
Return only threads that include the given contact.
deal_id
string
Return only threads linked to the given deal.
unread
boolean
Filter to threads with at least one unread message.
after
string
ISO 8601 lower-bound filter on the thread’s most recent message.

Headers

Authorization: Bearer wbk_your_api_key_here

Response

data
object
meta
object
Pagination metadata: page, per_page, and total.
Responses include 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"

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

StatusCodeDescription
401invalid_keyInvalid or expired API key
403insufficient_permissionsMissing read:email permission, or no connected provider
429rate_limitedRate limit exceeded