Add numbers to your do-not-call list
curl --request POST \
--url https://api.voice.mergenlab.ai/v1/dnc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"numbers": [
"9698XXXXXX",
"+9198XXXXXX02",
"not a number"
],
"reason": "Customer asked not to be called"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
numbers: ['9698XXXXXX', '+9198XXXXXX02', 'not a number'],
reason: 'Customer asked not to be called'
})
};
fetch('https://api.voice.mergenlab.ai/v1/dnc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voice.mergenlab.ai/v1/dnc"
payload = {
"numbers": ["9698XXXXXX", "+9198XXXXXX02", "not a number"],
"reason": "Customer asked not to be called"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"added": 1,
"already": 1,
"invalid": [
"not a number"
]
}Payments and do-not-call
Add numbers to your do-not-call list
Adds 1 to 5000 numbers. Indian numbers are normalized like call numbers (+91...); other numbers must be in
international form (+ and 8 to 15 digits). A number already on the list stays as it is and is counted in
already. Anything that is not a phone number is returned in invalid and nothing else happens to it.
Numbers you add here show source: api.
POST
/
v1
/
dnc
Add numbers to your do-not-call list
curl --request POST \
--url https://api.voice.mergenlab.ai/v1/dnc \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"numbers": [
"9698XXXXXX",
"+9198XXXXXX02",
"not a number"
],
"reason": "Customer asked not to be called"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
numbers: ['9698XXXXXX', '+9198XXXXXX02', 'not a number'],
reason: 'Customer asked not to be called'
})
};
fetch('https://api.voice.mergenlab.ai/v1/dnc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voice.mergenlab.ai/v1/dnc"
payload = {
"numbers": ["9698XXXXXX", "+9198XXXXXX02", "not a number"],
"reason": "Customer asked not to be called"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"added": 1,
"already": 1,
"invalid": [
"not a number"
]
}Authorizations
Authorization: Bearer vg_live_<32 hex characters>. Keys are issued by Mergen admins and shown once.
Missing or invalid key: 401 unauthorized. Suspended account: 403 tenant_suspended.
Body
application/json