cURL
curl --request POST \
--url https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"fromNumber": "+14155551234",
"toNumber": "+14155559876",
"contact": {
"id": "contact_123",
"name": "Alex Morgan"
},
"locationId": "loc_9f7a123",
"campaignId": "campaign_speed_to_lead_123"
}'import requests
url = "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call"
payload = {
"fromNumber": "+14155551234",
"toNumber": "+14155559876"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fromNumber: '+14155551234', toNumber: '+14155559876'})
};
fetch('https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fromNumber' => '+14155551234',
'toNumber' => '+14155559876'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call"
payload := strings.NewReader("{\n \"fromNumber\": \"+14155551234\",\n \"toNumber\": \"+14155559876\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromNumber\": \"+14155551234\",\n \"toNumber\": \"+14155559876\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromNumber\": \"+14155551234\",\n \"toNumber\": \"+14155559876\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"call": {
"callId": "call_123",
"callStatus": "registered",
"lifecycleId": "life_2b7c9f4a"
}
}{
"success": false,
"error": "VALIDATION",
"message": "A required value is missing."
}{
"success": false,
"error": "Unauthorized",
"message": "Authentication required."
}{
"success": false,
"error": "Forbidden",
"message": "You do not have access to this project."
}{
"success": false,
"error": "NotFound",
"message": "Call not found or access denied."
}{
"success": false,
"error": "CONFLICT",
"message": "Add a payment method before placing a test call."
}{
"success": false,
"error": "TooManyRequests",
"message": "Too many requests, please try again later."
}{
"success": false,
"error": "InternalError",
"message": "Unexpected server error."
}Create test call
Place a real test call for an agent. The account must have billing enabled and available balance. Customer role: agency_admin.
Required API key scope: calls:write.
POST
/
api
/
agent-builder
/
agents
/
{id}
/
test-call
cURL
curl --request POST \
--url https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"fromNumber": "+14155551234",
"toNumber": "+14155559876",
"contact": {
"id": "contact_123",
"name": "Alex Morgan"
},
"locationId": "loc_9f7a123",
"campaignId": "campaign_speed_to_lead_123"
}'import requests
url = "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call"
payload = {
"fromNumber": "+14155551234",
"toNumber": "+14155559876"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({fromNumber: '+14155551234', toNumber: '+14155559876'})
};
fetch('https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fromNumber' => '+14155551234',
'toNumber' => '+14155559876'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call"
payload := strings.NewReader("{\n \"fromNumber\": \"+14155551234\",\n \"toNumber\": \"+14155559876\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fromNumber\": \"+14155551234\",\n \"toNumber\": \"+14155559876\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/test-call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fromNumber\": \"+14155551234\",\n \"toNumber\": \"+14155559876\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"call": {
"callId": "call_123",
"callStatus": "registered",
"lifecycleId": "life_2b7c9f4a"
}
}{
"success": false,
"error": "VALIDATION",
"message": "A required value is missing."
}{
"success": false,
"error": "Unauthorized",
"message": "Authentication required."
}{
"success": false,
"error": "Forbidden",
"message": "You do not have access to this project."
}{
"success": false,
"error": "NotFound",
"message": "Call not found or access denied."
}{
"success": false,
"error": "CONFLICT",
"message": "Add a payment method before placing a test call."
}{
"success": false,
"error": "TooManyRequests",
"message": "Too many requests, please try again later."
}{
"success": false,
"error": "InternalError",
"message": "Unexpected server error."
}Authorizations
Send your API key as Authorization: Bearer YOUR_API_KEY.
Path Parameters
Agent id returned by the Agents API.
Minimum string length:
1Body
application/json
Test call request.
Phone number that should place the test call. E.164 format is recommended.
Example:
"+14155551234"
Phone number to dial. E.164 format is recommended.
Example:
"+14155559876"
Show child attributes
Show child attributes
Example:
"loc_9f7a123"
Example:
"campaign_speed_to_lead_123"
⌘I
