# GET /email/threads

**Resource:** [Email](./email.md)  
**Scopes:** `email:read`  
**Write operation:** no

List email threads with linked entities (contacts, deals, customers). Supports full-text subject search, entity-based filtering, participant email filtering, and direction filtering.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `status` | query | string | no | Filter by status (open, closed) |
| `is_read` | query | boolean | no | Filter by read status |
| `is_automated` | query | boolean | no | Filter by automated (true) or manual (false) threads |
| `direction` | query | string | no | Filter by last message direction: "inbound" or "outbound" |
| `search` | query | string | no | Search by subject (partial match, case-insensitive). Example: ?search=brochure |
| `contact_id` | query | uuid | no | Filter threads linked to a specific contact UUID via conversation links |
| `customer_id` | query | uuid | no | Filter threads linked to a specific customer/account UUID via conversation links |
| `deal_id` | query | uuid | no | Filter threads linked to a specific deal UUID via conversation links |
| `participant` | query | string | no | Filter by participant email address (exact match). Finds threads where the given email appears in the participants list. |
| `limit` | query | number | no | Max results (1-100) |
| `cursor` | query | string | no | Cursor for pagination |

## Request example

```bash
curl -X GET \
  "https://api.trustpager.com/functions/v1/api/v1/email/threads?search=proposal&direction=inbound&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response example

```json
{
  "data": [
    {
      "id": "thread-uuid-...",
      "subject": "RE: Project Proposal",
      "status": "open",
      "is_read": false,
      "message_count": 3,
      "last_message_at": "2026-03-22T15:30:00Z",
      "last_message_direction": "inbound",
      "last_message_preview": "Thanks for the proposal...",
      "participants": [{ "name": "John Smith", "email": "john@example.com" }],
      "linked_entities": {
        "contacts": [{ "id": "...", "first_name": "John", "last_name": "Smith" }],
        "deals": [{ "id": "...", "name": "Website Redesign" }],
        "customers": []
      }
    }
  ],
  "pagination": { "limit": 10, "has_more": false, "next_cursor": null, "prev_cursor": null }
}
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`