Create a broadcast
Creates a broadcast in draft status with no recipients. Only name and from are required, channel defaults to sms, and nothing is sent yet.
curl --request POST \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Broadcast/ \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "October pricing update",
"from": "+14155550100"
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.broadcasts.create_broadcast(
name="October pricing update",
from_="+14155550100",
template="Hi {{name}}, your refund of {{amount}} is on its way.",
rate_per_second=5,
tag="pricing-oct",
)
const options = {
method: 'POST',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'October pricing update', from: '+14155550100'})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Broadcast/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Authorizations
Path Parameters
Body
Fields for a new broadcast. name and from are required; every other field is optional and takes its documented default.
The sender every message goes out from: an SMS number on your account in E.164 format. Alphanumeric sender IDs and short codes pass format validation but are not routable self-serve outside India; contact support if you need one. Spaces, hyphens and brackets in phone numbers are removed before storing. Launch checks that the number is an SMS number on your account and can be routed. Required on create.
"+14155550100"
Message body, up to 5,000 characters, with {{variable}} placeholders filled per recipient from the columns of your upload. Placeholder names are matched case-insensitively and trimmed, so {{ Name }} matches a name column. Launch requires a non-empty template.
5000"Hi {{name}}, your refund of {{amount}} is on its way."
Response
The new draft broadcast with zero stats.
A bulk SMS send that renders one template for every recipient of an uploaded list and sends at a controlled rate. Its status moves from draft through scheduled or running to completed, cancelled or failed, and stats counts recipients by state.
Lifecycle state. draft until you launch, then scheduled (waiting for scheduledAt) or running. paused after a pause call or when pauseReason is set; completed once every recipient is processed; cancelled after a cancel call; failed when the run stopped on an error.
draft, scheduled, running, paused, completed, cancelled, failed "draft"
Was this page helpful?
curl --request POST \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Broadcast/ \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "October pricing update",
"from": "+14155550100"
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.broadcasts.create_broadcast(
name="October pricing update",
from_="+14155550100",
template="Hi {{name}}, your refund of {{amount}} is on its way.",
rate_per_second=5,
tag="pricing-oct",
)
const options = {
method: 'POST',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: 'October pricing update', from: '+14155550100'})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Broadcast/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));