This API lets you fetch all the numbers linked to a particular campaign.
API Endpoint
https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/{campaign_id}/Number/
Arguments
No arguments need to be passed.
Returns
The number object for that campaign. The status in the phone_numbers tuple indicates the status of the linking request. The phone_numbers tuple contains a status that can take the values
FAILED
,
PROCESSING
, or
COMPLETED
.
Python
Ruby
Node
PHP
Java
.NET
Go
cURL
import plivo
number = [ "<phone_number>" ]
client = plivo.RestClient( "<auth_id>" , "<auth_token>" )
response = client.campaign.number_link(
campaign_id = "<Campaign_ID>" ,
url = "https://example.com/test" ,
method = "POST" ,
numbers = number,
)
print (response)
{
"api_id" : "8010803c-b4a1-11ec-8f25-0242ac110002" ,
"campaign_alias" : "ABC Campaign" ,
"campaign_id" : "CUOGHIN" ,
"phone_numbers" : [
{
"number" : "12125557777" ,
"status" : "PROCESSING"
},
{
"number" : "12125557778" ,
"status" : "PROCESSING"
},
{
"number" : "12125557779" ,
"status" : "FAILED"
}
],
"usecase" : "STARTER"
}