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

# Send Email Message

> Send an email message to a recipient

#### Description

This endpoint allows you to send an email message to a recipient. You can include attachments, track opens and clicks, and customize the sender information.

#### Headers

<ParamField header="x-api-key" type="string" required placeholder="Enter your API key">
  Your API key for authentication.
</ParamField>

<ParamField header="x-workspace-id" type="string" required placeholder="Enter your workspace ID">
  Your workspace ID for authentication.
</ParamField>

#### Body

<ParamField body="recipient" type="string" required placeholder="Enter recipient email address">
  The email address of the recipient.
</ParamField>

<ParamField body="from_email" type="string" placeholder="Enter sender email address">
  The email address of the sender. If not provided, the default sender email will be used.
</ParamField>

<ParamField body="from_name" type="string" placeholder="Enter sender name">
  The display name of the sender.
</ParamField>

<ParamField body="subject" type="string" required placeholder="Enter email subject">
  The subject line of the email.
</ParamField>

<ParamField body="message" type="string" required placeholder="Enter email message">
  The HTML or plain text content of the email message.
</ParamField>

<ParamField body="pre_header" type="string" placeholder="Enter pre-header text">
  Optional pre-header text that appears in the email preview.
</ParamField>

<ParamField body="reply_to_email" type="string" placeholder="Enter reply-to email address">
  The email address where replies should be sent.
</ParamField>

<ParamField body="reply_to_name" type="string" placeholder="Enter reply-to name">
  The display name for the reply-to address.
</ParamField>

<ParamField body="attachments" type="array" placeholder="Enter attachment URLs">
  Array of attachment URLs to include with the email.
</ParamField>

<ParamField body="track_opens" type="boolean" placeholder="Enter true or false">
  Whether to track email opens. Default: false
</ParamField>

<ParamField body="track_clicks" type="boolean" placeholder="Enter true or false">
  Whether to track link clicks in the email. Default: false
</ParamField>

<ParamField body="post_back_url" type="string" placeholder="Enter post-back URL">
  (Optional) To receive post-back notifications about the sent message as it is delivered or failed. When a message status changes (delivered, failed, etc.), a notification will be sent to this URL. See [Postback Notifications](/api-reference/zixflow-ai/postback-notifications) for the payload format and field descriptions.
</ParamField>

<ParamField body="post_back_data" type="string" placeholder="Enter post-back data">
  (Optional) The data that will be sent back on the post\_back\_url with the notification. This can be used as an identifier for the sent message if the client wants to track or correlate messages with their own system. See [Postback Notifications](/api-reference/zixflow-ai/postback-notifications) for how it appears in the notification.
</ParamField>

#### Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful. true if the request was accepted and queued, false otherwise.
</ResponseField>

<ResponseField name="message" type="string">
  Success message when the request succeeded, or error message when it failed.
</ResponseField>

<ResponseField name="request_id" type="string">
  Present only when success is true. Unique identifier for this request; use it for tracking and for correlating with postback notifications.
</ResponseField>

<ResponseExample>
  ```json 200-Success theme={null}
  {
    "success": true,
    "message": "Email request queued successfully",
    "request_id": "f8df74d1-11fa-4485-b164-b9a65358f4fc"
  }
  ```

  ```json 400-Bad Request theme={null}
  {
    "success": false,
    "message": "Invalid data provided"
  }
  ```

  ```json 401-Unauthorised theme={null}
  {
    "success": false,
    "message": "Unauthorised"
  }
  ```
</ResponseExample>
