Create Broadcast

Create a new broadcast. A broadcast is an email campaign sent to a segment of contacts. After creating a broadcast, call Send Broadcast to deliver it.

POST/broadcasts

Requires a full_access API key.

Body Parameters

segment_idstringrequired

The segment ID (UUID) of contacts to send this broadcast to.

fromstringrequired

Sender email address. Use "Name <email@example.com>" format for a friendly name.

subjectstringrequired

Email subject.

htmlstring

HTML content of the broadcast. Either html or text is required.

textstring

Plain text content of the broadcast. Either html or text is required.

reply_tostring | string[]

Reply-to email address(es).

namestring

A friendly internal name for the broadcast (not visible to recipients).

topic_idstring

Optional topic ID (UUID) to scope the broadcast. Only contacts subscribed to this topic will receive it.

Response Fields

idstring

The ID of the newly created broadcast.

curl -X POST 'https://api.postflare.app/broadcasts' \
  -H 'Authorization: Bearer re_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "segment_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from": "Acme <newsletter@acme.com>",
    "subject": "Our Monthly Newsletter",
    "html": "<p>Hello!</p>",
    "name": "April Newsletter"
  }'
const response = await fetch('https://api.postflare.app/broadcasts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer re_xxxxxxxxx',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    segment_id: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
    from: 'Acme <newsletter@acme.com>',
    subject: 'Our Monthly Newsletter',
    html: '<p>Hello!</p>',
    name: 'April Newsletter',
  }),
});

const data = await response.json();

Response

Response
{
  "id": "d4e5f6a7-b8c9-0123-defa-234567890123"
}