Attach phone numbers to a campaign so it can place calls.
curl --request POST \
--url https://api.pineyard.ai/v1/campaigns/{id}/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumberIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phoneNumberIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.pineyard.ai/v1/campaigns/{id}/phone-numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/campaigns/{id}/phone-numbers"
payload = { "phoneNumberIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Phone numbers
Attach phone numbers to a campaign so it can place calls.
POST
/
v1
/
campaigns
/
{id}
/
phone-numbers
Attach phone numbers to a campaign so it can place calls.
curl --request POST \
--url https://api.pineyard.ai/v1/campaigns/{id}/phone-numbers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumberIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({phoneNumberIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.pineyard.ai/v1/campaigns/{id}/phone-numbers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/campaigns/{id}/phone-numbers"
payload = { "phoneNumberIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Required scope:
campaigns.edit
Scopes apply to scoped API keys. Keys issued without scopes can call every
/v1 endpoint.
