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

# Get Archived Emails

> Retrieve archived conversations removed from active inbox

<Note>
  Access archived emails for historical reference and reporting. Maintains clean inbox while preserving complete email history.
</Note>

## Overview

Retrieves emails that have been archived. Archiving removes conversations from active inbox while maintaining searchable history.

**Archive Triggers:**

* Manual user archival
* Auto-archive after campaign completion
* Lead status change to closed/lost
* Bulk archive operations

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

<ParamField query="fetch_message_history" type="boolean" default="false">
  Include full thread history
</ParamField>

## Request Body

<ParamField body="offset" type="number" default="0">
  Pagination offset
</ParamField>

<ParamField body="limit" type="number" default="20">
  Records per page (1-20)
</ParamField>

<ParamField body="filters" type="object">
  Standard inbox filters - campaignId max 5, emailAccountId max 10
</ParamField>

<ParamField body="sortBy" type="string">
  `REPLY_TIME_DESC` or `SENT_TIME_DESC`
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/master-inbox/archived?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"filters": {"campaignId": 12345}, "limit": 20}'
  ```

  ```python Python theme={null}
  import requests

  # Get archived emails from completed campaign
  response = requests.post(
      "https://server.smartlead.ai/api/v1/master-inbox/archived",
      params={"api_key": "YOUR_API_KEY"},
      json={"filters": {"campaignId": 12345, "emailStatus": "Replied"}}
  )

  archived = response.json()
  print(f"Archived: {archived.get('total_count', 0)} emails")
  ```
</RequestExample>

## Related Endpoints

* [Get Inbox Messages](/api-reference/inbox/get-messages)
