This API lets you link a number rented to your account with a pre-existing campaign.
POST
https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/{Campaign_id}/Number
numberslistrequired | The numbers you want to link to a campaign. Numbers should be in E.164 format |
urlstring | Fully qualified URL to which status update callbacks for the message should be sent. |
methodstring | The HTTP method to be used when calling the URL defined above. Allowed values: GET, POST Defaults to POST. |
{
"api_id": "2a77676c-4e2f-11ed-bbe4-0242ac110002",
"message": "Request to link 14845197649 to campaign CXXXXX was received and is being processed"
}
1
2
3
4
5
6
7
8
9
10
11
12
let plivo = require('plivo');
let fs = require('fs');
let client = new plivo.Client("<auth_id>","<auth_token>");
var callback = {"url":"<URL>", "method":"POST"}
client.campaign.unlinkNumber("<Campaign_ID>",["<Number>"], callback)
.then(function (response) {
console.log(JSON.stringify(response));
}).catch(function (error) {
console.log("err");
console.log(error);
});
1
2
3
4
5
6
7
8
curl -i --user auth_id:auth_token \
-H "Content-Type: application/json" \
-d '{
"numbers": ["<Number>"],
"url": "https://<yourdomain>.com/tendlc_status/",
"method": "POST"
}'\
https://api.plivo.com/v1/Account/<Auth_ID>/10dlc/Campaign/<Campaign_ID>/Number/