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

# Forward Email

> Forward an email to other recipients

<Note>
  Forward email threads to colleagues or external recipients. Maintains original context and thread history.
</Note>

## Overview

Forwards an email to specified recipients. Useful for collaboration, escalation, and sharing important conversations.

**Use Cases:**

* Escalate to manager/supervisor
* Share with team members
* Forward to subject matter expert
* Loop in decision makers
* External referrals

## Path Parameters

<ParamField path="campaign_id" type="integer" required>
  Campaign ID
</ParamField>

## Query Parameters

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

## Request Body

<ParamField body="message_id" type="string" required>
  Message ID to forward
</ParamField>

<ParamField body="stats_id" type="string" required>
  Email stats ID
</ParamField>

<ParamField body="to_emails" type="string" required>
  Comma-separated recipient email addresses.
</ParamField>

<ParamField body="forward_email_body" type="string">
  Custom HTML or plain-text body prepended above the auto-generated forwarded message chain. Mirrors the "compose" textbox in the Global Inbox UI when forwarding from the app. When omitted, only the auto-generated forwarded chain is sent.
</ParamField>

<ParamField body="forward_email_subject" type="string">
  Custom subject line for the forwarded email. Overrides the original campaign's subject when provided. When omitted, the original campaign subject is used.
</ParamField>

<ParamField body="cc_emails" type="string">
  Optional comma-separated CC recipient email addresses.
</ParamField>

<ParamField body="bcc_emails" type="string">
  Optional comma-separated BCC recipient email addresses.
</ParamField>

<Note>
  `forward_email_body`, `forward_email_subject`, `cc_emails`, and `bcc_emails` are optional. Existing integrations that send only `message_id`, `stats_id`, and `to_emails` are fully backwards-compatible — behaviour is unchanged when these fields are omitted.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/campaigns/12345/forward-email?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "message_id": "msg-abc-123",
      "stats_id": "stats-abc-123",
      "to_emails": "manager@company.com,sales@company.com",
      "cc_emails": "teamlead@company.com",
      "bcc_emails": "audit@company.com",
      "forward_email_subject": "FYI – please review",
      "forward_email_body": "<p>Sharing this thread for your visibility.</p>"
    }'
  ```

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

  API_KEY = "YOUR_API_KEY"

  def forward_email(
      campaign_id,
      message_id,
      stats_id,
      to_emails,
      forward_email_body=None,
      forward_email_subject=None,
      cc_emails=None,
      bcc_emails=None,
  ):
      """Forward an email to other recipients"""
      payload = {
          "message_id": message_id,
          "stats_id": stats_id,
          "to_emails": to_emails,
      }
      if forward_email_body is not None:
          payload["forward_email_body"] = forward_email_body
      if forward_email_subject is not None:
          payload["forward_email_subject"] = forward_email_subject
      if cc_emails is not None:
          payload["cc_emails"] = cc_emails
      if bcc_emails is not None:
          payload["bcc_emails"] = bcc_emails

      response = requests.post(
          f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/forward-email",
          params={"api_key": API_KEY},
          json=payload,
      )

      return response.json()

  # Forward with default subject and body (backwards-compatible)
  forward_email(
      campaign_id=12345,
      message_id="msg-abc-123",
      stats_id="stats-abc-123",
      to_emails="manager@company.com",
  )

  # Forward with custom subject and body
  forward_email(
      campaign_id=12345,
      message_id="msg-abc-124",
      stats_id="stats-abc-124",
      to_emails="sales@company.com,support@company.com",
      cc_emails="teamlead@company.com",
      bcc_emails="audit@company.com",
      forward_email_subject="FYI – please review",
      forward_email_body="<p>Sharing this thread for your visibility.</p>",
  )
  ```

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

  async function forwardEmail(campaignId, body) {
    const response = await fetch(
      `https://server.smartlead.ai/api/v1/campaigns/${campaignId}/forward-email?api_key=${API_KEY}`,
      {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(body),
      }
    );

    return response.json();
  }

  // Forward with default subject and body (backwards-compatible)
  await forwardEmail(12345, {
    message_id: 'msg-abc-123',
    stats_id: 'stats-abc-123',
    to_emails: 'manager@company.com',
  });

  // Forward with custom subject and body
  await forwardEmail(12345, {
    message_id: 'msg-abc-124',
    stats_id: 'stats-abc-124',
    to_emails: 'sales@company.com,support@company.com',
    cc_emails: 'teamlead@company.com',
    bcc_emails: 'audit@company.com',
    forward_email_subject: 'FYI – please review',
    forward_email_body: '<p>Sharing this thread for your visibility.</p>',
  });
  ```
</RequestExample>

## Response Example

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "messageId": "<generated-message-id@smartlead.ai>",
    "status": "success"
  }
  ```

  ```json 400 - Validation Error theme={null}
  {
    "statusCode": 400,
    "error": "Bad Request",
    "message": "\"forward_email_body\" must be a string"
  }
  ```

  ```json 500 - Internal Server Error theme={null}
  {
    "ok": false,
    "error": "Email account not found!",
    "status": "error"
  }
  ```
</ResponseExample>

## Related Endpoints

* [Reply to Email](/api-reference/inbox/reply)
* [Get Inbox Messages](/api-reference/inbox/get-messages)
