Opt-outs
Create an opt-out
Adds a phone number to your opt-out list for one channel. POST /Message/ to it then returns 422, broadcasts skip it, and sms also blocks mms.
POST
/
api
/
v1
/
Account
/
{auth_id}
/
Sms
/
OptOut
/
cURL
curl --request POST \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/ \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"phoneNumber": "+14155550123"
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.opt_outs.create_opt_out(
phone_number="+14155550123",
channel="sms",
reason="customer request",
)
const options = {
method: 'POST',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phoneNumber: '+14155550123'})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}
Authorizations
Path Parameters
Body
application/json
The number and channel to add to your opt-out list, with an optional reason.
Was this page helpful?
⌘I
cURL
curl --request POST \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/ \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"phoneNumber": "+14155550123"
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.opt_outs.create_opt_out(
phone_number="+14155550123",
channel="sms",
reason="customer request",
)
const options = {
method: 'POST',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({phoneNumber: '+14155550123'})
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}