Remove numbers from a campaign
Detaches numbers from the campaign at the US 10DLC registry and removes the numbers values from the campaign’s numbers list on your account.
curl --request DELETE \
--url https://api.vobiz.ai/api/v1/sms/10dlc/campaigns/{id}/numbers \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"numbers": [
"14155550101"
]
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.campaigns.remove_campaign_numbers(
id="4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24",
numbers=[
"14155550101"
],
)
const options = {
method: 'DELETE',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({numbers: ['14155550101']})
};
fetch('https://api.vobiz.ai/api/v1/sms/10dlc/campaigns/{id}/numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}{
"error": "invalid request: numbers or numberKeys is required"
}{
"error": "missing or invalid credentials"
}{
"error": "campaign not found"
}{
"error": "registration provider rejected the request: number 14155550101 is not attached to this campaign",
"providerError": "registration error 404 (HTTP 404): number not found on campaign"
}{
"error": "internal error"
}{
"error": "registration provider unavailable",
"providerError": "registration error 500 (HTTP 500): upstream timeout"
}Authorizations
Your Vobiz account Auth ID (MA_XXXXXXXX).
Your Vobiz account Auth Token.
Path Parameters
Campaign ID (UUID) returned by POST /10dlc/campaigns or POST /10dlc/campaigns/toll-free. An unknown ID, an ID from another account, or a value that is not a UUID returns 404 with {"error":"campaign not found"}.
Body
Numbers to add to, remove from or re-register on a campaign. Provide numbers, numberKeys, or both; if both are empty the request returns 400 with invalid request: numbers or numberKeys is required.
Phone numbers on your account, as digits with country code and no + (for example 14155550100). These values also update the campaign's numbers list on add and remove.
["14155550100", "14155550101"]
Registry number keys from GET /10dlc/campaigns/{id}/numbers, as an alternative to numbers.
Response
The numbers were removed.
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.
"ok"
Was this page helpful?
curl --request DELETE \
--url https://api.vobiz.ai/api/v1/sms/10dlc/campaigns/{id}/numbers \
--header 'Content-Type: application/json' \
--header 'X-Auth-ID: <api-key>' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"numbers": [
"14155550101"
]
}
'from vobiz import Vobiz
client = Vobiz(api_key="MA_XXXXXXXX", auth_token="YOUR_AUTH_TOKEN")
client.sms.campaigns.remove_campaign_numbers(
id="4c2a0e8d-6b4f-4d2c-b0a8-9e7c5a3f1d24",
numbers=[
"14155550101"
],
)
const options = {
method: 'DELETE',
headers: {
'X-Auth-ID': '<api-key>',
'X-Auth-Token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({numbers: ['14155550101']})
};
fetch('https://api.vobiz.ai/api/v1/sms/10dlc/campaigns/{id}/numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}{
"error": "invalid request: numbers or numberKeys is required"
}{
"error": "missing or invalid credentials"
}{
"error": "campaign not found"
}{
"error": "registration provider rejected the request: number 14155550101 is not attached to this campaign",
"providerError": "registration error 404 (HTTP 404): number not found on campaign"
}{
"error": "internal error"
}{
"error": "registration provider unavailable",
"providerError": "registration error 500 (HTTP 500): upstream timeout"
}