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

# Email Reply Headers

> Analyze email headers from test replies for advanced diagnostics

<Note>
  **Smart Delivery API**: This is part of SmartLead's deliverability testing suite. Contact [support@smartlead.ai](mailto:support@smartlead.ai) for access and API details.
</Note>

## Query Parameters

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

<RequestExample>
  ```bash cURL theme={null}
  curl "https://smartdelivery.smartlead.ai/api/v1/spam-test/report/{spamTestId}/sender-account-wise/{replyId}/email-headers?api_key=YOUR_KEY"
  ```

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

  API_KEY = "YOUR_API_KEY"

  response = requests.get(
      "https://smartdelivery.smartlead.ai/api/v1/spam-test/report/{spamTestId}/sender-account-wise/{replyId}/email-headers",
      params={"api_key": API_KEY}
  )

  result = response.json()
  print(result)
  ```

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

  const response = await fetch(
    `https://smartdelivery.smartlead.ai/api/v1/spam-test/report/{spamTestId}/sender-account-wise/{replyId}/email-headers?api_key=${API_KEY}`
  );

  const result = await response.json();
  console.log(result);
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Request successful
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Invalid request parameters or malformed request body
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key. Check your authentication.
</ResponseField>

<ResponseField name="404" type="Not Found">
  The requested resource (campaign, lead, email account, etc.) does not exist or you don't have access to it
</ResponseField>

<ResponseField name="422" type="Validation Error">
  Request validation failed. Check parameter types, required fields, and value constraints.
</ResponseField>

<ResponseField name="429" type="Rate Limit Exceeded">
  Too many requests. Please slow down and retry after the rate limit resets.
</ResponseField>

<ResponseField name="500" type="Internal Server Error">
  Server error occurred. Please try again or contact support if the issue persists.
</ResponseField>

<ResponseField name="503" type="Service Unavailable">
  API is temporarily unavailable or under maintenance. Please try again later.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "Return-Path": "<campaigns@example.com>",
    "Received": "from mail.example.com ([192.168.1.100]) by mx.gmail.com with SMTP id abc123; Sat, 15 Mar 2026 15:30:00 +0000",
    "Reveived-Spf": "pass (google.com: domain of campaigns@example.com designates 192.168.1.100 as permitted sender) client-ip=192.168.1.100;",
    "Authentication-Results": "mx.gmail.com; dkim=pass (valid signature) header.d=example.com; spf=pass (google.com: domain of campaigns@example.com designates 192.168.1.100 as permitted sender) smtp.mailfrom=campaigns@example.com; dmarc=pass (p=quarantine dis=none) header.from=example.com"
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": "Resource not found"
  }
  ```

  ```json 422 - Validation Error theme={null}
  {
    "error": "Invalid parameters provided"
  }
  ```
</ResponseExample>
