Opt-outs
Delete an opt-out
Removes a phone number from your opt-out list for one channel, so you can message it again on that channel. Do this only after the contact has given consent again, for example after they reply START.
DELETE
/
opt-outs
/
{phoneNumber}
cURL
curl --request DELETE \
--url https://api.vobiz.ai/api/v1/sms/opt-outs/{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.delete_opt_out(
phone_number="+14155550123",
channel="sms",
)
const options = {
method: 'DELETE',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/sms/opt-outs/{phoneNumber}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}{
"error": "missing or invalid credentials"
}{
"error": "internal error"
}Authorizations
Your Vobiz account Auth ID (MA_XXXXXXXX).
Your Vobiz account Auth Token.
Path Parameters
The number in E.164 format, for example +14155550123. In raw HTTP requests, URL-encode the + as %2B (/opt-outs/%2B14155550123); the SDKs encode it for you.
Query Parameters
Channel to remove the opt-out from: sms, mms or rcs. Defaults to sms.
Response
The number is unblocked on that channel.
Confirmation returned by actions that have no resource to return, such as marking a conversation read or creating or deleting an opt-out.
Always ok when the action succeeded.
Example:
"ok"
Was this page helpful?
⌘I
cURL
curl --request DELETE \
--url https://api.vobiz.ai/api/v1/sms/opt-outs/{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.delete_opt_out(
phone_number="+14155550123",
channel="sms",
)
const options = {
method: 'DELETE',
headers: {'X-Auth-ID': '<api-key>', 'X-Auth-Token': '<api-key>'}
};
fetch('https://api.vobiz.ai/api/v1/sms/opt-outs/{phoneNumber}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}{
"error": "missing or invalid credentials"
}{
"error": "internal error"
}