> ## 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.

# Change Read Status

> Mark emails as read or unread

<Warning>
  **Deprecated Endpoint**: The old endpoint `PATCH /v1/master-inbox/mark-unread` is deprecated after August 14, 2025. Use this endpoint (`change-read-status`) instead with `read_status: false`.
</Warning>

<Note>
  Manage read/unread status of lead conversations. Essential for inbox organization and tracking which emails need attention.
</Note>

## Overview

Changes the read/unread status of a lead conversation. Replaces the deprecated `/mark-unread` endpoint with more flexible boolean control.

**Migration from /mark-unread:**

```python theme={null}
# OLD (deprecated after Aug 14, 2025)
PATCH /v1/master-inbox/mark-unread
Body: {"email_lead_map_id": 123}

# NEW (use this)
PATCH /v1/master-inbox/change-read-status
Body: {"email_lead_map_id": 123, "read_status": false}
```

## Query Parameters

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

## Request Body

<ParamField body="email_lead_map_id" type="number" required>
  The ID of the lead-campaign mapping. This is the `campaign_lead_map_id` from inbox endpoints.
</ParamField>

<ParamField body="read_status" type="boolean" required>
  Target read status:

  * `true`: Mark as read
  * `false`: Mark as unread
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  # Mark as read
  curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/change-read-status?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"email_lead_map_id": 2433664091, "read_status": true}'

  # Mark as unread
  curl -X PATCH "https://server.smartlead.ai/api/v1/master-inbox/change-read-status?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"email_lead_map_id": 2433664091, "read_status": false}'
  ```

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

  API_KEY = "YOUR_API_KEY"

  def mark_as_read(lead_map_id):
      """Mark email as read"""
      payload = {
          "email_lead_map_id": lead_map_id,
          "read_status": True
      }
      
      response = requests.patch(
          "https://server.smartlead.ai/api/v1/master-inbox/change-read-status",
          params={"api_key": API_KEY},
          json=payload
      )
      
      return response.json()

  def mark_as_unread(lead_map_id):
      """Mark email as unread for later follow-up"""
      payload = {
          "email_lead_map_id": lead_map_id,
          "read_status": False
      }
      
      response = requests.patch(
          "https://server.smartlead.ai/api/v1/master-inbox/change-read-status",
          params={"api_key": API_KEY},
          json=payload
      )
      
      return response.json()

  # Mark as read after reviewing
  mark_as_read(2433664091)

  # Mark as unread for later
  mark_as_unread(2433664092)
  ```

  ```javascript JavaScript theme={null}
  const API_KEY = 'YOUR_API_KEY';

  async function changeReadStatus(leadMapId, isRead) {
    const response = await fetch(
      `https://server.smartlead.ai/api/v1/master-inbox/change-read-status?api_key=${API_KEY}`,
      {
        method: 'PATCH',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          email_lead_map_id: leadMapId,
          read_status: isRead
        })
      }
    );
    
    return response.json();
  }

  // Mark as read
  await changeReadStatus(2433664091, true);

  // Mark as unread
  await changeReadStatus(2433664092, false);
  ```
</RequestExample>

## Response Example

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true,
    "message": "Read status updated",
    "data": {
      "email_lead_map_id": 2433664091,
      "is_read": true,
      "updated_at": "2025-01-20T15:30:00Z"
    }
  }
  ```

  ```json 422 - Validation Error theme={null}
  {
    "error": "read_status must be a boolean value"
  }
  ```
</ResponseExample>

## Common Workflows

### Bulk Mark as Read

```python theme={null}
def bulk_mark_as_read(lead_map_ids):
    """Mark multiple emails as read"""
    results = []
    for lead_id in lead_map_ids:
        result = mark_as_read(lead_id)
        results.append(result)
    return results

# Mark all unread as read
unread = get_unread_replies({})
lead_ids = [msg['campaign_lead_map_id'] for msg in unread['messages']]
bulk_mark_as_read(lead_ids)
```

## Related Endpoints

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