> ## Documentation Index
> Fetch the complete documentation index at: https://plain-docs-orca-916-agent-docs-restructure.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch threads

> Fetch threads by ID or external ID, list them with filters, or search their contents.

There are four ways to fetch threads:

* [Get a thread by ID](#get-a-thread-by-id)
* [Get a thread by external ID](#get-a-thread-by-external-id)
* [List threads](#list-threads): paginated, with filters
* [Search threads](#search-threads): full-text search on title, description and message contents

<Snippet file="graphql/sdk-note.mdx" />

These operations require the following permissions:

* `thread:read`

## Get a thread by ID

<Snippet file="graphql/get-thread-by-id.mdx" />

## Get a thread by external ID

A thread's `externalId` is unique within a customer, which is why the customer ID is required when looking up by external ID.

<Snippet file="graphql/get-thread-by-external-id.mdx" />

## List threads

The `threads` query supports filtering on status, status detail, assignee, customer, labels, priority, date ranges) and sorting. This is the right query for building inbox-style views.

<Snippet file="graphql/list-threads.mdx" />

## Search threads

`searchThreads` performs a full-text search across thread title, description and message contents. For exact lookups prefer [`thread`](#get-a-thread-by-id) or [`threadByExternalId`](#get-a-thread-by-external-id).

<Snippet file="graphql/search-threads.mdx" />
