Webhooks
Update a webhook
Changes any subset of url, secret, events, and active on a webhook. Omitted fields keep their value; a field you send, even empty, replaces it.
PUT
/
api
/
v1
/
Account
/
{auth_id}
/
Sms
/
Webhook
/
{id}
/
cURL
curl --request PUT \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Webhook/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"events": [
"message.delivered",
"message.failed"
]
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.webhooks.update_webhook(
id="2a4c6e8f-1b3d-4f5a-8c7e-9d0b2f4a6c8e",
events=[
"message.delivered",
"message.failed"
],
)
const options = {
method: 'PUT',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({events: ['message.delivered', 'message.failed']})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Webhook/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}
Authorizations
Path Parameters
Body
application/json
The fields to change. Send any subset; fields you omit keep their current value.
New list of event names to deliver, matched exactly. Replaces the whole list; it is not merged with the current events.
A messaging event name you can subscribe to: message.status (delivery state changed), message.delivered (reached the handset), message.failed (could not be delivered), message.received (inbound message) or broadcast.updated (broadcast status or counters changed).
Available options:
message.status, message.delivered, message.failed, message.received, broadcast.updated Example:
["message.delivered", "message.failed"]
Was this page helpful?
⌘I
cURL
curl --request PUT \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Webhook/{id}/ \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"events": [
"message.delivered",
"message.failed"
]
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.webhooks.update_webhook(
id="2a4c6e8f-1b3d-4f5a-8c7e-9d0b2f4a6c8e",
events=[
"message.delivered",
"message.failed"
],
)
const options = {
method: 'PUT',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({events: ['message.delivered', 'message.failed']})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/Webhook/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}