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

# Transactional Broadcasts

> Trigger a single message through the API the moment an event happens

Transactional broadcasts fire one message at a time, triggered by your backend the moment something happens: a sign-up, a purchase, a password reset. Instead of choosing an audience and a send time, you set up the message once, activate it, then call its endpoint whenever you need to send. Each call delivers to a single recipient and fans out across every channel you configured.

Use them for one-to-one, event-driven messages such as one-time passcodes, receipts, order confirmations, and password resets.

<Note>
  This page covers the transactional-specific flow. For the building blocks every broadcast shares (channels, templates, and properties), start with the [Broadcasts overview](/guides/broadcasts/introduction). To send one message to a whole segment at once, see [Marketing broadcasts](/guides/broadcasts/marketing).
</Note>

<Info>
  **No audience, no schedule.** A transactional broadcast sends one message each time you trigger it, so there is no list to send to and no moment to schedule. Each recipient is messaged on every channel they are reachable on: someone with both an email and a WhatsApp number gets both. It is not a fallback chain.
</Info>

<Frame>
  <img src="https://mintcdn.com/invent/LxdUza_wdGWVVGbx/assets/guides/broadcasts-transactional-overview.png?fit=max&auto=format&n=LxdUza_wdGWVVGbx&q=85&s=ea0c3b86838c1719f82588f66b75e985" alt="A transactional broadcast showing the trigger panel and the Ready to activate checklist" style={{ maxHeight: '400px' }} width="1850" height="1418" data-path="assets/guides/broadcasts-transactional-overview.png" />
</Frame>

## How it works

<Steps>
  <Step title="Create a transactional broadcast">
    Click **+ Create Broadcast**, name it, and choose **Transactional** as the type. The type cannot be changed after creation.
  </Step>

  <Step title="Add channels and content">
    Add one or more channels and complete a [template](/guides/broadcasts/introduction#channels) for each. This is the same editor that marketing broadcasts use.
  </Step>

  <Step title="Define your variables">
    Add any [properties](/guides/broadcasts/introduction#properties) your templates need, such as `otp` or `order_id`. For transactional broadcasts, the values arrive with each trigger rather than from a contact list.
  </Step>

  <Step title="Activate">
    Click **Activate Broadcast** to open the endpoint. The broadcast moves to **Active** and starts accepting triggers immediately.
  </Step>

  <Step title="Trigger from your backend">
    Call the send endpoint whenever the event happens. Each call delivers to one recipient.
  </Step>
</Steps>

## Setting up the trigger

The Trigger section has two tabs: **API** and **Manual**.

### API

The API tab shows the exact endpoint for this broadcast, a ready-to-copy cURL example, and a link to manage your API keys.

<Frame>
  <img src="https://mintcdn.com/invent/cjVflPxxsOpR3mU0/assets/guides/broadcasts-transactional-trigger.png?fit=max&auto=format&n=cjVflPxxsOpR3mU0&q=85&s=2d7032faad5a9164601e36335c01e968" alt="Trigger API tab showing the POST endpoint, a cURL example, and a Manage API keys button" style={{ maxHeight: '400px' }} width="1536" height="1028" data-path="assets/guides/broadcasts-transactional-trigger.png" />
</Frame>

The endpoint is:

```bash theme={"system"}
POST https://api.useinvent.com/orgs/<ORG_ID>/broadcasts/<BROADCAST_ID>/send
```

A complete request looks like this:

```bash theme={"system"}
curl -X POST 'https://api.useinvent.com/orgs/<ORG_ID>/broadcasts/<BROADCAST_ID>/send' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "user@example.com",
    "variables": {
      "otp": "123456"
    }
  }'
```

<Info>
  Authenticate with an organization API key, sent as a bearer token in the `Authorization` header. Create and manage keys in [Settings, API keys](/workspace-management/api-keys).
</Info>

#### Identifying the recipient

Every trigger names exactly one recipient. Provide at least one identifier, in order of precedence:

| Field                | Tier          | Use it when                                                                                                  |
| -------------------- | ------------- | ------------------------------------------------------------------------------------------------------------ |
| `contact_channel_id` | Most specific | You already know the exact channel to send on. Skips contact resolution and the channel-availability filter. |
| `contact_id`         | Known contact | You have the contact's ID. The channel is inferred per template at send time.                                |
| `phone` or `email`   | Raw           | You only have a raw identifier. Invent finds or creates the contact. You can pass either or both.            |

#### Overriding the recipient details

`phone`, `email`, and `name` double as per-send overrides. When you also pass a `contact_id` or `contact_channel_id`, any of these you include replaces the resolved channel and contact value for that send only. The contact and its stored channels are never modified.

| Field   | Overrides                             |
| ------- | ------------------------------------- |
| `phone` | The phone the message is delivered to |
| `email` | The email the message is delivered to |
| `name`  | The display name used in the message  |

<Note>
  `name` is an override, not an identifier. It cannot resolve a recipient on its own, so a trigger still needs one of `contact_channel_id`, `contact_id`, `phone`, or `email`.
</Note>

#### Request body

| Field                                                | Required     | Description                                                                                                                                              |
| ---------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `contact_channel_id`, `contact_id`, `phone`, `email` | At least one | Recipient identifiers, sent at the top level of the body. See [Identifying the recipient](#identifying-the-recipient) for precedence.                    |
| `name`                                               | No           | Display-name override for this send. See [Overriding the recipient details](#overriding-the-recipient-details).                                          |
| `variables`                                          | No           | Values for your broadcast fields. They override the contact's stored values, and any field you omit falls back to its configured default.                |
| `template_ids`                                       | No           | A subset of templates to fire. Omit to fire every template on the broadcast.                                                                             |
| `background`                                         | No           | When `false` (default), the call waits for the send and returns an `external_message_id` per template. When `true`, it enqueues and returns immediately. |

The response returns one recipient record per template fired, so you can confirm exactly what was sent.

<Warning>
  The send endpoint is rate limited to **100 requests per 60 seconds**. Queue or batch on your side if you expect bursts above that.
</Warning>

### Manual

Manual triggering from the dashboard is coming soon. It will let you fire a broadcast for a specific contact straight from the UI. For now, use the API tab to send from your backend.

## Variables

Transactional templates use the same [properties](/guides/broadcasts/introduction#properties) as marketing broadcasts, with one difference in where the values come from:

* **Defaults** are set on the broadcast and used when a trigger omits a value.
* **Per-trigger values** are passed in the `variables` object and override the defaults for that send.

This lets one broadcast serve many cases. A single `order_confirmation` broadcast can carry a different `order_id` and `total` on every call.

## Activating, pausing, and resuming

<Steps>
  <Step title="Activate">
    With at least one complete template, click **Activate Broadcast**. Activating opens the endpoint, and the broadcast starts accepting triggers immediately. Status: **Active**.
  </Step>

  <Step title="Pause">
    Click **Pause** to stop accepting triggers. Calls are rejected while paused, and your configuration is preserved. Status: **Paused**.
  </Step>

  <Step title="Resume">
    Click **Resume** to reopen the endpoint. The broadcast returns to **Active** with the same setup.
  </Step>
</Steps>

<Note>
  You can pause and resume as often as you need without losing templates, variables, or settings. A transactional broadcast stays live until you pause it.
</Note>

## Monitoring

An active broadcast shows a live status banner: it is active and accepting triggers since the activation date, along with how many messages have been sent across how many channels. A paused broadcast shows the paused state and the same totals.

The Recipients table lists every triggered message with its channel, delivery status, and a **Source** column showing whether the trigger came from the API or a manual send. Because each trigger fans out across templates, one call can produce several rows, one per template.

## Consent and compliance

<Info>
  Transactional broadcasts respect each contact's subscription status, just like marketing broadcasts. If the recipient has unsubscribed or is blocked, the trigger is **rejected**: the API returns an error and no message is sent, so you do not need to filter these contacts yourself.
</Info>

Even so, use transactional broadcasts only for genuinely transactional messages the recipient is expecting, such as one-time passcodes, receipts, and confirmations. For promotional content, use a [marketing broadcast](/guides/broadcasts/marketing).

On WhatsApp, match the template category to the content: send these under **Utility** or **Authentication** templates, not **Marketing**. See [Template categories](/guides/broadcasts/channels/whatsapp#template-categories) and [WhatsApp Best Practices](/guides/broadcasts/whatsapp-best-practices).

## Next steps

<CardGroup cols={2}>
  <Card title="Marketing Broadcasts" icon="bullhorn" href="/guides/broadcasts/marketing">
    Send one message to a whole segment at once
  </Card>

  <Card title="API keys" icon="key" href="/workspace-management/api-keys">
    Create and manage the keys that authenticate your triggers
  </Card>

  <Card title="WhatsApp" icon="whatsapp" iconType="brands" href="/guides/broadcasts/channels/whatsapp">
    Configure WhatsApp Templates for transactional sends
  </Card>

  <Card title="Broadcasts Overview" icon="tower-broadcast" href="/guides/broadcasts/introduction">
    Channels, properties, and statuses shared by every broadcast
  </Card>
</CardGroup>
