curl --request DELETE \
--url https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key} \
--header 'Authorization: Bearer <token>' \
--header 'cloudchat-instance: <cloudchat-instance>'import requests
url = "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
headers = {
"cloudchat-instance": "<cloudchat-instance>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'cloudchat-instance': '<cloudchat-instance>', Authorization: 'Bearer <token>'}
};
fetch('https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}', 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.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"cloudchat-instance: <cloudchat-instance>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cloudchat-instance", "<cloudchat-instance>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}")
.header("cloudchat-instance", "<cloudchat-instance>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cloudchat-instance"] = '<cloudchat-instance>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"baselinePercentage": 80,
"variants": [
{
"key": "short_summary",
"percentage": 20,
"editable": true,
"overrides": {
"summaryPrompt": "Resuma em uma frase."
},
"hiddenOverrideCount": 0
}
]
}{
"error": "Forbidden: token holds no claim for the requested account"
}{
"error": "The base share does not match the variants' traffic",
"reason": "baseline_mismatch",
"keys": [
"<string>"
],
"expectedBaselinePercentage": 80,
"violations": [
{
"path": "splitLargeMessages.chunkSize",
"ruleId": "value_out_of_range",
"params": {
"min": 1,
"max": 4096
}
}
]
}{
"error": "Forbidden: token holds no claim for the requested account"
}{
"error": "The base share does not match the variants' traffic",
"reason": "baseline_mismatch",
"keys": [
"<string>"
],
"expectedBaselinePercentage": 80,
"violations": [
{
"path": "splitLargeMessages.chunkSize",
"ruleId": "value_out_of_range",
"params": {
"min": 1,
"max": 4096
}
}
]
}{
"error": "Forbidden: token holds no claim for the requested account"
}Delete an A/B variant
Removes a paused variant. A variant still receiving traffic is refused with 409: set it to 0 with setAbTraffic first. A paused variant that still holds open conversations is refused with 409 too, since those conversations would fall back to the base configuration while still counted as the variant: retry once they have closed.
curl --request DELETE \
--url https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key} \
--header 'Authorization: Bearer <token>' \
--header 'cloudchat-instance: <cloudchat-instance>'import requests
url = "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
headers = {
"cloudchat-instance": "<cloudchat-instance>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'cloudchat-instance': '<cloudchat-instance>', Authorization: 'Bearer <token>'}
};
fetch('https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}', 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.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"cloudchat-instance: <cloudchat-instance>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cloudchat-instance", "<cloudchat-instance>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}")
.header("cloudchat-instance", "<cloudchat-instance>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cloudchat-instance"] = '<cloudchat-instance>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"baselinePercentage": 80,
"variants": [
{
"key": "short_summary",
"percentage": 20,
"editable": true,
"overrides": {
"summaryPrompt": "Resuma em uma frase."
},
"hiddenOverrideCount": 0
}
]
}{
"error": "Forbidden: token holds no claim for the requested account"
}{
"error": "The base share does not match the variants' traffic",
"reason": "baseline_mismatch",
"keys": [
"<string>"
],
"expectedBaselinePercentage": 80,
"violations": [
{
"path": "splitLargeMessages.chunkSize",
"ruleId": "value_out_of_range",
"params": {
"min": 1,
"max": 4096
}
}
]
}{
"error": "Forbidden: token holds no claim for the requested account"
}{
"error": "The base share does not match the variants' traffic",
"reason": "baseline_mismatch",
"keys": [
"<string>"
],
"expectedBaselinePercentage": 80,
"violations": [
{
"path": "splitLargeMessages.chunkSize",
"ruleId": "value_out_of_range",
"params": {
"min": 1,
"max": 4096
}
}
]
}{
"error": "Forbidden: token holds no claim for the requested account"
}Authorizations
Headers
Path Parameters
Query Parameters
The CloudChat account whose permissions decide what you may read and write here, e.g. 7. It is permission context, not the resource: the project is named in the path. Only unique within an instance, so it is always read together with the cloudchat-instance header — get the pair from listMyCloudChatAccounts. An account your credentials hold no editing claim for answers 403.
Response
Deleted. The whole A/B test is returned as it now stands.
How this project's conversations are split between its base configuration and each A/B variant. Every new conversation draws once and keeps the variant it drew until it ends, always running that variant's current settings.