Download campaign source
curl --request GET \
--url https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}/source-download-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}/source-download-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}/source-download-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"download_url": "<string>",
"expires_in": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Campaigns
Download campaign source
Create a temporary download URL for a campaign CSV source.
GET
/
api
/
v1
/
campaign
/
{campaign_id}
/
source-download-url
Download campaign source
curl --request GET \
--url https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}/source-download-url \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}/source-download-url"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/campaign/{campaign_id}/source-download-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"download_url": "<string>",
"expires_in": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Requires a Labs
super_user OAuth bearer token. The campaign must belong to the selected workspace and use a CSV source. Other source types return 400; a missing campaign returns 404. The returned URL expires in 900 seconds. Treat the contact file and URL as sensitive.Authorizations
Bandwidth Labs OAuth access token. Uses the user's selected workspace; the workspace header is not required. Do not also send an API key. Bearer-only operations may additionally require the Labs super_user role.