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

# Send Test Email

> Send a test email from a specific sequence to verify content and deliverability

<Note>
  Test your email sequences before launching. Send to yourself or team to review content, formatting, and personalization.
</Note>

## Path Parameters

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

## Query Parameters

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

## Request Body

<ParamField body="leadId" type="number" required>
  Lead ID to use for personalization variables
</ParamField>

<ParamField body="sequenceNumber" type="number" required>
  Which sequence to test (1, 2, 3, etc.)
</ParamField>

<ParamField body="selectedEmailAccountId" type="number">
  Specific email account to send from (optional)
</ParamField>

<ParamField body="customEmailAddress" type="string">
  Custom recipient email (if different from lead's email)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/campaigns/123/send-test-email?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "leadId": 789,
      "sequenceNumber": 1,
      "customEmailAddress": "test@mycompany.com"
    }'
  ```

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

  API_KEY = "YOUR_API_KEY"

  def send_test_email(campaign_id, lead_id, sequence_num, test_email=None):
      payload = {
          "leadId": lead_id,
          "sequenceNumber": sequence_num
      }
      
      if test_email:
          payload["customEmailAddress"] = test_email
      
      response = requests.post(
          f"https://server.smartlead.ai/api/v1/campaigns/{campaign_id}/send-test-email",
          params={"api_key": API_KEY},
          json=payload
      )
      
      if response.status_code == 200:
          print(f"✅ Test email sent to {test_email or 'lead email'}")
      
      return response.json()

  # Send test to yourself
  send_test_email(123, 789, 1, "myself@mycompany.com")
  ```

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

  async function sendTestEmail(campaignId, leadId, sequenceNum, testEmail) {
    const payload = {
      leadId,
      sequenceNumber: sequenceNum,
      customEmailAddress: testEmail
    };
    
    const response = await fetch(
      `https://server.smartlead.ai/api/v1/campaigns/${campaignId}/send-test-email?api_key=${API_KEY}`,
      {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(payload)
      }
    );
    
    return response.json();
  }

  await sendTestEmail(123, 789, 1, 'test@mycompany.com');
  ```
</RequestExample>

## Response Example

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Test email sent successfully"
  }
  ```
</ResponseExample>

## Related Endpoints

* [Get Campaign Sequences](/api-reference/campaigns/get-sequences)
* [Update Sequences](/api-reference/campaigns/update-sequences)
