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

# Send Email

> The primary endpoint for injecting a new email message into the SendSculpt Mailer queue.

Under the hood, all our SDKs interface directly with the SendSculpt Mailer through this endpoint. While the SDKs do the heavy lifting, it's beneficial to understand how the API accepts data.

### Authentication

SendSculpt uses an API Key for authentication. Pass your key in the custom header `x-sendsculpt-key`.

<ParamField header="x-sendsculpt-key" type="string" required>
  Your SendSculpt API Key for authentication.
</ParamField>

### Request Body

<ParamField body="to" type="array of strings" required>
  List of primary recipient email addresses.
</ParamField>

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

<ParamField body="from_email" type="string" required>
  The sender email address. Its domain must be registered and fully verified (SPF, DKIM) under your SendSculpt organization account.
</ParamField>

<ParamField body="body_html" type="string">
  The HTML body of the email. Cannot be used alongside `template_id`.
</ParamField>

<ParamField body="body_text" type="string">
  The plain text fallback body of the email. Cannot be used alongside `template_id`.
</ParamField>

<ParamField body="cc" type="array of strings">
  List of secondary recipient email addresses.
</ParamField>

<ParamField body="bcc" type="array of strings">
  List of blind carbon copy recipient email addresses.
</ParamField>

<ParamField body="template_id" type="string">
  UUID of the template to utilize. If provided, `body_html` and `body_text` are ignored.
</ParamField>

<ParamField body="template_data" type="object">
  Context variables (key-value pairs) injected into the email template. Requires a `template_id` to be present.
</ParamField>

<ParamField body="reply_to" type="array of strings">
  Email address(es) that recipients should direct replies to.
</ParamField>

<ParamField body="sender_name" type="string">
  The friendly display name of the sender.
</ParamField>

<ParamField body="attachments" type="array of objects">
  <Expandable title="Attachment Object">
    <ParamField body="filename" type="string" required>
      The display name of the file attachment.
    </ParamField>

    <ParamField body="file_path" type="string" required>
      The file path of the attachment.
    </ParamField>

    <ParamField body="mime_type" type="string" required>
      The MIME type of the file (e.g., `application/pdf`).
    </ParamField>
  </Expandable>
</ParamField>

### Response

<ResponseField name="message_id" type="string">
  A unique identifier representing the queued email request.
</ResponseField>

<ResponseField name="status" type="string">
  The initial status of the email, typically `"sent"` upon successful queueing.
</ResponseField>

<RequestExample>
  ```json Request Payload theme={null}
  {
    "to": ["user1@example.com", "user2@example.com"],
    "subject": "Hello World",
    "from_email": "noreply@yourdomain.com",
    "body_html": "<h1>Say Hello!</h1>",
    "body_text": "Say Hello!",
    "cc": ["team_member@example.com"],
    "bcc": ["archive@example.com"],
    "template_id": "uuid-of-the-template",
    "template_data": {
      "first_name": "John",
      "invoice_amount": "49.99"
    },
    "reply_to": ["support@yourdomain.com"],
    "sender_name": "The Awesome Team",
    "attachments": [
      {
        "filename": "invoice_001.pdf",
        "file_path": "/path/to/local/invoice.pdf",
        "mime_type": "application/pdf"
      }
    ]
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "status": true,
    "code": 200,
    "message": "success",
    "data": {
      "message_id": "14c8b715-e0f7-4339-b098-4fc2d81d78b1",
      "status": "queued"
    },
    "error": null
  }
  ```
</ResponseExample>
