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_idstringrequiredThe broadcast ID (UUID).
Body Parameters
segment_idstringThe new target segment ID. The legacy audience_id alias is also accepted.
audience_idstringLegacy alias for segment_id.
fromstringSender email address.
subjectstringEmail subject.
htmlstringHTML content. If updating content, either html or text must be provided. Leave it out to keep the current HTML.
textstringPlain 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).
namestringInternal broadcast name.
topic_idstring | nullTopic ID to scope the broadcast. Pass null to remove the topic scope.
preview_textstring | nullInbox preview text. Pass null to remove it.
Response Fields
idstringThe 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
{
"id": "d4e5f6a7-b8c9-0123-defa-234567890123"
}