Skip to main content
POST
/
v2
/
transactional-emails
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": "[email protected]",
    "subject": "Your receipt",
    "event_properties": {
        "order_id": "1234"
    },
    "fields": {
        "first_name": "Jane"
    }
}'
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": "[email protected]",
    "subject": "Your receipt",
    "event_properties": {
        "order_id": "1234",
    },
    "fields": {
        "first_name": "Jane",
    },
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
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": "[email protected]",
    "subject": "Your receipt",
    "event_properties": {
      "order_id": "1234"
    },
    "fields": {
      "first_name": "Jane"
    }
  }),
});
const data = await response.json();
console.log(data);
{
  "id": "tXn3nKq8Zs4pLm9vRb2xJc",
  "operation_id": "task-abc123",
  "operation_url": "https://api.audienceful.com/v2/operations/task-abc123",
  "status": "pending",
  "draft": "july-newsletter",
  "email": "[email protected]"
}
Requires the emails:send scope. Renders an existing draft 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, plus the id of the created transactional email record.
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 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.
Transactional sends are kept separate from campaigns: they do not appear in the Send Reports list. Track an individual send by polling its operation; opens, clicks, and bounces are attributed back to the send and show up in the contact’s activity.

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

draft
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.
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.)
email
string
required
The recipient’s email address. Added to the workspace as an active subscriber if not already a contact.
subject
string
The email subject. Defaults to the draft’s title when omitted. Truncated to 255 characters.
preheader
string
Preview text shown after the subject in most inboxes. Up to 255 characters.
event_properties
object
An optional dictionary exposed to the email’s merge tokens for this send — exactly like an automation trigger’s event payload. Use it to inject per-send values (an order number, a reset link, etc.) into the draft’s content.
fields
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.
Pass an Idempotency-Key header so a retried request never double-sends. A repeat of the same key returns the original response.

Response

Returns 202 Accepted.
id
string
The id of the created transactional email record.
operation_id
string
The id of the async send operation.
operation_url
string
The full URL of the operation — poll it to watch the send progress from pendingprocessingsucceeded (or failed). On success, the operation’s result includes the final status (sent) and the provider_message_id.
status
string
The initial status of the send, pending.
draft
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.
email
string
The recipient the email is being sent to.
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": "[email protected]",
    "subject": "Your receipt",
    "event_properties": {
        "order_id": "1234"
    },
    "fields": {
        "first_name": "Jane"
    }
}'
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": "[email protected]",
    "subject": "Your receipt",
    "event_properties": {
        "order_id": "1234",
    },
    "fields": {
        "first_name": "Jane",
    },
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
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": "[email protected]",
    "subject": "Your receipt",
    "event_properties": {
      "order_id": "1234"
    },
    "fields": {
      "first_name": "Jane"
    }
  }),
});
const data = await response.json();
console.log(data);
{
  "id": "tXn3nKq8Zs4pLm9vRb2xJc",
  "operation_id": "task-abc123",
  "operation_url": "https://api.audienceful.com/v2/operations/task-abc123",
  "status": "pending",
  "draft": "july-newsletter",
  "email": "[email protected]"
}