# broadcast

URL: /business/nouns/message/broadcast · Id: `verb:Message.broadcast` · Call: `await $.Message.broadcast({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Broadcast sends one Message to an Audience, now or at a set time, split by Variant when an Experiment runs.

Broadcast sends one [Message](/business/nouns/message) to an [Audience](/business/nouns/audience), now or at a set time, split by [Variant](/business/nouns/variant) when an [Experiment](/business/nouns/experiment) runs.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | [Message](/business/nouns/message) | Yes | The Message to send. |
| `audience` | [Audience](/business/nouns/audience) | Yes | Who receives it. |
| `at` | `datetime` | No | When it goes out; omitted, now. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `messages` | list of [Message](/business/nouns/message) | Yes | One sent Message per Contact. |
| `message` | [Message](/business/nouns/message) | Yes | The Message broadcast. |

## Effects
- Emits [`Message.broadcasted`](/business/events/Message.broadcasted).
- Performed by the [Marketing Lead](/agents/marketing/marketing-lead).
- One-way (brand, customer): it waits out its delay window, and runs in the `send` and `do` modes.
- Skips every Contact without Consent for the topic or on a Suppression.
- Sends from the broadcast stream, never the Domain receipts use.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [Message.broadcast](/business/nouns/message/broadcast) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | High: one-way, broad (brand, customer) |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | 1 business day, in which a watcher can pause, redirect or cancel it; then it runs. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Broadcast the latest message with an audience.
```

**API**

```bash
curl -X POST https://api.sb/kilnbakery.com/messages/message_1/broadcast \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"audience":"audience_1"}'
```

```json
{
  "api": "https://api.sb/kilnbakery.com",
  "messages": [
    {
      "$id": "https://api.sb/kilnbakery.com/messages/message_1",
      "$type": "Message",
      "medium": "email",
      "direction": "inbound",
      "body": "Example body"
    }
  ],
  "message": {
    "$id": "https://api.sb/kilnbakery.com/messages/message_1",
    "$type": "Message",
    "medium": "email",
    "direction": "inbound",
    "body": "Example body"
  },
  "action": {
    "$id": "https://api.sb/kilnbakery.com/actions/action_1",
    "operation": "Message.broadcast",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/kilnbakery.com/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const { messages, message } = await $.Message.broadcast({ message: 'message_1', audience: 'audience_1' })
```

**CLI**

```bash
npx startup-builder do Message.broadcast --json '{"message":"message_1","audience":"audience_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Message.broadcast({ message: 'message_1', audience: 'audience_1' })"
  }
}
```