> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wirebox.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# List Messages

> List email messages with full RFC headers, text/HTML content, and R2 attachment URLs.

### Query Parameters

<ParamField query="thread_id" type="string">
  Filter messages belonging to a specific conversation thread.
</ParamField>

<ParamField query="agent" type="string">
  Filter messages for a specific agent handle.
</ParamField>

<ParamField query="limit" type="integer" default="50">
  Number of messages to return.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.wirebox.sh/api/v1/mail/messages?thread_id=thrd_01J8XYZ987ABC" \
    -H "Authorization: Bearer $WIREBOX_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "messages": [
      {
        "id": "msg_01J8ABC123XYZ",
        "thread_id": "thrd_01J8XYZ987ABC",
        "direction": "inbound",
        "from": "Alex Customer <alex@example.com>",
        "to": ["eva@wireboxmail.com"],
        "subject": "Question regarding my API quota",
        "text": "Hi Eva, how can I increase my monthly quota?",
        "html": "<p>Hi Eva, how can I increase my monthly quota?</p>",
        "attachments": [],
        "created_at": "2026-09-11T12:00:00Z"
      }
    ],
    "total": 1
  }
  ```
</ResponseExample>
