broadcasts
Update broadcast
Update a broadcast's name, message, template, or segment filters. Only draft broadcasts can be updated.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
broadcastIdstring
name?string
description?string
message?
Generic message payload (used for non-WhatsApp platforms).
template?
WhatsApp template payload (used when platform is whatsapp).
segmentFilters?object
Recipient segment filters (tags, channels, subscription state).
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.broadcasts.updateBroadcast({ path: { broadcastId: 'broadcast_abc123', }, body: { name: 'Example', description: 'Hello, world!', message: { text: 'Hello, world!', }, },});console.log(data);{
"success": true,
"broadcast": {
"id": "string",
"name": "string",
"description": "string",
"status": "string",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}