cURL
curl --request POST \
--url https://api.teamfollowup.ai/api/tfu-live-agents \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"id": "example_agent",
"draft": true
}'import requests
url = "https://api.teamfollowup.ai/api/tfu-live-agents"
payload = {
"id": "example_agent",
"draft": True
}
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({id: 'example_agent', draft: true})
};
fetch('https://api.teamfollowup.ai/api/tfu-live-agents', 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/tfu-live-agents",
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([
'id' => 'example_agent',
'draft' => true
]),
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/tfu-live-agents"
payload := strings.NewReader("{\n \"id\": \"example_agent\",\n \"draft\": true\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/tfu-live-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"example_agent\",\n \"draft\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/tfu-live-agents")
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 \"id\": \"example_agent\",\n \"draft\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"campaign": {
"id": "cmp_123",
"profileId": "example_agent",
"name": "Consultation desk",
"isActive": false,
"sms": true,
"fromNumbers": []
},
"agent": {
"id": "tfu_live:example_agent",
"runtime": "tfu_live",
"name": "Consultation desk",
"brain": {
"prompt": "Help people arrange a consultation. Confirm that their postal code is covered before offering an appointment.",
"capabilities": [
"outreach"
],
"capabilityConfig": {
"workflows": {
"wf_area2k9x": {
"id": "wf_area2k9x",
"name": "Check service area",
"description": "Use when the caller wants to know whether we serve their area.",
"steps": [
{
"id": "zip",
"type": "collect_information",
"config": {
"items": [
{
"id": "zip_code",
"label": "Zip code",
"question": "What is the zip code of the address?",
"type": "text",
"field": "contact.postalCode"
}
]
}
},
{
"id": "coverage",
"type": "check_zip_code",
"config": {
"field": "contact.postalCode",
"codes": [
"10001"
]
},
"outputs": {
"in_area": [
{
"id": "covered",
"type": "steer_agent",
"config": {
"guidance": "Offer a consultation."
}
}
],
"out_of_area": [
{
"id": "outside",
"type": "steer_agent",
"config": {
"guidance": "Explain that this area is not covered."
}
}
]
}
}
]
}
}
}
},
"voice": {
"voiceId": "marin",
"prompt": "Speak at a calm pace and pronounce addresses clearly."
},
"authoring": {
"editable": true,
"reasons": []
},
"orb": {
"style": "default"
},
"ifVersion": "3f2b9c0d1e",
"setup": {
"status": "draft",
"revision": 1
},
"changeHistory": []
},
"setupStarted": false
}
}
Create TFU Live agent
Create one complete Brain and Voice aggregate, an explicit empty draft, or an explicit draft from a Brain template ({ id, brainTemplateId, values?, name? }: the runtime builds the agent the template makes with every workflow in place, values are optional and what is not given stays a setup item, the calendars, teams and reps it names are checked against the sub-account, and its workflow ids derive from the agent id), automatically linked to a paused campaign and private cadence. Retry with the same id and original body after an uncertain response. No campaign activation. Ordinary runtime, agentType and config are refused.
Required scope: `agents:write`.
Required API key scope: `agents:write`.
POST
/
api
/
tfu-live-agents
cURL
curl --request POST \
--url https://api.teamfollowup.ai/api/tfu-live-agents \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"id": "example_agent",
"draft": true
}'import requests
url = "https://api.teamfollowup.ai/api/tfu-live-agents"
payload = {
"id": "example_agent",
"draft": True
}
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({id: 'example_agent', draft: true})
};
fetch('https://api.teamfollowup.ai/api/tfu-live-agents', 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/tfu-live-agents",
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([
'id' => 'example_agent',
'draft' => true
]),
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/tfu-live-agents"
payload := strings.NewReader("{\n \"id\": \"example_agent\",\n \"draft\": true\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/tfu-live-agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"example_agent\",\n \"draft\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/tfu-live-agents")
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 \"id\": \"example_agent\",\n \"draft\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"campaign": {
"id": "cmp_123",
"profileId": "example_agent",
"name": "Consultation desk",
"isActive": false,
"sms": true,
"fromNumbers": []
},
"agent": {
"id": "tfu_live:example_agent",
"runtime": "tfu_live",
"name": "Consultation desk",
"brain": {
"prompt": "Help people arrange a consultation. Confirm that their postal code is covered before offering an appointment.",
"capabilities": [
"outreach"
],
"capabilityConfig": {
"workflows": {
"wf_area2k9x": {
"id": "wf_area2k9x",
"name": "Check service area",
"description": "Use when the caller wants to know whether we serve their area.",
"steps": [
{
"id": "zip",
"type": "collect_information",
"config": {
"items": [
{
"id": "zip_code",
"label": "Zip code",
"question": "What is the zip code of the address?",
"type": "text",
"field": "contact.postalCode"
}
]
}
},
{
"id": "coverage",
"type": "check_zip_code",
"config": {
"field": "contact.postalCode",
"codes": [
"10001"
]
},
"outputs": {
"in_area": [
{
"id": "covered",
"type": "steer_agent",
"config": {
"guidance": "Offer a consultation."
}
}
],
"out_of_area": [
{
"id": "outside",
"type": "steer_agent",
"config": {
"guidance": "Explain that this area is not covered."
}
}
]
}
}
]
}
}
}
},
"voice": {
"voiceId": "marin",
"prompt": "Speak at a calm pace and pronounce addresses clearly."
},
"authoring": {
"editable": true,
"reasons": []
},
"orb": {
"style": "default"
},
"ifVersion": "3f2b9c0d1e",
"setup": {
"status": "draft",
"revision": 1
},
"changeHistory": []
},
"setupStarted": false
}
}
Authorizations
Send your API key as Authorization: Bearer YOUR_API_KEY.
Query Parameters
Sub-account belonging to the authenticated agency and any narrower credential location binding.
Body
application/json
The complete TFU Live authored agent or an explicit draft.
⌘I
