Create Broadcast
create-broadcastCreate a broadcast campaign to send one email to an entire segment. Define subject, body, and segment; returns a broadcast ID for later sending.
Instructions
Purpose: Create a broadcast campaign (one email sent to an entire segment). Defines subject, body, and segment; does NOT send yet. Use send-broadcast to send it.
NOT for: Sending a one-off email to specific people (use send-email). Not for adding contacts (use create-contact).
Returns: Broadcast ID. Use this ID with send-broadcast to send, or get-broadcast/update-broadcast to manage.
When to use:
User wants to "email my list", "send a newsletter", "broadcast to my segment", "email all contacts in X"
Newsletter, announcement, or bulk message to one segment
Supports personalization: {{{FIRST_NAME}}}, {{{LAST_NAME}}}, {{{EMAIL}}}, {{{RESEND_UNSUBSCRIBE_URL}}}
"All contacts" note: Broadcasts require a segment. There is no "all contacts" option in the API. If the user wants to send to all contacts, check list-segments for an existing segment that covers everyone. If none exists, suggest creating one with create-segment.
Workflow: list-segments (if needed) → create-broadcast → get-tiptap-json-content (with include_schema: true) → compose-broadcast → send-broadcast.
Content options after creating:
compose-broadcast (recommended): Sets TipTap content that the user can visually edit in the Resend dashboard. Use this when the user wants to collaborate on or refine the email in the editor.
update-broadcast with html/text: Sets static HTML/text content. Use this only when the user explicitly wants to set raw HTML. Switching between compose and html/text modes is lossy — some content or formatting may be lost. Ask the user before switching.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | From email address (e.g. "onboarding@resend.com" or "Resend <onboarding@resend.com>") | |
| html | No | HTML version of the email content. Placeholders: {{{FIRST_NAME|fallback}}}, {{{LAST_NAME|fallback}}}, {{{EMAIL}}}, {{{RESEND_UNSUBSCRIBE_URL}}}. Email HTML requirements — follow all of these without exception: STRUCTURE - Always include <!DOCTYPE html>, <html>, <head>, <body> - Layout must be table-based: <table>, <tr>, <td> — never use <div> for layout - Outer wrapper table at width="100%", inner content table at max 600px wide - Every table must have cellpadding="0" cellspacing="0" border="0" CSS - All styles must be inline (style="...") — no <style> tag, no external stylesheets - No flexbox, no grid, no CSS variables, no CSS shorthand (use padding-top not padding) - font-family must always include web-safe fallbacks (Arial, Helvetica, Georgia, sans-serif) - Always set font-size, line-height, and color explicitly on every text element IMAGES - Always set width, height, border="0", display:block on every <img> - Use absolute URLs only — no relative paths - Always include alt text LINKS & BUTTONS - Never use <button> — use <a> styled as a button inside a <td> - No <video>, <form>, or <input> elements - No JavaScript of any kind OUTLOOK COMPATIBILITY - Use bgcolor attribute on <td> alongside CSS background-color - No CSS background-image (poor Outlook support) - Add <!--[if mso]> conditionals where needed for Outlook rendering META (in <head>) - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| name | Yes | Name for the broadcast. If the user does not provide a name, go ahead and create a descriptive name for them, based on the email subject/content and the context of your conversation. | |
| text | Yes | Plain text version of the email content. The following placeholders may be used to personalize the email content: {{{FIRST_NAME|fallback}}}, {{{LAST_NAME|fallback}}}, {{{EMAIL}}}, {{{RESEND_UNSUBSCRIBE_URL}}} | |
| replyTo | No | Reply-to email address(es) | |
| subject | Yes | Email subject | |
| segmentId | Yes | Segment ID to send to | |
| previewText | No | Preview text for the email |