Rename split variant
Give one active variant a name of your choosing, or send name: null to restore its default name, the primary’s name plus a Roman numeral. A chosen name is kept. Renaming the primary updates only the variants that still have a default name, and a variant with a chosen name reports customName: true until it is reset.
Names are unique within the split, case-insensitively. A clash answers 400. Renaming the Primary Variant renames the agent itself, and every variant with a default name follows it.
If the agent behind the variant cannot be renamed, the operation answers 502 and nothing changes. A retry is safe.
Required API key scope: agents:write.
PATCH
/
api
/
agent-builder
/
agents
/
{id}
/
split-test
/
variants
/
{variantAgentId}
cURL
curl --request PATCH \
--url https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId} \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"revision": 5,
"name": "Warm intro"
}'import requests
url = "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}"
payload = {
"revision": 5,
"name": "Warm intro"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({revision: 5, name: 'Warm intro'})
};
fetch('https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}', 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}/split-test/variants/{variantAgentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'revision' => 5,
'name' => 'Warm intro'
]),
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}/split-test/variants/{variantAgentId}"
payload := strings.NewReader("{\n \"revision\": 5,\n \"name\": \"Warm intro\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": 5,\n \"name\": \"Warm intro\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"revision\": 5,\n \"name\": \"Warm intro\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"splitTest": {
"locationId": "loc_9f7a123",
"campaignId": "campaign_speed_to_lead_123",
"primaryAgentId": "agent_8a488fcfa8fdbf8ce8ad5ccc45",
"status": "active",
"revision": 6,
"sync": {
"status": "healthy",
"failedAt": null
},
"variants": [
{
"agentId": "agent_8a488fcfa8fdbf8ce8ad5ccc45",
"name": "Speed to Lead",
"sequence": 1,
"weight": 50,
"status": "active",
"addedAt": "2026-08-14T09:12:44.318Z",
"removedAt": null,
"isPrimary": true
},
{
"agentId": "agent_7c4e1b28f0a94d6591cc2fd340",
"name": "Warm intro",
"sequence": 2,
"weight": 50,
"status": "active",
"addedAt": "2026-08-20T16:04:02.771Z",
"removedAt": null,
"isPrimary": false,
"customName": true
}
]
}
}{
"success": false,
"error": "VALIDATION",
"message": "Something here doesn't look right. Please check it and try again."
}{
"success": false,
"error": "Unauthorized",
"message": "Please sign in to continue."
}{
"success": false,
"error": "FORBIDDEN",
"message": "You don't have access to this. Ask your account admin if you need it."
}{
"success": false,
"error": "NOT_FOUND",
"message": "We couldn't find that. It may have been moved or deleted."
}{
"success": false,
"error": "CONFLICT",
"message": "This changed while you were working on it. Please refresh and try again."
}{
"success": false,
"error": "TooManyRequests",
"message": "That's a lot at once. Please wait a moment and try again."
}{
"success": false,
"error": "Internal",
"message": "Something went wrong on our side. Please try again in a moment.",
"ref": "3f2b8c1e-7d4a-4f8e-9b6a-2c1d0e5f7a9b"
}{
"success": false,
"error": "SYNC_FAILED",
"message": "We couldn't save the agent versions. Please try again in a moment.",
"ref": "3f2b8c1e-7d4a-4f8e-9b6a-2c1d0e5f7a9b"
}Authorizations
Path Parameters
Body
application/json
The revision being changed and the new name, or null to reset.
⌘I
cURL
curl --request PATCH \
--url https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId} \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"revision": 5,
"name": "Warm intro"
}'import requests
url = "https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}"
payload = {
"revision": 5,
"name": "Warm intro"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({revision: 5, name: 'Warm intro'})
};
fetch('https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}', 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}/split-test/variants/{variantAgentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'revision' => 5,
'name' => 'Warm intro'
]),
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}/split-test/variants/{variantAgentId}"
payload := strings.NewReader("{\n \"revision\": 5,\n \"name\": \"Warm intro\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": 5,\n \"name\": \"Warm intro\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teamfollowup.ai/api/agent-builder/agents/{id}/split-test/variants/{variantAgentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"revision\": 5,\n \"name\": \"Warm intro\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"splitTest": {
"locationId": "loc_9f7a123",
"campaignId": "campaign_speed_to_lead_123",
"primaryAgentId": "agent_8a488fcfa8fdbf8ce8ad5ccc45",
"status": "active",
"revision": 6,
"sync": {
"status": "healthy",
"failedAt": null
},
"variants": [
{
"agentId": "agent_8a488fcfa8fdbf8ce8ad5ccc45",
"name": "Speed to Lead",
"sequence": 1,
"weight": 50,
"status": "active",
"addedAt": "2026-08-14T09:12:44.318Z",
"removedAt": null,
"isPrimary": true
},
{
"agentId": "agent_7c4e1b28f0a94d6591cc2fd340",
"name": "Warm intro",
"sequence": 2,
"weight": 50,
"status": "active",
"addedAt": "2026-08-20T16:04:02.771Z",
"removedAt": null,
"isPrimary": false,
"customName": true
}
]
}
}{
"success": false,
"error": "VALIDATION",
"message": "Something here doesn't look right. Please check it and try again."
}{
"success": false,
"error": "Unauthorized",
"message": "Please sign in to continue."
}{
"success": false,
"error": "FORBIDDEN",
"message": "You don't have access to this. Ask your account admin if you need it."
}{
"success": false,
"error": "NOT_FOUND",
"message": "We couldn't find that. It may have been moved or deleted."
}{
"success": false,
"error": "CONFLICT",
"message": "This changed while you were working on it. Please refresh and try again."
}{
"success": false,
"error": "TooManyRequests",
"message": "That's a lot at once. Please wait a moment and try again."
}{
"success": false,
"error": "Internal",
"message": "Something went wrong on our side. Please try again in a moment.",
"ref": "3f2b8c1e-7d4a-4f8e-9b6a-2c1d0e5f7a9b"
}{
"success": false,
"error": "SYNC_FAILED",
"message": "We couldn't save the agent versions. Please try again in a moment.",
"ref": "3f2b8c1e-7d4a-4f8e-9b6a-2c1d0e5f7a9b"
}