Assign or clear the inbound agent for a workspace phone number
curl --request PATCH \
--url https://api.pineyard.ai/phone-numbers/{id}/inbound-agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.pineyard.ai/phone-numbers/{id}/inbound-agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/phone-numbers/{id}/inbound-agent"
payload = { "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"e164": "<string>",
"country": "<string>",
"region": "<string>",
"capabilities": {},
"assignedAt": "2023-11-07T05:31:56Z",
"inboundAgentId": "<string>",
"inboundAgentName": "<string>",
"inboundReady": true
}Phone numbers
Assign or clear the inbound agent for a workspace phone number
PATCH
/
phone-numbers
/
{id}
/
inbound-agent
Assign or clear the inbound agent for a workspace phone number
curl --request PATCH \
--url https://api.pineyard.ai/phone-numbers/{id}/inbound-agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.pineyard.ai/phone-numbers/{id}/inbound-agent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/phone-numbers/{id}/inbound-agent"
payload = { "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"e164": "<string>",
"country": "<string>",
"region": "<string>",
"capabilities": {},
"assignedAt": "2023-11-07T05:31:56Z",
"inboundAgentId": "<string>",
"inboundAgentName": "<string>",
"inboundReady": true
}Required scope:
phone_numbers.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Body
application/json

