Opt-outs
Check an opt-out
Tells you whether a phone number is on your opt-out list for a channel. Call it before a send to skip a blocked contact and avoid a 422.
GET
/
api
/
v1
/
Account
/
{auth_id}
/
Sms
/
OptOut
/
{phoneNumber}
/
cURL
curl --request GET \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/{phoneNumber}/ \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.opt_outs.check_opt_out(
phone_number="+14155550123",
channel="sms",
)
const options = {
method: 'GET',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/{phoneNumber}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"optedOut": true
}Authorizations
Path Parameters
Was this page helpful?
⌘I
cURL
curl --request GET \
--url https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/{phoneNumber}/ \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.opt_outs.check_opt_out(
phone_number="+14155550123",
channel="sms",
)
const options = {
method: 'GET',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/Account/{auth_id}/Sms/OptOut/{phoneNumber}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"optedOut": true
}