cURL
curl --request POST \
--url https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"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."
}
}
]
}
}
]
}
}
}'import requests
url = "https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate"
payload = { "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." }
}
]
}
}
]
} } }
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({
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.'}
}
]
}
}
]
}
}
})
};
fetch('https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate', 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/{id}/workflows/validate",
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([
'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.'
]
]
]
]
]
]
]
]
]),
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/{id}/workflows/validate"
payload := strings.NewReader("{\n \"workflows\": {\n \"wf_area2k9x\": {\n \"id\": \"wf_area2k9x\",\n \"name\": \"Check service area\",\n \"description\": \"Use when the caller wants to know whether we serve their area.\",\n \"steps\": [\n {\n \"id\": \"zip\",\n \"type\": \"collect_information\",\n \"config\": {\n \"items\": [\n {\n \"id\": \"zip_code\",\n \"label\": \"Zip code\",\n \"question\": \"What is the zip code of the address?\",\n \"type\": \"text\",\n \"field\": \"contact.postalCode\"\n }\n ]\n }\n },\n {\n \"id\": \"coverage\",\n \"type\": \"check_zip_code\",\n \"config\": {\n \"field\": \"contact.postalCode\",\n \"codes\": [\n \"10001\"\n ]\n },\n \"outputs\": {\n \"in_area\": [\n {\n \"id\": \"covered\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Offer a consultation.\"\n }\n }\n ],\n \"out_of_area\": [\n {\n \"id\": \"outside\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Explain that this area is not covered.\"\n }\n }\n ]\n }\n }\n ]\n }\n }\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/{id}/workflows/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflows\": {\n \"wf_area2k9x\": {\n \"id\": \"wf_area2k9x\",\n \"name\": \"Check service area\",\n \"description\": \"Use when the caller wants to know whether we serve their area.\",\n \"steps\": [\n {\n \"id\": \"zip\",\n \"type\": \"collect_information\",\n \"config\": {\n \"items\": [\n {\n \"id\": \"zip_code\",\n \"label\": \"Zip code\",\n \"question\": \"What is the zip code of the address?\",\n \"type\": \"text\",\n \"field\": \"contact.postalCode\"\n }\n ]\n }\n },\n {\n \"id\": \"coverage\",\n \"type\": \"check_zip_code\",\n \"config\": {\n \"field\": \"contact.postalCode\",\n \"codes\": [\n \"10001\"\n ]\n },\n \"outputs\": {\n \"in_area\": [\n {\n \"id\": \"covered\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Offer a consultation.\"\n }\n }\n ],\n \"out_of_area\": [\n {\n \"id\": \"outside\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Explain that this area is not covered.\"\n }\n }\n ]\n }\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate")
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 \"workflows\": {\n \"wf_area2k9x\": {\n \"id\": \"wf_area2k9x\",\n \"name\": \"Check service area\",\n \"description\": \"Use when the caller wants to know whether we serve their area.\",\n \"steps\": [\n {\n \"id\": \"zip\",\n \"type\": \"collect_information\",\n \"config\": {\n \"items\": [\n {\n \"id\": \"zip_code\",\n \"label\": \"Zip code\",\n \"question\": \"What is the zip code of the address?\",\n \"type\": \"text\",\n \"field\": \"contact.postalCode\"\n }\n ]\n }\n },\n {\n \"id\": \"coverage\",\n \"type\": \"check_zip_code\",\n \"config\": {\n \"field\": \"contact.postalCode\",\n \"codes\": [\n \"10001\"\n ]\n },\n \"outputs\": {\n \"in_area\": [\n {\n \"id\": \"covered\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Offer a consultation.\"\n }\n }\n ],\n \"out_of_area\": [\n {\n \"id\": \"outside\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Explain that this area is not covered.\"\n }\n }\n ]\n }\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"valid": true,
"tools": [
{
"workflowId": "wf_area2k9x",
"tool": "check_service_area"
}
]
}
}Validate TFU Live workflows
TFU Live only. Check a complete workflows map with every check a save makes, including the runtime’s node settings and secret headers, without saving anything. Answers the tool name each workflow would have.
Required scope: agents:write.
Required API key scope: agents:write.
POST
/
api
/
tfu-live-agents
/
{id}
/
workflows
/
validate
cURL
curl --request POST \
--url https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"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."
}
}
]
}
}
]
}
}
}'import requests
url = "https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate"
payload = { "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." }
}
]
}
}
]
} } }
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({
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.'}
}
]
}
}
]
}
}
})
};
fetch('https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate', 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/{id}/workflows/validate",
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([
'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.'
]
]
]
]
]
]
]
]
]),
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/{id}/workflows/validate"
payload := strings.NewReader("{\n \"workflows\": {\n \"wf_area2k9x\": {\n \"id\": \"wf_area2k9x\",\n \"name\": \"Check service area\",\n \"description\": \"Use when the caller wants to know whether we serve their area.\",\n \"steps\": [\n {\n \"id\": \"zip\",\n \"type\": \"collect_information\",\n \"config\": {\n \"items\": [\n {\n \"id\": \"zip_code\",\n \"label\": \"Zip code\",\n \"question\": \"What is the zip code of the address?\",\n \"type\": \"text\",\n \"field\": \"contact.postalCode\"\n }\n ]\n }\n },\n {\n \"id\": \"coverage\",\n \"type\": \"check_zip_code\",\n \"config\": {\n \"field\": \"contact.postalCode\",\n \"codes\": [\n \"10001\"\n ]\n },\n \"outputs\": {\n \"in_area\": [\n {\n \"id\": \"covered\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Offer a consultation.\"\n }\n }\n ],\n \"out_of_area\": [\n {\n \"id\": \"outside\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Explain that this area is not covered.\"\n }\n }\n ]\n }\n }\n ]\n }\n }\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/{id}/workflows/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflows\": {\n \"wf_area2k9x\": {\n \"id\": \"wf_area2k9x\",\n \"name\": \"Check service area\",\n \"description\": \"Use when the caller wants to know whether we serve their area.\",\n \"steps\": [\n {\n \"id\": \"zip\",\n \"type\": \"collect_information\",\n \"config\": {\n \"items\": [\n {\n \"id\": \"zip_code\",\n \"label\": \"Zip code\",\n \"question\": \"What is the zip code of the address?\",\n \"type\": \"text\",\n \"field\": \"contact.postalCode\"\n }\n ]\n }\n },\n {\n \"id\": \"coverage\",\n \"type\": \"check_zip_code\",\n \"config\": {\n \"field\": \"contact.postalCode\",\n \"codes\": [\n \"10001\"\n ]\n },\n \"outputs\": {\n \"in_area\": [\n {\n \"id\": \"covered\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Offer a consultation.\"\n }\n }\n ],\n \"out_of_area\": [\n {\n \"id\": \"outside\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Explain that this area is not covered.\"\n }\n }\n ]\n }\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/tfu-live-agents/{id}/workflows/validate")
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 \"workflows\": {\n \"wf_area2k9x\": {\n \"id\": \"wf_area2k9x\",\n \"name\": \"Check service area\",\n \"description\": \"Use when the caller wants to know whether we serve their area.\",\n \"steps\": [\n {\n \"id\": \"zip\",\n \"type\": \"collect_information\",\n \"config\": {\n \"items\": [\n {\n \"id\": \"zip_code\",\n \"label\": \"Zip code\",\n \"question\": \"What is the zip code of the address?\",\n \"type\": \"text\",\n \"field\": \"contact.postalCode\"\n }\n ]\n }\n },\n {\n \"id\": \"coverage\",\n \"type\": \"check_zip_code\",\n \"config\": {\n \"field\": \"contact.postalCode\",\n \"codes\": [\n \"10001\"\n ]\n },\n \"outputs\": {\n \"in_area\": [\n {\n \"id\": \"covered\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Offer a consultation.\"\n }\n }\n ],\n \"out_of_area\": [\n {\n \"id\": \"outside\",\n \"type\": \"steer_agent\",\n \"config\": {\n \"guidance\": \"Explain that this area is not covered.\"\n }\n }\n ]\n }\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"valid": true,
"tools": [
{
"workflowId": "wf_area2k9x",
"tool": "check_service_area"
}
]
}
}Authorizations
Send your API key as Authorization: Bearer YOUR_API_KEY.
Path Parameters
TFU Live agent id. Never use an ordinary provider agent id.
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.
The complete workflows map to check, as brain.capabilityConfig.workflows would hold it.
Show child attributes
Show child attributes
⌘I
