Assign an individual phone number to campaign.
{- "campaignId": "4b300178-131c-d902-d54e-72d90ba1620j",
- "phoneNumber": "+18005550199"
}
{- "campaignId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Retrieve all of your organization's phone number/campaign assignments.
# install http://docs.python-requests.org/en/master/ import requests url = 'https://api.telnyx.com/10dlc/phoneNumberCampaign' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer API_TOKEN' } response = requests.request('get', url, headers=headers) print(response.text)
{- "page": 0,
- "records": [
- {
- "campaignId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "totalRecords": 0
}
Retrieve an individual phone number/campaign assignment by phoneNumber
.
# install http://docs.python-requests.org/en/master/ import requests url = 'https://api.telnyx.com/10dlc/phoneNumberCampaign/{phoneNumber}' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer API_TOKEN' } response = requests.request('get', url, headers=headers) print(response.text)
{- "campaignId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "updatedAt": "2019-08-24T14:15:22Z"
}
This endpoint allows you to assign a different campaign to a supplied phoneNumber
.
{- "campaignId": "string"
}
{- "campaignId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "updatedAt": "2019-08-24T14:15:22Z"
}
This endpoint allows you to remove a campaign assignment from the supplied phoneNumber
.
# install http://docs.python-requests.org/en/master/ import requests url = 'https://api.telnyx.com/10dlc/phoneNumberCampaign/{phoneNumber}' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Bearer API_TOKEN' } response = requests.request('delete', url, headers=headers) print(response.text)
{- "campaignId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "phoneNumber": "string",
- "updatedAt": "2019-08-24T14:15:22Z"
}