Update Broadcast

Update a broadcast. Only broadcasts in draft status can be updated.

PATCH/broadcasts/{broadcast_id}

Requires an API key with broadcasts:write permission.

Path Parameters

broadcast_idstringrequired

The broadcast ID (UUID).

Body Parameters

segment_idstring

The new target segment ID. The legacy audience_id alias is also accepted.

audience_idstring

Legacy alias for segment_id.

fromstring

Sender email address.

subjectstring

Email subject.

htmlstring

HTML content. If updating content, either html or text must be provided. Leave it out to keep the current HTML.

textstring

Plain text content. If updating content, either html or text must be provided. Leave it out to keep the current text.

reply_tostring | string[]

Reply-to email address(es).

namestring

Internal broadcast name.

topic_idstring | null

Topic ID to scope the broadcast. Pass null to remove the topic scope.

preview_textstring | null

Inbox preview text. Pass null to remove it.

Response Fields

idstring

The broadcast ID.

curl -X PATCH 'https://api.postflare.dev/broadcasts/d4e5f6a7-b8c9-0123-defa-234567890123' \
  -H 'Authorization: Bearer sk_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "subject": "Our Updated Monthly Newsletter",
    "html": "<p>Hello, updated content!</p>"
  }'
const response = await fetch(
  'https://api.postflare.dev/broadcasts/d4e5f6a7-b8c9-0123-defa-234567890123',
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer sk_xxxxxxxxx',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      subject: 'Our Updated Monthly Newsletter',
      html: '<p>Hello, updated content!</p>',
    }),
  }
);

const data = await response.json();

Response

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