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

# Send a Transactional Email

> Sends an existing draft to a single recipient as a one-off transactional email.

Requires the `emails:send` scope. Renders an existing [draft](https://www.audienceful.com/help) and emails it to **one** recipient — ideal for receipts, password resets, welcome emails, and other one-off, event-driven sends.

The send is processed asynchronously: the response returns `202 Accepted` with an `operation_id` you can [poll](/api-reference/operations/get), plus the `id` of the created transactional email record.

<Note>
  **Auto-added recipients.** If the `email` isn't already a contact in the workspace, it's added as an active subscriber (source `api`) so the send always has a deliverable target — the same way the [contacts API](/api-reference/people/create) and form signups add people. A new contact triggers the same "Subscribed" automations any other new-subscriber path would. An existing contact is updated in place; a prior unsubscribe is never silently cleared.
</Note>

<Info>
  Transactional sends are kept separate from campaigns: they do **not** appear in the [Send Reports](/api-reference/reports/list) list. Track an individual send by polling its [operation](/api-reference/operations/get); opens, clicks, and bounces are attributed back to the send and show up in the contact's activity.
</Info>

### Requirements

Sending requires a **verified workspace** — one with a valid payment method and no failed payment, the same billing gate the bulk campaign path enforces. An unverified, delinquent, or blocked workspace receives a `403`.

### Body

<ParamField body="draft" type="string" required>
  The **id or slug** of the draft to send. The slug is derived from the draft's title, slugified (e.g. a draft titled "July Newsletter" has the slug `july-newsletter`) — a readable handle that's unique within your workspace. The id is matched first, so it always wins if a slug ever collides with another draft's id.

  Must belong to the API key's workspace — an unknown id or slug returns a `404`. A draft flagged as spam returns a `400`.

  <Note>A draft's slug is assigned from its title the first time it's saved and is **stable** — renaming the draft later doesn't change it, so both the id and the slug are safe to hard-code in an integration. (An untitled draft has no slug; address it by id.)</Note>
</ParamField>

<ParamField body="email" type="string" required>
  The recipient's email address. Added to the workspace as an active subscriber if not already a contact.
</ParamField>

<ParamField body="subject" type="string">
  The email subject. Defaults to the draft's title when omitted. Truncated to 255 characters.
</ParamField>

<ParamField body="preheader" type="string">
  Preview text shown after the subject in most inboxes. Up to 255 characters.
</ParamField>

<ParamField body="event_properties" type="object">
  An optional dictionary exposed to the email's merge tokens for this send — exactly like an [automation trigger's](/api-reference/automations/event) event payload. Use it to inject per-send values (an order number, a reset link, etc.) into the draft's content.

  <Expandable title="properties">
    <ParamField body="example_property" type="string">
      An example property. This value is inserted into the email wherever the body references a matching data variable.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="fields" type="object">
  Custom field values to set on the recipient contact before sending, keyed by each field's `data_name`. Merged into an existing contact's fields.

  <Expandable title="properties">
    <ParamField body="custom_field" type="string | boolean | number">
      An example custom field. The `data_name` for each field is used as the key.
    </ParamField>
  </Expandable>
</ParamField>

<Tip>
  Pass an [`Idempotency-Key`](/idempotency) header so a retried request never double-sends. A repeat of the same key returns the original response.
</Tip>

### Response

Returns `202 Accepted`.

<ResponseField name="id" type="string">
  The id of the created transactional email record.
</ResponseField>

<ResponseField name="operation_id" type="string">
  The id of the async send operation.
</ResponseField>

<ResponseField name="operation_url" type="string">
  The full URL of the [operation](/api-reference/operations/get) — poll it to watch the send progress from `pending` → `processing` → `succeeded` (or `failed`). On success, the operation's `result` includes the final `status` (`sent`) and the `provider_message_id`.
</ResponseField>

<ResponseField name="status" type="string">
  The initial status of the send, `pending`.
</ResponseField>

<ResponseField name="draft" type="string">
  The id of the draft being sent. Always the canonical id, even when you addressed the draft by its slug in the request — so you can confirm which draft a slug resolved to.
</ResponseField>

<ResponseField name="email" type="string">
  The recipient the email is being sent to.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request POST 'https://api.audienceful.com/v2/transactional-emails' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <your-api-key>' \
  --header 'Idempotency-Key: <unique-key>' \
  --data-raw '{
      "draft": "july-newsletter",
      "email": "person@example.com",
      "subject": "Your receipt",
      "event_properties": {
          "order_id": "1234"
      },
      "fields": {
          "first_name": "Jane"
      }
  }'
  ```

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

  url = "https://api.audienceful.com/v2/transactional-emails"
  headers = {
      "Content-Type": "application/json",
      "X-Api-Key": "<your-api-key>",
      "Idempotency-Key": "<unique-key>",
  }
  payload = {
      "draft": "july-newsletter",
      "email": "person@example.com",
      "subject": "Your receipt",
      "event_properties": {
          "order_id": "1234",
      },
      "fields": {
          "first_name": "Jane",
      },
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.audienceful.com/v2/transactional-emails", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-Api-Key": "<your-api-key>",
      "Idempotency-Key": "<unique-key>",
    },
    body: JSON.stringify({
      "draft": "july-newsletter",
      "email": "person@example.com",
      "subject": "Your receipt",
      "event_properties": {
        "order_id": "1234"
      },
      "fields": {
        "first_name": "Jane"
      }
    }),
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "tXn3nKq8Zs4pLm9vRb2xJc",
    "operation_id": "task-abc123",
    "operation_url": "https://api.audienceful.com/v2/operations/task-abc123",
    "status": "pending",
    "draft": "july-newsletter",
    "email": "person@example.com"
  }
  ```
</ResponseExample>
