Initiate a sandbox call from this agent to a phone number
curl --request POST \
--url https://api.pineyard.ai/agents/{id}/test-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"toNumber": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({toNumber: '<string>'})
};
fetch('https://api.pineyard.ai/agents/{id}/test-call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/{id}/test-call"
payload = { "toNumber": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"callId": "<string>",
"status": "<string>"
}Agents
Initiate a sandbox call from this agent to a phone number
POST
/
agents
/
{id}
/
test-call
Initiate a sandbox call from this agent to a phone number
curl --request POST \
--url https://api.pineyard.ai/agents/{id}/test-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"toNumber": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({toNumber: '<string>'})
};
fetch('https://api.pineyard.ai/agents/{id}/test-call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/agents/{id}/test-call"
payload = { "toNumber": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"callId": "<string>",
"status": "<string>"
}Required scope:
calls.test
Idempotency: an Idempotency-Key header is required when calling with an API key. See Idempotency.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Headers
Path Parameters
Body
application/json

