curl --request PATCH \
--url https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'cloudchat-instance: <cloudchat-instance>' \
--data '
{
"displayName": "<string>",
"knowledgeBases": [
"<string>"
],
"summaryPrompt": "<string>",
"confidenceThreshold": 123,
"lowConfidenceCountLimit": 123,
"maximumMinutesWithoutResponse": 123,
"resolutionJobActive": true,
"detectTransferMessage": true,
"outOfOfficeResolveN1": true,
"outOfOfficeMessage": "<string>",
"deferOutOfOfficeClose": true,
"generatedOutOfOfficeMessage": true,
"outOfOfficeAnswerPrompt": "<string>",
"forwardToHumanMessage": "<string>",
"humansAvailable": true,
"filterN1TagsOnly": true,
"filterN2TagsOnly": true,
"enableAudioTranscription": true,
"voiceReplyEnabled": true,
"voiceReplyEngine": "<string>",
"voiceReplyVoice": "<string>",
"voiceReplyTextAfterAudioPauseMillis": 123,
"repeatedSectionLimit": 123,
"protocolFooterEnabled": true,
"protocolFooterAverageResponseMinutes": 123,
"shouldNeverChangeIntentWhenOnEddieFlow": true,
"basePromptModules": {
"enabled": true,
"modules": {}
},
"outputTransformation": {
"enabled": true,
"fallbackResponseLanguage": "<string>",
"minCharsForLanguageDetection": 123,
"languages": []
},
"splitLargeMessages": {
"splitLargeMessagesActive": true,
"chunkSize": 123,
"timeBetweenMessages": 123
},
"enlightenmentQuestionLimit": {
"enabled": true,
"sentence": "<string>",
"limit": 123
},
"classificationSettings": {
"enabled": true,
"classificationPrompt": "<string>",
"clarificationAgentPrompt": "<string>",
"noValidContentAgentPrompt": "<string>",
"maxNoValidContentAttempts": 123,
"maxClarificationAttempts": 123
},
"greetingsSettings": {
"firstInteraction": "<string>",
"n2Greeting": "<string>",
"staticGreeting": "<string>",
"staticGreetingEnabled": true,
"default": "<string>"
},
"unansweredTicketEscalator": {
"jobActive": true,
"staticHandoverMessage": "<string>",
"tag": "<string>",
"escalatorTryCountLimit": 123,
"minutesWithoutResponse": 123
},
"attachmentHandover": {
"enabled": true,
"attachmentRegex": "<string>",
"message": "<string>"
},
"startWithBotConfiguration": {
"enabled": true,
"flowId": "<string>",
"addIntentToN2Tag": true
},
"endWithBotConfiguration": {
"onCloseEnabled": true,
"onCloseFlowId": "<string>",
"onN2Enabled": true,
"onN2FlowId": "<string>"
},
"defaultTagConfiguration": {
"active": true,
"n1DefaultTag": "<string>",
"n2DefaultTag": "<string>",
"useClarificationSections": true
},
"llmTagConfiguration": {
"active": true,
"prompt": "<string>"
},
"agenticLLMTagConfiguration": {
"active": true
},
"imageTranscriptionSettings": {
"enabled": true,
"prompt": "<string>"
},
"eddieConfiguration": {
"maxRepeatPerFlow": 123,
"maxRepeatTransfer": true
},
"backofficeConfiguration": {
"errorMessage": "<string>"
},
"frustrationDetection": {
"enabled": true,
"frustrationThreshold": 123,
"handoverMessage": "<string>"
},
"contextEnrichment": {
"contactData": {
"enabled": true
},
"previousConversations": {
"enabled": true,
"maxTickets": 123
},
"customContext": {
"activeWorkflowId": "<string>"
}
},
"resolutionMessages": {
"resolutionMessageWithUserFeedback": "<string>",
"resolutionMessageForNoUserFeedback": "<string>"
},
"humanOfficeHoursConfig": {
"regularRules": [
{
"weekdays": [],
"allDay": true,
"startTime": "<string>",
"endTime": "<string>"
}
],
"specialDates": [
{
"name": "<string>",
"date": "<string>",
"allDay": true,
"startTime": "<string>",
"endTime": "<string>"
}
]
},
"problemResolvedChecker": {
"maximumMinutesWithoutResponse": 123,
"problemResolvedQuestion": "<string>",
"jobActive": true,
"autoDetectProblemSolved": true,
"identifyProblemSolvedPrompt": "<string>",
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": true
},
"maxAttempts": 123,
"retryIntervalMinutes": 123,
"closeAfterMinutes": 123,
"attemptMessages": [
"<string>"
],
"followUpPrompt": "<string>"
},
"botPromotingConfig": {
"enabled": true,
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": true
}
},
"forwardToHumanChecker": {
"autoDetectForwardToHuman": true,
"directHandoverAfterTurns": 123,
"followUpMessage": "<string>",
"staticMessagesEnabled": true,
"identifyForwardToHumanPrompt": "<string>",
"followUpPrompt": "<string>",
"forwardDirectlyPrompt": "<string>",
"directHandoverAfterEngagement": true,
"evaluateOnEddieHandback": true
}
}
'import requests
url = "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
payload = {
"displayName": "<string>",
"knowledgeBases": ["<string>"],
"summaryPrompt": "<string>",
"confidenceThreshold": 123,
"lowConfidenceCountLimit": 123,
"maximumMinutesWithoutResponse": 123,
"resolutionJobActive": True,
"detectTransferMessage": True,
"outOfOfficeResolveN1": True,
"outOfOfficeMessage": "<string>",
"deferOutOfOfficeClose": True,
"generatedOutOfOfficeMessage": True,
"outOfOfficeAnswerPrompt": "<string>",
"forwardToHumanMessage": "<string>",
"humansAvailable": True,
"filterN1TagsOnly": True,
"filterN2TagsOnly": True,
"enableAudioTranscription": True,
"voiceReplyEnabled": True,
"voiceReplyEngine": "<string>",
"voiceReplyVoice": "<string>",
"voiceReplyTextAfterAudioPauseMillis": 123,
"repeatedSectionLimit": 123,
"protocolFooterEnabled": True,
"protocolFooterAverageResponseMinutes": 123,
"shouldNeverChangeIntentWhenOnEddieFlow": True,
"basePromptModules": {
"enabled": True,
"modules": {}
},
"outputTransformation": {
"enabled": True,
"fallbackResponseLanguage": "<string>",
"minCharsForLanguageDetection": 123,
"languages": []
},
"splitLargeMessages": {
"splitLargeMessagesActive": True,
"chunkSize": 123,
"timeBetweenMessages": 123
},
"enlightenmentQuestionLimit": {
"enabled": True,
"sentence": "<string>",
"limit": 123
},
"classificationSettings": {
"enabled": True,
"classificationPrompt": "<string>",
"clarificationAgentPrompt": "<string>",
"noValidContentAgentPrompt": "<string>",
"maxNoValidContentAttempts": 123,
"maxClarificationAttempts": 123
},
"greetingsSettings": {
"firstInteraction": "<string>",
"n2Greeting": "<string>",
"staticGreeting": "<string>",
"staticGreetingEnabled": True,
"default": "<string>"
},
"unansweredTicketEscalator": {
"jobActive": True,
"staticHandoverMessage": "<string>",
"tag": "<string>",
"escalatorTryCountLimit": 123,
"minutesWithoutResponse": 123
},
"attachmentHandover": {
"enabled": True,
"attachmentRegex": "<string>",
"message": "<string>"
},
"startWithBotConfiguration": {
"enabled": True,
"flowId": "<string>",
"addIntentToN2Tag": True
},
"endWithBotConfiguration": {
"onCloseEnabled": True,
"onCloseFlowId": "<string>",
"onN2Enabled": True,
"onN2FlowId": "<string>"
},
"defaultTagConfiguration": {
"active": True,
"n1DefaultTag": "<string>",
"n2DefaultTag": "<string>",
"useClarificationSections": True
},
"llmTagConfiguration": {
"active": True,
"prompt": "<string>"
},
"agenticLLMTagConfiguration": { "active": True },
"imageTranscriptionSettings": {
"enabled": True,
"prompt": "<string>"
},
"eddieConfiguration": {
"maxRepeatPerFlow": 123,
"maxRepeatTransfer": True
},
"backofficeConfiguration": { "errorMessage": "<string>" },
"frustrationDetection": {
"enabled": True,
"frustrationThreshold": 123,
"handoverMessage": "<string>"
},
"contextEnrichment": {
"contactData": { "enabled": True },
"previousConversations": {
"enabled": True,
"maxTickets": 123
},
"customContext": { "activeWorkflowId": "<string>" }
},
"resolutionMessages": {
"resolutionMessageWithUserFeedback": "<string>",
"resolutionMessageForNoUserFeedback": "<string>"
},
"humanOfficeHoursConfig": {
"regularRules": [
{
"weekdays": [],
"allDay": True,
"startTime": "<string>",
"endTime": "<string>"
}
],
"specialDates": [
{
"name": "<string>",
"date": "<string>",
"allDay": True,
"startTime": "<string>",
"endTime": "<string>"
}
]
},
"problemResolvedChecker": {
"maximumMinutesWithoutResponse": 123,
"problemResolvedQuestion": "<string>",
"jobActive": True,
"autoDetectProblemSolved": True,
"identifyProblemSolvedPrompt": "<string>",
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": True
},
"maxAttempts": 123,
"retryIntervalMinutes": 123,
"closeAfterMinutes": 123,
"attemptMessages": ["<string>"],
"followUpPrompt": "<string>"
},
"botPromotingConfig": {
"enabled": True,
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": True
}
},
"forwardToHumanChecker": {
"autoDetectForwardToHuman": True,
"directHandoverAfterTurns": 123,
"followUpMessage": "<string>",
"staticMessagesEnabled": True,
"identifyForwardToHumanPrompt": "<string>",
"followUpPrompt": "<string>",
"forwardDirectlyPrompt": "<string>",
"directHandoverAfterEngagement": True,
"evaluateOnEddieHandback": True
}
}
headers = {
"cloudchat-instance": "<cloudchat-instance>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'cloudchat-instance': '<cloudchat-instance>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
displayName: '<string>',
knowledgeBases: ['<string>'],
summaryPrompt: '<string>',
confidenceThreshold: 123,
lowConfidenceCountLimit: 123,
maximumMinutesWithoutResponse: 123,
resolutionJobActive: true,
detectTransferMessage: true,
outOfOfficeResolveN1: true,
outOfOfficeMessage: '<string>',
deferOutOfOfficeClose: true,
generatedOutOfOfficeMessage: true,
outOfOfficeAnswerPrompt: '<string>',
forwardToHumanMessage: '<string>',
humansAvailable: true,
filterN1TagsOnly: true,
filterN2TagsOnly: true,
enableAudioTranscription: true,
voiceReplyEnabled: true,
voiceReplyEngine: '<string>',
voiceReplyVoice: '<string>',
voiceReplyTextAfterAudioPauseMillis: 123,
repeatedSectionLimit: 123,
protocolFooterEnabled: true,
protocolFooterAverageResponseMinutes: 123,
shouldNeverChangeIntentWhenOnEddieFlow: true,
basePromptModules: {enabled: true, modules: {}},
outputTransformation: {
enabled: true,
fallbackResponseLanguage: '<string>',
minCharsForLanguageDetection: 123,
languages: []
},
splitLargeMessages: {splitLargeMessagesActive: true, chunkSize: 123, timeBetweenMessages: 123},
enlightenmentQuestionLimit: {enabled: true, sentence: '<string>', limit: 123},
classificationSettings: {
enabled: true,
classificationPrompt: '<string>',
clarificationAgentPrompt: '<string>',
noValidContentAgentPrompt: '<string>',
maxNoValidContentAttempts: 123,
maxClarificationAttempts: 123
},
greetingsSettings: {
firstInteraction: '<string>',
n2Greeting: '<string>',
staticGreeting: '<string>',
staticGreetingEnabled: true,
default: '<string>'
},
unansweredTicketEscalator: {
jobActive: true,
staticHandoverMessage: '<string>',
tag: '<string>',
escalatorTryCountLimit: 123,
minutesWithoutResponse: 123
},
attachmentHandover: {enabled: true, attachmentRegex: '<string>', message: '<string>'},
startWithBotConfiguration: {enabled: true, flowId: '<string>', addIntentToN2Tag: true},
endWithBotConfiguration: {
onCloseEnabled: true,
onCloseFlowId: '<string>',
onN2Enabled: true,
onN2FlowId: '<string>'
},
defaultTagConfiguration: {
active: true,
n1DefaultTag: '<string>',
n2DefaultTag: '<string>',
useClarificationSections: true
},
llmTagConfiguration: {active: true, prompt: '<string>'},
agenticLLMTagConfiguration: {active: true},
imageTranscriptionSettings: {enabled: true, prompt: '<string>'},
eddieConfiguration: {maxRepeatPerFlow: 123, maxRepeatTransfer: true},
backofficeConfiguration: {errorMessage: '<string>'},
frustrationDetection: {enabled: true, frustrationThreshold: 123, handoverMessage: '<string>'},
contextEnrichment: {
contactData: {enabled: true},
previousConversations: {enabled: true, maxTickets: 123},
customContext: {activeWorkflowId: '<string>'}
},
resolutionMessages: {
resolutionMessageWithUserFeedback: '<string>',
resolutionMessageForNoUserFeedback: '<string>'
},
humanOfficeHoursConfig: {
regularRules: [{weekdays: [], allDay: true, startTime: '<string>', endTime: '<string>'}],
specialDates: [
{
name: '<string>',
date: '<string>',
allDay: true,
startTime: '<string>',
endTime: '<string>'
}
]
},
problemResolvedChecker: {
maximumMinutesWithoutResponse: 123,
problemResolvedQuestion: '<string>',
jobActive: true,
autoDetectProblemSolved: true,
identifyProblemSolvedPrompt: '<string>',
flowPrompt: {
intentPrompt: '<string>',
replyPrompt: '<string>',
moreUserInteractionsRequired: true
},
maxAttempts: 123,
retryIntervalMinutes: 123,
closeAfterMinutes: 123,
attemptMessages: ['<string>'],
followUpPrompt: '<string>'
},
botPromotingConfig: {
enabled: true,
flowPrompt: {
intentPrompt: '<string>',
replyPrompt: '<string>',
moreUserInteractionsRequired: true
}
},
forwardToHumanChecker: {
autoDetectForwardToHuman: true,
directHandoverAfterTurns: 123,
followUpMessage: '<string>',
staticMessagesEnabled: true,
identifyForwardToHumanPrompt: '<string>',
followUpPrompt: '<string>',
forwardDirectlyPrompt: '<string>',
directHandoverAfterEngagement: true,
evaluateOnEddieHandback: true
}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'displayName' => '<string>',
'knowledgeBases' => [
'<string>'
],
'summaryPrompt' => '<string>',
'confidenceThreshold' => 123,
'lowConfidenceCountLimit' => 123,
'maximumMinutesWithoutResponse' => 123,
'resolutionJobActive' => true,
'detectTransferMessage' => true,
'outOfOfficeResolveN1' => true,
'outOfOfficeMessage' => '<string>',
'deferOutOfOfficeClose' => true,
'generatedOutOfOfficeMessage' => true,
'outOfOfficeAnswerPrompt' => '<string>',
'forwardToHumanMessage' => '<string>',
'humansAvailable' => true,
'filterN1TagsOnly' => true,
'filterN2TagsOnly' => true,
'enableAudioTranscription' => true,
'voiceReplyEnabled' => true,
'voiceReplyEngine' => '<string>',
'voiceReplyVoice' => '<string>',
'voiceReplyTextAfterAudioPauseMillis' => 123,
'repeatedSectionLimit' => 123,
'protocolFooterEnabled' => true,
'protocolFooterAverageResponseMinutes' => 123,
'shouldNeverChangeIntentWhenOnEddieFlow' => true,
'basePromptModules' => [
'enabled' => true,
'modules' => [
]
],
'outputTransformation' => [
'enabled' => true,
'fallbackResponseLanguage' => '<string>',
'minCharsForLanguageDetection' => 123,
'languages' => [
]
],
'splitLargeMessages' => [
'splitLargeMessagesActive' => true,
'chunkSize' => 123,
'timeBetweenMessages' => 123
],
'enlightenmentQuestionLimit' => [
'enabled' => true,
'sentence' => '<string>',
'limit' => 123
],
'classificationSettings' => [
'enabled' => true,
'classificationPrompt' => '<string>',
'clarificationAgentPrompt' => '<string>',
'noValidContentAgentPrompt' => '<string>',
'maxNoValidContentAttempts' => 123,
'maxClarificationAttempts' => 123
],
'greetingsSettings' => [
'firstInteraction' => '<string>',
'n2Greeting' => '<string>',
'staticGreeting' => '<string>',
'staticGreetingEnabled' => true,
'default' => '<string>'
],
'unansweredTicketEscalator' => [
'jobActive' => true,
'staticHandoverMessage' => '<string>',
'tag' => '<string>',
'escalatorTryCountLimit' => 123,
'minutesWithoutResponse' => 123
],
'attachmentHandover' => [
'enabled' => true,
'attachmentRegex' => '<string>',
'message' => '<string>'
],
'startWithBotConfiguration' => [
'enabled' => true,
'flowId' => '<string>',
'addIntentToN2Tag' => true
],
'endWithBotConfiguration' => [
'onCloseEnabled' => true,
'onCloseFlowId' => '<string>',
'onN2Enabled' => true,
'onN2FlowId' => '<string>'
],
'defaultTagConfiguration' => [
'active' => true,
'n1DefaultTag' => '<string>',
'n2DefaultTag' => '<string>',
'useClarificationSections' => true
],
'llmTagConfiguration' => [
'active' => true,
'prompt' => '<string>'
],
'agenticLLMTagConfiguration' => [
'active' => true
],
'imageTranscriptionSettings' => [
'enabled' => true,
'prompt' => '<string>'
],
'eddieConfiguration' => [
'maxRepeatPerFlow' => 123,
'maxRepeatTransfer' => true
],
'backofficeConfiguration' => [
'errorMessage' => '<string>'
],
'frustrationDetection' => [
'enabled' => true,
'frustrationThreshold' => 123,
'handoverMessage' => '<string>'
],
'contextEnrichment' => [
'contactData' => [
'enabled' => true
],
'previousConversations' => [
'enabled' => true,
'maxTickets' => 123
],
'customContext' => [
'activeWorkflowId' => '<string>'
]
],
'resolutionMessages' => [
'resolutionMessageWithUserFeedback' => '<string>',
'resolutionMessageForNoUserFeedback' => '<string>'
],
'humanOfficeHoursConfig' => [
'regularRules' => [
[
'weekdays' => [
],
'allDay' => true,
'startTime' => '<string>',
'endTime' => '<string>'
]
],
'specialDates' => [
[
'name' => '<string>',
'date' => '<string>',
'allDay' => true,
'startTime' => '<string>',
'endTime' => '<string>'
]
]
],
'problemResolvedChecker' => [
'maximumMinutesWithoutResponse' => 123,
'problemResolvedQuestion' => '<string>',
'jobActive' => true,
'autoDetectProblemSolved' => true,
'identifyProblemSolvedPrompt' => '<string>',
'flowPrompt' => [
'intentPrompt' => '<string>',
'replyPrompt' => '<string>',
'moreUserInteractionsRequired' => true
],
'maxAttempts' => 123,
'retryIntervalMinutes' => 123,
'closeAfterMinutes' => 123,
'attemptMessages' => [
'<string>'
],
'followUpPrompt' => '<string>'
],
'botPromotingConfig' => [
'enabled' => true,
'flowPrompt' => [
'intentPrompt' => '<string>',
'replyPrompt' => '<string>',
'moreUserInteractionsRequired' => true
]
],
'forwardToHumanChecker' => [
'autoDetectForwardToHuman' => true,
'directHandoverAfterTurns' => 123,
'followUpMessage' => '<string>',
'staticMessagesEnabled' => true,
'identifyForwardToHumanPrompt' => '<string>',
'followUpPrompt' => '<string>',
'forwardDirectlyPrompt' => '<string>',
'directHandoverAfterEngagement' => true,
'evaluateOnEddieHandback' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"knowledgeBases\": [\n \"<string>\"\n ],\n \"summaryPrompt\": \"<string>\",\n \"confidenceThreshold\": 123,\n \"lowConfidenceCountLimit\": 123,\n \"maximumMinutesWithoutResponse\": 123,\n \"resolutionJobActive\": true,\n \"detectTransferMessage\": true,\n \"outOfOfficeResolveN1\": true,\n \"outOfOfficeMessage\": \"<string>\",\n \"deferOutOfOfficeClose\": true,\n \"generatedOutOfOfficeMessage\": true,\n \"outOfOfficeAnswerPrompt\": \"<string>\",\n \"forwardToHumanMessage\": \"<string>\",\n \"humansAvailable\": true,\n \"filterN1TagsOnly\": true,\n \"filterN2TagsOnly\": true,\n \"enableAudioTranscription\": true,\n \"voiceReplyEnabled\": true,\n \"voiceReplyEngine\": \"<string>\",\n \"voiceReplyVoice\": \"<string>\",\n \"voiceReplyTextAfterAudioPauseMillis\": 123,\n \"repeatedSectionLimit\": 123,\n \"protocolFooterEnabled\": true,\n \"protocolFooterAverageResponseMinutes\": 123,\n \"shouldNeverChangeIntentWhenOnEddieFlow\": true,\n \"basePromptModules\": {\n \"enabled\": true,\n \"modules\": {}\n },\n \"outputTransformation\": {\n \"enabled\": true,\n \"fallbackResponseLanguage\": \"<string>\",\n \"minCharsForLanguageDetection\": 123,\n \"languages\": []\n },\n \"splitLargeMessages\": {\n \"splitLargeMessagesActive\": true,\n \"chunkSize\": 123,\n \"timeBetweenMessages\": 123\n },\n \"enlightenmentQuestionLimit\": {\n \"enabled\": true,\n \"sentence\": \"<string>\",\n \"limit\": 123\n },\n \"classificationSettings\": {\n \"enabled\": true,\n \"classificationPrompt\": \"<string>\",\n \"clarificationAgentPrompt\": \"<string>\",\n \"noValidContentAgentPrompt\": \"<string>\",\n \"maxNoValidContentAttempts\": 123,\n \"maxClarificationAttempts\": 123\n },\n \"greetingsSettings\": {\n \"firstInteraction\": \"<string>\",\n \"n2Greeting\": \"<string>\",\n \"staticGreeting\": \"<string>\",\n \"staticGreetingEnabled\": true,\n \"default\": \"<string>\"\n },\n \"unansweredTicketEscalator\": {\n \"jobActive\": true,\n \"staticHandoverMessage\": \"<string>\",\n \"tag\": \"<string>\",\n \"escalatorTryCountLimit\": 123,\n \"minutesWithoutResponse\": 123\n },\n \"attachmentHandover\": {\n \"enabled\": true,\n \"attachmentRegex\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"startWithBotConfiguration\": {\n \"enabled\": true,\n \"flowId\": \"<string>\",\n \"addIntentToN2Tag\": true\n },\n \"endWithBotConfiguration\": {\n \"onCloseEnabled\": true,\n \"onCloseFlowId\": \"<string>\",\n \"onN2Enabled\": true,\n \"onN2FlowId\": \"<string>\"\n },\n \"defaultTagConfiguration\": {\n \"active\": true,\n \"n1DefaultTag\": \"<string>\",\n \"n2DefaultTag\": \"<string>\",\n \"useClarificationSections\": true\n },\n \"llmTagConfiguration\": {\n \"active\": true,\n \"prompt\": \"<string>\"\n },\n \"agenticLLMTagConfiguration\": {\n \"active\": true\n },\n \"imageTranscriptionSettings\": {\n \"enabled\": true,\n \"prompt\": \"<string>\"\n },\n \"eddieConfiguration\": {\n \"maxRepeatPerFlow\": 123,\n \"maxRepeatTransfer\": true\n },\n \"backofficeConfiguration\": {\n \"errorMessage\": \"<string>\"\n },\n \"frustrationDetection\": {\n \"enabled\": true,\n \"frustrationThreshold\": 123,\n \"handoverMessage\": \"<string>\"\n },\n \"contextEnrichment\": {\n \"contactData\": {\n \"enabled\": true\n },\n \"previousConversations\": {\n \"enabled\": true,\n \"maxTickets\": 123\n },\n \"customContext\": {\n \"activeWorkflowId\": \"<string>\"\n }\n },\n \"resolutionMessages\": {\n \"resolutionMessageWithUserFeedback\": \"<string>\",\n \"resolutionMessageForNoUserFeedback\": \"<string>\"\n },\n \"humanOfficeHoursConfig\": {\n \"regularRules\": [\n {\n \"weekdays\": [],\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"specialDates\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n },\n \"problemResolvedChecker\": {\n \"maximumMinutesWithoutResponse\": 123,\n \"problemResolvedQuestion\": \"<string>\",\n \"jobActive\": true,\n \"autoDetectProblemSolved\": true,\n \"identifyProblemSolvedPrompt\": \"<string>\",\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n },\n \"maxAttempts\": 123,\n \"retryIntervalMinutes\": 123,\n \"closeAfterMinutes\": 123,\n \"attemptMessages\": [\n \"<string>\"\n ],\n \"followUpPrompt\": \"<string>\"\n },\n \"botPromotingConfig\": {\n \"enabled\": true,\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n }\n },\n \"forwardToHumanChecker\": {\n \"autoDetectForwardToHuman\": true,\n \"directHandoverAfterTurns\": 123,\n \"followUpMessage\": \"<string>\",\n \"staticMessagesEnabled\": true,\n \"identifyForwardToHumanPrompt\": \"<string>\",\n \"followUpPrompt\": \"<string>\",\n \"forwardDirectlyPrompt\": \"<string>\",\n \"directHandoverAfterEngagement\": true,\n \"evaluateOnEddieHandback\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cloudchat-instance", "<cloudchat-instance>")
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.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}")
.header("cloudchat-instance", "<cloudchat-instance>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"knowledgeBases\": [\n \"<string>\"\n ],\n \"summaryPrompt\": \"<string>\",\n \"confidenceThreshold\": 123,\n \"lowConfidenceCountLimit\": 123,\n \"maximumMinutesWithoutResponse\": 123,\n \"resolutionJobActive\": true,\n \"detectTransferMessage\": true,\n \"outOfOfficeResolveN1\": true,\n \"outOfOfficeMessage\": \"<string>\",\n \"deferOutOfOfficeClose\": true,\n \"generatedOutOfOfficeMessage\": true,\n \"outOfOfficeAnswerPrompt\": \"<string>\",\n \"forwardToHumanMessage\": \"<string>\",\n \"humansAvailable\": true,\n \"filterN1TagsOnly\": true,\n \"filterN2TagsOnly\": true,\n \"enableAudioTranscription\": true,\n \"voiceReplyEnabled\": true,\n \"voiceReplyEngine\": \"<string>\",\n \"voiceReplyVoice\": \"<string>\",\n \"voiceReplyTextAfterAudioPauseMillis\": 123,\n \"repeatedSectionLimit\": 123,\n \"protocolFooterEnabled\": true,\n \"protocolFooterAverageResponseMinutes\": 123,\n \"shouldNeverChangeIntentWhenOnEddieFlow\": true,\n \"basePromptModules\": {\n \"enabled\": true,\n \"modules\": {}\n },\n \"outputTransformation\": {\n \"enabled\": true,\n \"fallbackResponseLanguage\": \"<string>\",\n \"minCharsForLanguageDetection\": 123,\n \"languages\": []\n },\n \"splitLargeMessages\": {\n \"splitLargeMessagesActive\": true,\n \"chunkSize\": 123,\n \"timeBetweenMessages\": 123\n },\n \"enlightenmentQuestionLimit\": {\n \"enabled\": true,\n \"sentence\": \"<string>\",\n \"limit\": 123\n },\n \"classificationSettings\": {\n \"enabled\": true,\n \"classificationPrompt\": \"<string>\",\n \"clarificationAgentPrompt\": \"<string>\",\n \"noValidContentAgentPrompt\": \"<string>\",\n \"maxNoValidContentAttempts\": 123,\n \"maxClarificationAttempts\": 123\n },\n \"greetingsSettings\": {\n \"firstInteraction\": \"<string>\",\n \"n2Greeting\": \"<string>\",\n \"staticGreeting\": \"<string>\",\n \"staticGreetingEnabled\": true,\n \"default\": \"<string>\"\n },\n \"unansweredTicketEscalator\": {\n \"jobActive\": true,\n \"staticHandoverMessage\": \"<string>\",\n \"tag\": \"<string>\",\n \"escalatorTryCountLimit\": 123,\n \"minutesWithoutResponse\": 123\n },\n \"attachmentHandover\": {\n \"enabled\": true,\n \"attachmentRegex\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"startWithBotConfiguration\": {\n \"enabled\": true,\n \"flowId\": \"<string>\",\n \"addIntentToN2Tag\": true\n },\n \"endWithBotConfiguration\": {\n \"onCloseEnabled\": true,\n \"onCloseFlowId\": \"<string>\",\n \"onN2Enabled\": true,\n \"onN2FlowId\": \"<string>\"\n },\n \"defaultTagConfiguration\": {\n \"active\": true,\n \"n1DefaultTag\": \"<string>\",\n \"n2DefaultTag\": \"<string>\",\n \"useClarificationSections\": true\n },\n \"llmTagConfiguration\": {\n \"active\": true,\n \"prompt\": \"<string>\"\n },\n \"agenticLLMTagConfiguration\": {\n \"active\": true\n },\n \"imageTranscriptionSettings\": {\n \"enabled\": true,\n \"prompt\": \"<string>\"\n },\n \"eddieConfiguration\": {\n \"maxRepeatPerFlow\": 123,\n \"maxRepeatTransfer\": true\n },\n \"backofficeConfiguration\": {\n \"errorMessage\": \"<string>\"\n },\n \"frustrationDetection\": {\n \"enabled\": true,\n \"frustrationThreshold\": 123,\n \"handoverMessage\": \"<string>\"\n },\n \"contextEnrichment\": {\n \"contactData\": {\n \"enabled\": true\n },\n \"previousConversations\": {\n \"enabled\": true,\n \"maxTickets\": 123\n },\n \"customContext\": {\n \"activeWorkflowId\": \"<string>\"\n }\n },\n \"resolutionMessages\": {\n \"resolutionMessageWithUserFeedback\": \"<string>\",\n \"resolutionMessageForNoUserFeedback\": \"<string>\"\n },\n \"humanOfficeHoursConfig\": {\n \"regularRules\": [\n {\n \"weekdays\": [],\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"specialDates\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n },\n \"problemResolvedChecker\": {\n \"maximumMinutesWithoutResponse\": 123,\n \"problemResolvedQuestion\": \"<string>\",\n \"jobActive\": true,\n \"autoDetectProblemSolved\": true,\n \"identifyProblemSolvedPrompt\": \"<string>\",\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n },\n \"maxAttempts\": 123,\n \"retryIntervalMinutes\": 123,\n \"closeAfterMinutes\": 123,\n \"attemptMessages\": [\n \"<string>\"\n ],\n \"followUpPrompt\": \"<string>\"\n },\n \"botPromotingConfig\": {\n \"enabled\": true,\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n }\n },\n \"forwardToHumanChecker\": {\n \"autoDetectForwardToHuman\": true,\n \"directHandoverAfterTurns\": 123,\n \"followUpMessage\": \"<string>\",\n \"staticMessagesEnabled\": true,\n \"identifyForwardToHumanPrompt\": \"<string>\",\n \"followUpPrompt\": \"<string>\",\n \"forwardDirectlyPrompt\": \"<string>\",\n \"directHandoverAfterEngagement\": true,\n \"evaluateOnEddieHandback\": true\n }\n}")
.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::Patch.new(url)
request["cloudchat-instance"] = '<cloudchat-instance>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\",\n \"knowledgeBases\": [\n \"<string>\"\n ],\n \"summaryPrompt\": \"<string>\",\n \"confidenceThreshold\": 123,\n \"lowConfidenceCountLimit\": 123,\n \"maximumMinutesWithoutResponse\": 123,\n \"resolutionJobActive\": true,\n \"detectTransferMessage\": true,\n \"outOfOfficeResolveN1\": true,\n \"outOfOfficeMessage\": \"<string>\",\n \"deferOutOfOfficeClose\": true,\n \"generatedOutOfOfficeMessage\": true,\n \"outOfOfficeAnswerPrompt\": \"<string>\",\n \"forwardToHumanMessage\": \"<string>\",\n \"humansAvailable\": true,\n \"filterN1TagsOnly\": true,\n \"filterN2TagsOnly\": true,\n \"enableAudioTranscription\": true,\n \"voiceReplyEnabled\": true,\n \"voiceReplyEngine\": \"<string>\",\n \"voiceReplyVoice\": \"<string>\",\n \"voiceReplyTextAfterAudioPauseMillis\": 123,\n \"repeatedSectionLimit\": 123,\n \"protocolFooterEnabled\": true,\n \"protocolFooterAverageResponseMinutes\": 123,\n \"shouldNeverChangeIntentWhenOnEddieFlow\": true,\n \"basePromptModules\": {\n \"enabled\": true,\n \"modules\": {}\n },\n \"outputTransformation\": {\n \"enabled\": true,\n \"fallbackResponseLanguage\": \"<string>\",\n \"minCharsForLanguageDetection\": 123,\n \"languages\": []\n },\n \"splitLargeMessages\": {\n \"splitLargeMessagesActive\": true,\n \"chunkSize\": 123,\n \"timeBetweenMessages\": 123\n },\n \"enlightenmentQuestionLimit\": {\n \"enabled\": true,\n \"sentence\": \"<string>\",\n \"limit\": 123\n },\n \"classificationSettings\": {\n \"enabled\": true,\n \"classificationPrompt\": \"<string>\",\n \"clarificationAgentPrompt\": \"<string>\",\n \"noValidContentAgentPrompt\": \"<string>\",\n \"maxNoValidContentAttempts\": 123,\n \"maxClarificationAttempts\": 123\n },\n \"greetingsSettings\": {\n \"firstInteraction\": \"<string>\",\n \"n2Greeting\": \"<string>\",\n \"staticGreeting\": \"<string>\",\n \"staticGreetingEnabled\": true,\n \"default\": \"<string>\"\n },\n \"unansweredTicketEscalator\": {\n \"jobActive\": true,\n \"staticHandoverMessage\": \"<string>\",\n \"tag\": \"<string>\",\n \"escalatorTryCountLimit\": 123,\n \"minutesWithoutResponse\": 123\n },\n \"attachmentHandover\": {\n \"enabled\": true,\n \"attachmentRegex\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"startWithBotConfiguration\": {\n \"enabled\": true,\n \"flowId\": \"<string>\",\n \"addIntentToN2Tag\": true\n },\n \"endWithBotConfiguration\": {\n \"onCloseEnabled\": true,\n \"onCloseFlowId\": \"<string>\",\n \"onN2Enabled\": true,\n \"onN2FlowId\": \"<string>\"\n },\n \"defaultTagConfiguration\": {\n \"active\": true,\n \"n1DefaultTag\": \"<string>\",\n \"n2DefaultTag\": \"<string>\",\n \"useClarificationSections\": true\n },\n \"llmTagConfiguration\": {\n \"active\": true,\n \"prompt\": \"<string>\"\n },\n \"agenticLLMTagConfiguration\": {\n \"active\": true\n },\n \"imageTranscriptionSettings\": {\n \"enabled\": true,\n \"prompt\": \"<string>\"\n },\n \"eddieConfiguration\": {\n \"maxRepeatPerFlow\": 123,\n \"maxRepeatTransfer\": true\n },\n \"backofficeConfiguration\": {\n \"errorMessage\": \"<string>\"\n },\n \"frustrationDetection\": {\n \"enabled\": true,\n \"frustrationThreshold\": 123,\n \"handoverMessage\": \"<string>\"\n },\n \"contextEnrichment\": {\n \"contactData\": {\n \"enabled\": true\n },\n \"previousConversations\": {\n \"enabled\": true,\n \"maxTickets\": 123\n },\n \"customContext\": {\n \"activeWorkflowId\": \"<string>\"\n }\n },\n \"resolutionMessages\": {\n \"resolutionMessageWithUserFeedback\": \"<string>\",\n \"resolutionMessageForNoUserFeedback\": \"<string>\"\n },\n \"humanOfficeHoursConfig\": {\n \"regularRules\": [\n {\n \"weekdays\": [],\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"specialDates\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n },\n \"problemResolvedChecker\": {\n \"maximumMinutesWithoutResponse\": 123,\n \"problemResolvedQuestion\": \"<string>\",\n \"jobActive\": true,\n \"autoDetectProblemSolved\": true,\n \"identifyProblemSolvedPrompt\": \"<string>\",\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n },\n \"maxAttempts\": 123,\n \"retryIntervalMinutes\": 123,\n \"closeAfterMinutes\": 123,\n \"attemptMessages\": [\n \"<string>\"\n ],\n \"followUpPrompt\": \"<string>\"\n },\n \"botPromotingConfig\": {\n \"enabled\": true,\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n }\n },\n \"forwardToHumanChecker\": {\n \"autoDetectForwardToHuman\": true,\n \"directHandoverAfterTurns\": 123,\n \"followUpMessage\": \"<string>\",\n \"staticMessagesEnabled\": true,\n \"identifyForwardToHumanPrompt\": \"<string>\",\n \"followUpPrompt\": \"<string>\",\n \"forwardDirectlyPrompt\": \"<string>\",\n \"directHandoverAfterEngagement\": true,\n \"evaluateOnEddieHandback\": true\n }\n}"
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": "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": "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
}
}
]
}Create or change an A/B variant
Sets the settings a variant replaces, creating the variant if the key is new. A new variant receives no traffic until setAbTraffic gives it some, so creating one never reaches a customer. The body is a merge patch shaped like updateProjectSettings: send only the settings to change, nested as getProjectSettings returns them, and null to stop overriding one. Only settings these credentials may write are accepted, and the result is validated and checked to run exactly as written before it is saved. Settings the background jobs read from the project itself (follow-up, resolution and unanswered escalation timing) are refused, since a variant would not change them. Try a variant on a single conversation first with runPlayground and its abKey. A change to a variant already receiving traffic takes effect at once, from the next message of every conversation running it, ongoing ones included.
curl --request PATCH \
--url https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'cloudchat-instance: <cloudchat-instance>' \
--data '
{
"displayName": "<string>",
"knowledgeBases": [
"<string>"
],
"summaryPrompt": "<string>",
"confidenceThreshold": 123,
"lowConfidenceCountLimit": 123,
"maximumMinutesWithoutResponse": 123,
"resolutionJobActive": true,
"detectTransferMessage": true,
"outOfOfficeResolveN1": true,
"outOfOfficeMessage": "<string>",
"deferOutOfOfficeClose": true,
"generatedOutOfOfficeMessage": true,
"outOfOfficeAnswerPrompt": "<string>",
"forwardToHumanMessage": "<string>",
"humansAvailable": true,
"filterN1TagsOnly": true,
"filterN2TagsOnly": true,
"enableAudioTranscription": true,
"voiceReplyEnabled": true,
"voiceReplyEngine": "<string>",
"voiceReplyVoice": "<string>",
"voiceReplyTextAfterAudioPauseMillis": 123,
"repeatedSectionLimit": 123,
"protocolFooterEnabled": true,
"protocolFooterAverageResponseMinutes": 123,
"shouldNeverChangeIntentWhenOnEddieFlow": true,
"basePromptModules": {
"enabled": true,
"modules": {}
},
"outputTransformation": {
"enabled": true,
"fallbackResponseLanguage": "<string>",
"minCharsForLanguageDetection": 123,
"languages": []
},
"splitLargeMessages": {
"splitLargeMessagesActive": true,
"chunkSize": 123,
"timeBetweenMessages": 123
},
"enlightenmentQuestionLimit": {
"enabled": true,
"sentence": "<string>",
"limit": 123
},
"classificationSettings": {
"enabled": true,
"classificationPrompt": "<string>",
"clarificationAgentPrompt": "<string>",
"noValidContentAgentPrompt": "<string>",
"maxNoValidContentAttempts": 123,
"maxClarificationAttempts": 123
},
"greetingsSettings": {
"firstInteraction": "<string>",
"n2Greeting": "<string>",
"staticGreeting": "<string>",
"staticGreetingEnabled": true,
"default": "<string>"
},
"unansweredTicketEscalator": {
"jobActive": true,
"staticHandoverMessage": "<string>",
"tag": "<string>",
"escalatorTryCountLimit": 123,
"minutesWithoutResponse": 123
},
"attachmentHandover": {
"enabled": true,
"attachmentRegex": "<string>",
"message": "<string>"
},
"startWithBotConfiguration": {
"enabled": true,
"flowId": "<string>",
"addIntentToN2Tag": true
},
"endWithBotConfiguration": {
"onCloseEnabled": true,
"onCloseFlowId": "<string>",
"onN2Enabled": true,
"onN2FlowId": "<string>"
},
"defaultTagConfiguration": {
"active": true,
"n1DefaultTag": "<string>",
"n2DefaultTag": "<string>",
"useClarificationSections": true
},
"llmTagConfiguration": {
"active": true,
"prompt": "<string>"
},
"agenticLLMTagConfiguration": {
"active": true
},
"imageTranscriptionSettings": {
"enabled": true,
"prompt": "<string>"
},
"eddieConfiguration": {
"maxRepeatPerFlow": 123,
"maxRepeatTransfer": true
},
"backofficeConfiguration": {
"errorMessage": "<string>"
},
"frustrationDetection": {
"enabled": true,
"frustrationThreshold": 123,
"handoverMessage": "<string>"
},
"contextEnrichment": {
"contactData": {
"enabled": true
},
"previousConversations": {
"enabled": true,
"maxTickets": 123
},
"customContext": {
"activeWorkflowId": "<string>"
}
},
"resolutionMessages": {
"resolutionMessageWithUserFeedback": "<string>",
"resolutionMessageForNoUserFeedback": "<string>"
},
"humanOfficeHoursConfig": {
"regularRules": [
{
"weekdays": [],
"allDay": true,
"startTime": "<string>",
"endTime": "<string>"
}
],
"specialDates": [
{
"name": "<string>",
"date": "<string>",
"allDay": true,
"startTime": "<string>",
"endTime": "<string>"
}
]
},
"problemResolvedChecker": {
"maximumMinutesWithoutResponse": 123,
"problemResolvedQuestion": "<string>",
"jobActive": true,
"autoDetectProblemSolved": true,
"identifyProblemSolvedPrompt": "<string>",
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": true
},
"maxAttempts": 123,
"retryIntervalMinutes": 123,
"closeAfterMinutes": 123,
"attemptMessages": [
"<string>"
],
"followUpPrompt": "<string>"
},
"botPromotingConfig": {
"enabled": true,
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": true
}
},
"forwardToHumanChecker": {
"autoDetectForwardToHuman": true,
"directHandoverAfterTurns": 123,
"followUpMessage": "<string>",
"staticMessagesEnabled": true,
"identifyForwardToHumanPrompt": "<string>",
"followUpPrompt": "<string>",
"forwardDirectlyPrompt": "<string>",
"directHandoverAfterEngagement": true,
"evaluateOnEddieHandback": true
}
}
'import requests
url = "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
payload = {
"displayName": "<string>",
"knowledgeBases": ["<string>"],
"summaryPrompt": "<string>",
"confidenceThreshold": 123,
"lowConfidenceCountLimit": 123,
"maximumMinutesWithoutResponse": 123,
"resolutionJobActive": True,
"detectTransferMessage": True,
"outOfOfficeResolveN1": True,
"outOfOfficeMessage": "<string>",
"deferOutOfOfficeClose": True,
"generatedOutOfOfficeMessage": True,
"outOfOfficeAnswerPrompt": "<string>",
"forwardToHumanMessage": "<string>",
"humansAvailable": True,
"filterN1TagsOnly": True,
"filterN2TagsOnly": True,
"enableAudioTranscription": True,
"voiceReplyEnabled": True,
"voiceReplyEngine": "<string>",
"voiceReplyVoice": "<string>",
"voiceReplyTextAfterAudioPauseMillis": 123,
"repeatedSectionLimit": 123,
"protocolFooterEnabled": True,
"protocolFooterAverageResponseMinutes": 123,
"shouldNeverChangeIntentWhenOnEddieFlow": True,
"basePromptModules": {
"enabled": True,
"modules": {}
},
"outputTransformation": {
"enabled": True,
"fallbackResponseLanguage": "<string>",
"minCharsForLanguageDetection": 123,
"languages": []
},
"splitLargeMessages": {
"splitLargeMessagesActive": True,
"chunkSize": 123,
"timeBetweenMessages": 123
},
"enlightenmentQuestionLimit": {
"enabled": True,
"sentence": "<string>",
"limit": 123
},
"classificationSettings": {
"enabled": True,
"classificationPrompt": "<string>",
"clarificationAgentPrompt": "<string>",
"noValidContentAgentPrompt": "<string>",
"maxNoValidContentAttempts": 123,
"maxClarificationAttempts": 123
},
"greetingsSettings": {
"firstInteraction": "<string>",
"n2Greeting": "<string>",
"staticGreeting": "<string>",
"staticGreetingEnabled": True,
"default": "<string>"
},
"unansweredTicketEscalator": {
"jobActive": True,
"staticHandoverMessage": "<string>",
"tag": "<string>",
"escalatorTryCountLimit": 123,
"minutesWithoutResponse": 123
},
"attachmentHandover": {
"enabled": True,
"attachmentRegex": "<string>",
"message": "<string>"
},
"startWithBotConfiguration": {
"enabled": True,
"flowId": "<string>",
"addIntentToN2Tag": True
},
"endWithBotConfiguration": {
"onCloseEnabled": True,
"onCloseFlowId": "<string>",
"onN2Enabled": True,
"onN2FlowId": "<string>"
},
"defaultTagConfiguration": {
"active": True,
"n1DefaultTag": "<string>",
"n2DefaultTag": "<string>",
"useClarificationSections": True
},
"llmTagConfiguration": {
"active": True,
"prompt": "<string>"
},
"agenticLLMTagConfiguration": { "active": True },
"imageTranscriptionSettings": {
"enabled": True,
"prompt": "<string>"
},
"eddieConfiguration": {
"maxRepeatPerFlow": 123,
"maxRepeatTransfer": True
},
"backofficeConfiguration": { "errorMessage": "<string>" },
"frustrationDetection": {
"enabled": True,
"frustrationThreshold": 123,
"handoverMessage": "<string>"
},
"contextEnrichment": {
"contactData": { "enabled": True },
"previousConversations": {
"enabled": True,
"maxTickets": 123
},
"customContext": { "activeWorkflowId": "<string>" }
},
"resolutionMessages": {
"resolutionMessageWithUserFeedback": "<string>",
"resolutionMessageForNoUserFeedback": "<string>"
},
"humanOfficeHoursConfig": {
"regularRules": [
{
"weekdays": [],
"allDay": True,
"startTime": "<string>",
"endTime": "<string>"
}
],
"specialDates": [
{
"name": "<string>",
"date": "<string>",
"allDay": True,
"startTime": "<string>",
"endTime": "<string>"
}
]
},
"problemResolvedChecker": {
"maximumMinutesWithoutResponse": 123,
"problemResolvedQuestion": "<string>",
"jobActive": True,
"autoDetectProblemSolved": True,
"identifyProblemSolvedPrompt": "<string>",
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": True
},
"maxAttempts": 123,
"retryIntervalMinutes": 123,
"closeAfterMinutes": 123,
"attemptMessages": ["<string>"],
"followUpPrompt": "<string>"
},
"botPromotingConfig": {
"enabled": True,
"flowPrompt": {
"intentPrompt": "<string>",
"replyPrompt": "<string>",
"moreUserInteractionsRequired": True
}
},
"forwardToHumanChecker": {
"autoDetectForwardToHuman": True,
"directHandoverAfterTurns": 123,
"followUpMessage": "<string>",
"staticMessagesEnabled": True,
"identifyForwardToHumanPrompt": "<string>",
"followUpPrompt": "<string>",
"forwardDirectlyPrompt": "<string>",
"directHandoverAfterEngagement": True,
"evaluateOnEddieHandback": True
}
}
headers = {
"cloudchat-instance": "<cloudchat-instance>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'cloudchat-instance': '<cloudchat-instance>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
displayName: '<string>',
knowledgeBases: ['<string>'],
summaryPrompt: '<string>',
confidenceThreshold: 123,
lowConfidenceCountLimit: 123,
maximumMinutesWithoutResponse: 123,
resolutionJobActive: true,
detectTransferMessage: true,
outOfOfficeResolveN1: true,
outOfOfficeMessage: '<string>',
deferOutOfOfficeClose: true,
generatedOutOfOfficeMessage: true,
outOfOfficeAnswerPrompt: '<string>',
forwardToHumanMessage: '<string>',
humansAvailable: true,
filterN1TagsOnly: true,
filterN2TagsOnly: true,
enableAudioTranscription: true,
voiceReplyEnabled: true,
voiceReplyEngine: '<string>',
voiceReplyVoice: '<string>',
voiceReplyTextAfterAudioPauseMillis: 123,
repeatedSectionLimit: 123,
protocolFooterEnabled: true,
protocolFooterAverageResponseMinutes: 123,
shouldNeverChangeIntentWhenOnEddieFlow: true,
basePromptModules: {enabled: true, modules: {}},
outputTransformation: {
enabled: true,
fallbackResponseLanguage: '<string>',
minCharsForLanguageDetection: 123,
languages: []
},
splitLargeMessages: {splitLargeMessagesActive: true, chunkSize: 123, timeBetweenMessages: 123},
enlightenmentQuestionLimit: {enabled: true, sentence: '<string>', limit: 123},
classificationSettings: {
enabled: true,
classificationPrompt: '<string>',
clarificationAgentPrompt: '<string>',
noValidContentAgentPrompt: '<string>',
maxNoValidContentAttempts: 123,
maxClarificationAttempts: 123
},
greetingsSettings: {
firstInteraction: '<string>',
n2Greeting: '<string>',
staticGreeting: '<string>',
staticGreetingEnabled: true,
default: '<string>'
},
unansweredTicketEscalator: {
jobActive: true,
staticHandoverMessage: '<string>',
tag: '<string>',
escalatorTryCountLimit: 123,
minutesWithoutResponse: 123
},
attachmentHandover: {enabled: true, attachmentRegex: '<string>', message: '<string>'},
startWithBotConfiguration: {enabled: true, flowId: '<string>', addIntentToN2Tag: true},
endWithBotConfiguration: {
onCloseEnabled: true,
onCloseFlowId: '<string>',
onN2Enabled: true,
onN2FlowId: '<string>'
},
defaultTagConfiguration: {
active: true,
n1DefaultTag: '<string>',
n2DefaultTag: '<string>',
useClarificationSections: true
},
llmTagConfiguration: {active: true, prompt: '<string>'},
agenticLLMTagConfiguration: {active: true},
imageTranscriptionSettings: {enabled: true, prompt: '<string>'},
eddieConfiguration: {maxRepeatPerFlow: 123, maxRepeatTransfer: true},
backofficeConfiguration: {errorMessage: '<string>'},
frustrationDetection: {enabled: true, frustrationThreshold: 123, handoverMessage: '<string>'},
contextEnrichment: {
contactData: {enabled: true},
previousConversations: {enabled: true, maxTickets: 123},
customContext: {activeWorkflowId: '<string>'}
},
resolutionMessages: {
resolutionMessageWithUserFeedback: '<string>',
resolutionMessageForNoUserFeedback: '<string>'
},
humanOfficeHoursConfig: {
regularRules: [{weekdays: [], allDay: true, startTime: '<string>', endTime: '<string>'}],
specialDates: [
{
name: '<string>',
date: '<string>',
allDay: true,
startTime: '<string>',
endTime: '<string>'
}
]
},
problemResolvedChecker: {
maximumMinutesWithoutResponse: 123,
problemResolvedQuestion: '<string>',
jobActive: true,
autoDetectProblemSolved: true,
identifyProblemSolvedPrompt: '<string>',
flowPrompt: {
intentPrompt: '<string>',
replyPrompt: '<string>',
moreUserInteractionsRequired: true
},
maxAttempts: 123,
retryIntervalMinutes: 123,
closeAfterMinutes: 123,
attemptMessages: ['<string>'],
followUpPrompt: '<string>'
},
botPromotingConfig: {
enabled: true,
flowPrompt: {
intentPrompt: '<string>',
replyPrompt: '<string>',
moreUserInteractionsRequired: true
}
},
forwardToHumanChecker: {
autoDetectForwardToHuman: true,
directHandoverAfterTurns: 123,
followUpMessage: '<string>',
staticMessagesEnabled: true,
identifyForwardToHumanPrompt: '<string>',
followUpPrompt: '<string>',
forwardDirectlyPrompt: '<string>',
directHandoverAfterEngagement: true,
evaluateOnEddieHandback: true
}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'displayName' => '<string>',
'knowledgeBases' => [
'<string>'
],
'summaryPrompt' => '<string>',
'confidenceThreshold' => 123,
'lowConfidenceCountLimit' => 123,
'maximumMinutesWithoutResponse' => 123,
'resolutionJobActive' => true,
'detectTransferMessage' => true,
'outOfOfficeResolveN1' => true,
'outOfOfficeMessage' => '<string>',
'deferOutOfOfficeClose' => true,
'generatedOutOfOfficeMessage' => true,
'outOfOfficeAnswerPrompt' => '<string>',
'forwardToHumanMessage' => '<string>',
'humansAvailable' => true,
'filterN1TagsOnly' => true,
'filterN2TagsOnly' => true,
'enableAudioTranscription' => true,
'voiceReplyEnabled' => true,
'voiceReplyEngine' => '<string>',
'voiceReplyVoice' => '<string>',
'voiceReplyTextAfterAudioPauseMillis' => 123,
'repeatedSectionLimit' => 123,
'protocolFooterEnabled' => true,
'protocolFooterAverageResponseMinutes' => 123,
'shouldNeverChangeIntentWhenOnEddieFlow' => true,
'basePromptModules' => [
'enabled' => true,
'modules' => [
]
],
'outputTransformation' => [
'enabled' => true,
'fallbackResponseLanguage' => '<string>',
'minCharsForLanguageDetection' => 123,
'languages' => [
]
],
'splitLargeMessages' => [
'splitLargeMessagesActive' => true,
'chunkSize' => 123,
'timeBetweenMessages' => 123
],
'enlightenmentQuestionLimit' => [
'enabled' => true,
'sentence' => '<string>',
'limit' => 123
],
'classificationSettings' => [
'enabled' => true,
'classificationPrompt' => '<string>',
'clarificationAgentPrompt' => '<string>',
'noValidContentAgentPrompt' => '<string>',
'maxNoValidContentAttempts' => 123,
'maxClarificationAttempts' => 123
],
'greetingsSettings' => [
'firstInteraction' => '<string>',
'n2Greeting' => '<string>',
'staticGreeting' => '<string>',
'staticGreetingEnabled' => true,
'default' => '<string>'
],
'unansweredTicketEscalator' => [
'jobActive' => true,
'staticHandoverMessage' => '<string>',
'tag' => '<string>',
'escalatorTryCountLimit' => 123,
'minutesWithoutResponse' => 123
],
'attachmentHandover' => [
'enabled' => true,
'attachmentRegex' => '<string>',
'message' => '<string>'
],
'startWithBotConfiguration' => [
'enabled' => true,
'flowId' => '<string>',
'addIntentToN2Tag' => true
],
'endWithBotConfiguration' => [
'onCloseEnabled' => true,
'onCloseFlowId' => '<string>',
'onN2Enabled' => true,
'onN2FlowId' => '<string>'
],
'defaultTagConfiguration' => [
'active' => true,
'n1DefaultTag' => '<string>',
'n2DefaultTag' => '<string>',
'useClarificationSections' => true
],
'llmTagConfiguration' => [
'active' => true,
'prompt' => '<string>'
],
'agenticLLMTagConfiguration' => [
'active' => true
],
'imageTranscriptionSettings' => [
'enabled' => true,
'prompt' => '<string>'
],
'eddieConfiguration' => [
'maxRepeatPerFlow' => 123,
'maxRepeatTransfer' => true
],
'backofficeConfiguration' => [
'errorMessage' => '<string>'
],
'frustrationDetection' => [
'enabled' => true,
'frustrationThreshold' => 123,
'handoverMessage' => '<string>'
],
'contextEnrichment' => [
'contactData' => [
'enabled' => true
],
'previousConversations' => [
'enabled' => true,
'maxTickets' => 123
],
'customContext' => [
'activeWorkflowId' => '<string>'
]
],
'resolutionMessages' => [
'resolutionMessageWithUserFeedback' => '<string>',
'resolutionMessageForNoUserFeedback' => '<string>'
],
'humanOfficeHoursConfig' => [
'regularRules' => [
[
'weekdays' => [
],
'allDay' => true,
'startTime' => '<string>',
'endTime' => '<string>'
]
],
'specialDates' => [
[
'name' => '<string>',
'date' => '<string>',
'allDay' => true,
'startTime' => '<string>',
'endTime' => '<string>'
]
]
],
'problemResolvedChecker' => [
'maximumMinutesWithoutResponse' => 123,
'problemResolvedQuestion' => '<string>',
'jobActive' => true,
'autoDetectProblemSolved' => true,
'identifyProblemSolvedPrompt' => '<string>',
'flowPrompt' => [
'intentPrompt' => '<string>',
'replyPrompt' => '<string>',
'moreUserInteractionsRequired' => true
],
'maxAttempts' => 123,
'retryIntervalMinutes' => 123,
'closeAfterMinutes' => 123,
'attemptMessages' => [
'<string>'
],
'followUpPrompt' => '<string>'
],
'botPromotingConfig' => [
'enabled' => true,
'flowPrompt' => [
'intentPrompt' => '<string>',
'replyPrompt' => '<string>',
'moreUserInteractionsRequired' => true
]
],
'forwardToHumanChecker' => [
'autoDetectForwardToHuman' => true,
'directHandoverAfterTurns' => 123,
'followUpMessage' => '<string>',
'staticMessagesEnabled' => true,
'identifyForwardToHumanPrompt' => '<string>',
'followUpPrompt' => '<string>',
'forwardDirectlyPrompt' => '<string>',
'directHandoverAfterEngagement' => true,
'evaluateOnEddieHandback' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}"
payload := strings.NewReader("{\n \"displayName\": \"<string>\",\n \"knowledgeBases\": [\n \"<string>\"\n ],\n \"summaryPrompt\": \"<string>\",\n \"confidenceThreshold\": 123,\n \"lowConfidenceCountLimit\": 123,\n \"maximumMinutesWithoutResponse\": 123,\n \"resolutionJobActive\": true,\n \"detectTransferMessage\": true,\n \"outOfOfficeResolveN1\": true,\n \"outOfOfficeMessage\": \"<string>\",\n \"deferOutOfOfficeClose\": true,\n \"generatedOutOfOfficeMessage\": true,\n \"outOfOfficeAnswerPrompt\": \"<string>\",\n \"forwardToHumanMessage\": \"<string>\",\n \"humansAvailable\": true,\n \"filterN1TagsOnly\": true,\n \"filterN2TagsOnly\": true,\n \"enableAudioTranscription\": true,\n \"voiceReplyEnabled\": true,\n \"voiceReplyEngine\": \"<string>\",\n \"voiceReplyVoice\": \"<string>\",\n \"voiceReplyTextAfterAudioPauseMillis\": 123,\n \"repeatedSectionLimit\": 123,\n \"protocolFooterEnabled\": true,\n \"protocolFooterAverageResponseMinutes\": 123,\n \"shouldNeverChangeIntentWhenOnEddieFlow\": true,\n \"basePromptModules\": {\n \"enabled\": true,\n \"modules\": {}\n },\n \"outputTransformation\": {\n \"enabled\": true,\n \"fallbackResponseLanguage\": \"<string>\",\n \"minCharsForLanguageDetection\": 123,\n \"languages\": []\n },\n \"splitLargeMessages\": {\n \"splitLargeMessagesActive\": true,\n \"chunkSize\": 123,\n \"timeBetweenMessages\": 123\n },\n \"enlightenmentQuestionLimit\": {\n \"enabled\": true,\n \"sentence\": \"<string>\",\n \"limit\": 123\n },\n \"classificationSettings\": {\n \"enabled\": true,\n \"classificationPrompt\": \"<string>\",\n \"clarificationAgentPrompt\": \"<string>\",\n \"noValidContentAgentPrompt\": \"<string>\",\n \"maxNoValidContentAttempts\": 123,\n \"maxClarificationAttempts\": 123\n },\n \"greetingsSettings\": {\n \"firstInteraction\": \"<string>\",\n \"n2Greeting\": \"<string>\",\n \"staticGreeting\": \"<string>\",\n \"staticGreetingEnabled\": true,\n \"default\": \"<string>\"\n },\n \"unansweredTicketEscalator\": {\n \"jobActive\": true,\n \"staticHandoverMessage\": \"<string>\",\n \"tag\": \"<string>\",\n \"escalatorTryCountLimit\": 123,\n \"minutesWithoutResponse\": 123\n },\n \"attachmentHandover\": {\n \"enabled\": true,\n \"attachmentRegex\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"startWithBotConfiguration\": {\n \"enabled\": true,\n \"flowId\": \"<string>\",\n \"addIntentToN2Tag\": true\n },\n \"endWithBotConfiguration\": {\n \"onCloseEnabled\": true,\n \"onCloseFlowId\": \"<string>\",\n \"onN2Enabled\": true,\n \"onN2FlowId\": \"<string>\"\n },\n \"defaultTagConfiguration\": {\n \"active\": true,\n \"n1DefaultTag\": \"<string>\",\n \"n2DefaultTag\": \"<string>\",\n \"useClarificationSections\": true\n },\n \"llmTagConfiguration\": {\n \"active\": true,\n \"prompt\": \"<string>\"\n },\n \"agenticLLMTagConfiguration\": {\n \"active\": true\n },\n \"imageTranscriptionSettings\": {\n \"enabled\": true,\n \"prompt\": \"<string>\"\n },\n \"eddieConfiguration\": {\n \"maxRepeatPerFlow\": 123,\n \"maxRepeatTransfer\": true\n },\n \"backofficeConfiguration\": {\n \"errorMessage\": \"<string>\"\n },\n \"frustrationDetection\": {\n \"enabled\": true,\n \"frustrationThreshold\": 123,\n \"handoverMessage\": \"<string>\"\n },\n \"contextEnrichment\": {\n \"contactData\": {\n \"enabled\": true\n },\n \"previousConversations\": {\n \"enabled\": true,\n \"maxTickets\": 123\n },\n \"customContext\": {\n \"activeWorkflowId\": \"<string>\"\n }\n },\n \"resolutionMessages\": {\n \"resolutionMessageWithUserFeedback\": \"<string>\",\n \"resolutionMessageForNoUserFeedback\": \"<string>\"\n },\n \"humanOfficeHoursConfig\": {\n \"regularRules\": [\n {\n \"weekdays\": [],\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"specialDates\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n },\n \"problemResolvedChecker\": {\n \"maximumMinutesWithoutResponse\": 123,\n \"problemResolvedQuestion\": \"<string>\",\n \"jobActive\": true,\n \"autoDetectProblemSolved\": true,\n \"identifyProblemSolvedPrompt\": \"<string>\",\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n },\n \"maxAttempts\": 123,\n \"retryIntervalMinutes\": 123,\n \"closeAfterMinutes\": 123,\n \"attemptMessages\": [\n \"<string>\"\n ],\n \"followUpPrompt\": \"<string>\"\n },\n \"botPromotingConfig\": {\n \"enabled\": true,\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n }\n },\n \"forwardToHumanChecker\": {\n \"autoDetectForwardToHuman\": true,\n \"directHandoverAfterTurns\": 123,\n \"followUpMessage\": \"<string>\",\n \"staticMessagesEnabled\": true,\n \"identifyForwardToHumanPrompt\": \"<string>\",\n \"followUpPrompt\": \"<string>\",\n \"forwardDirectlyPrompt\": \"<string>\",\n \"directHandoverAfterEngagement\": true,\n \"evaluateOnEddieHandback\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cloudchat-instance", "<cloudchat-instance>")
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.cloudhumans.com/claudia/v1/projects/{project}/ab-test/variants/{key}")
.header("cloudchat-instance", "<cloudchat-instance>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"displayName\": \"<string>\",\n \"knowledgeBases\": [\n \"<string>\"\n ],\n \"summaryPrompt\": \"<string>\",\n \"confidenceThreshold\": 123,\n \"lowConfidenceCountLimit\": 123,\n \"maximumMinutesWithoutResponse\": 123,\n \"resolutionJobActive\": true,\n \"detectTransferMessage\": true,\n \"outOfOfficeResolveN1\": true,\n \"outOfOfficeMessage\": \"<string>\",\n \"deferOutOfOfficeClose\": true,\n \"generatedOutOfOfficeMessage\": true,\n \"outOfOfficeAnswerPrompt\": \"<string>\",\n \"forwardToHumanMessage\": \"<string>\",\n \"humansAvailable\": true,\n \"filterN1TagsOnly\": true,\n \"filterN2TagsOnly\": true,\n \"enableAudioTranscription\": true,\n \"voiceReplyEnabled\": true,\n \"voiceReplyEngine\": \"<string>\",\n \"voiceReplyVoice\": \"<string>\",\n \"voiceReplyTextAfterAudioPauseMillis\": 123,\n \"repeatedSectionLimit\": 123,\n \"protocolFooterEnabled\": true,\n \"protocolFooterAverageResponseMinutes\": 123,\n \"shouldNeverChangeIntentWhenOnEddieFlow\": true,\n \"basePromptModules\": {\n \"enabled\": true,\n \"modules\": {}\n },\n \"outputTransformation\": {\n \"enabled\": true,\n \"fallbackResponseLanguage\": \"<string>\",\n \"minCharsForLanguageDetection\": 123,\n \"languages\": []\n },\n \"splitLargeMessages\": {\n \"splitLargeMessagesActive\": true,\n \"chunkSize\": 123,\n \"timeBetweenMessages\": 123\n },\n \"enlightenmentQuestionLimit\": {\n \"enabled\": true,\n \"sentence\": \"<string>\",\n \"limit\": 123\n },\n \"classificationSettings\": {\n \"enabled\": true,\n \"classificationPrompt\": \"<string>\",\n \"clarificationAgentPrompt\": \"<string>\",\n \"noValidContentAgentPrompt\": \"<string>\",\n \"maxNoValidContentAttempts\": 123,\n \"maxClarificationAttempts\": 123\n },\n \"greetingsSettings\": {\n \"firstInteraction\": \"<string>\",\n \"n2Greeting\": \"<string>\",\n \"staticGreeting\": \"<string>\",\n \"staticGreetingEnabled\": true,\n \"default\": \"<string>\"\n },\n \"unansweredTicketEscalator\": {\n \"jobActive\": true,\n \"staticHandoverMessage\": \"<string>\",\n \"tag\": \"<string>\",\n \"escalatorTryCountLimit\": 123,\n \"minutesWithoutResponse\": 123\n },\n \"attachmentHandover\": {\n \"enabled\": true,\n \"attachmentRegex\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"startWithBotConfiguration\": {\n \"enabled\": true,\n \"flowId\": \"<string>\",\n \"addIntentToN2Tag\": true\n },\n \"endWithBotConfiguration\": {\n \"onCloseEnabled\": true,\n \"onCloseFlowId\": \"<string>\",\n \"onN2Enabled\": true,\n \"onN2FlowId\": \"<string>\"\n },\n \"defaultTagConfiguration\": {\n \"active\": true,\n \"n1DefaultTag\": \"<string>\",\n \"n2DefaultTag\": \"<string>\",\n \"useClarificationSections\": true\n },\n \"llmTagConfiguration\": {\n \"active\": true,\n \"prompt\": \"<string>\"\n },\n \"agenticLLMTagConfiguration\": {\n \"active\": true\n },\n \"imageTranscriptionSettings\": {\n \"enabled\": true,\n \"prompt\": \"<string>\"\n },\n \"eddieConfiguration\": {\n \"maxRepeatPerFlow\": 123,\n \"maxRepeatTransfer\": true\n },\n \"backofficeConfiguration\": {\n \"errorMessage\": \"<string>\"\n },\n \"frustrationDetection\": {\n \"enabled\": true,\n \"frustrationThreshold\": 123,\n \"handoverMessage\": \"<string>\"\n },\n \"contextEnrichment\": {\n \"contactData\": {\n \"enabled\": true\n },\n \"previousConversations\": {\n \"enabled\": true,\n \"maxTickets\": 123\n },\n \"customContext\": {\n \"activeWorkflowId\": \"<string>\"\n }\n },\n \"resolutionMessages\": {\n \"resolutionMessageWithUserFeedback\": \"<string>\",\n \"resolutionMessageForNoUserFeedback\": \"<string>\"\n },\n \"humanOfficeHoursConfig\": {\n \"regularRules\": [\n {\n \"weekdays\": [],\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"specialDates\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n },\n \"problemResolvedChecker\": {\n \"maximumMinutesWithoutResponse\": 123,\n \"problemResolvedQuestion\": \"<string>\",\n \"jobActive\": true,\n \"autoDetectProblemSolved\": true,\n \"identifyProblemSolvedPrompt\": \"<string>\",\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n },\n \"maxAttempts\": 123,\n \"retryIntervalMinutes\": 123,\n \"closeAfterMinutes\": 123,\n \"attemptMessages\": [\n \"<string>\"\n ],\n \"followUpPrompt\": \"<string>\"\n },\n \"botPromotingConfig\": {\n \"enabled\": true,\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n }\n },\n \"forwardToHumanChecker\": {\n \"autoDetectForwardToHuman\": true,\n \"directHandoverAfterTurns\": 123,\n \"followUpMessage\": \"<string>\",\n \"staticMessagesEnabled\": true,\n \"identifyForwardToHumanPrompt\": \"<string>\",\n \"followUpPrompt\": \"<string>\",\n \"forwardDirectlyPrompt\": \"<string>\",\n \"directHandoverAfterEngagement\": true,\n \"evaluateOnEddieHandback\": true\n }\n}")
.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::Patch.new(url)
request["cloudchat-instance"] = '<cloudchat-instance>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"displayName\": \"<string>\",\n \"knowledgeBases\": [\n \"<string>\"\n ],\n \"summaryPrompt\": \"<string>\",\n \"confidenceThreshold\": 123,\n \"lowConfidenceCountLimit\": 123,\n \"maximumMinutesWithoutResponse\": 123,\n \"resolutionJobActive\": true,\n \"detectTransferMessage\": true,\n \"outOfOfficeResolveN1\": true,\n \"outOfOfficeMessage\": \"<string>\",\n \"deferOutOfOfficeClose\": true,\n \"generatedOutOfOfficeMessage\": true,\n \"outOfOfficeAnswerPrompt\": \"<string>\",\n \"forwardToHumanMessage\": \"<string>\",\n \"humansAvailable\": true,\n \"filterN1TagsOnly\": true,\n \"filterN2TagsOnly\": true,\n \"enableAudioTranscription\": true,\n \"voiceReplyEnabled\": true,\n \"voiceReplyEngine\": \"<string>\",\n \"voiceReplyVoice\": \"<string>\",\n \"voiceReplyTextAfterAudioPauseMillis\": 123,\n \"repeatedSectionLimit\": 123,\n \"protocolFooterEnabled\": true,\n \"protocolFooterAverageResponseMinutes\": 123,\n \"shouldNeverChangeIntentWhenOnEddieFlow\": true,\n \"basePromptModules\": {\n \"enabled\": true,\n \"modules\": {}\n },\n \"outputTransformation\": {\n \"enabled\": true,\n \"fallbackResponseLanguage\": \"<string>\",\n \"minCharsForLanguageDetection\": 123,\n \"languages\": []\n },\n \"splitLargeMessages\": {\n \"splitLargeMessagesActive\": true,\n \"chunkSize\": 123,\n \"timeBetweenMessages\": 123\n },\n \"enlightenmentQuestionLimit\": {\n \"enabled\": true,\n \"sentence\": \"<string>\",\n \"limit\": 123\n },\n \"classificationSettings\": {\n \"enabled\": true,\n \"classificationPrompt\": \"<string>\",\n \"clarificationAgentPrompt\": \"<string>\",\n \"noValidContentAgentPrompt\": \"<string>\",\n \"maxNoValidContentAttempts\": 123,\n \"maxClarificationAttempts\": 123\n },\n \"greetingsSettings\": {\n \"firstInteraction\": \"<string>\",\n \"n2Greeting\": \"<string>\",\n \"staticGreeting\": \"<string>\",\n \"staticGreetingEnabled\": true,\n \"default\": \"<string>\"\n },\n \"unansweredTicketEscalator\": {\n \"jobActive\": true,\n \"staticHandoverMessage\": \"<string>\",\n \"tag\": \"<string>\",\n \"escalatorTryCountLimit\": 123,\n \"minutesWithoutResponse\": 123\n },\n \"attachmentHandover\": {\n \"enabled\": true,\n \"attachmentRegex\": \"<string>\",\n \"message\": \"<string>\"\n },\n \"startWithBotConfiguration\": {\n \"enabled\": true,\n \"flowId\": \"<string>\",\n \"addIntentToN2Tag\": true\n },\n \"endWithBotConfiguration\": {\n \"onCloseEnabled\": true,\n \"onCloseFlowId\": \"<string>\",\n \"onN2Enabled\": true,\n \"onN2FlowId\": \"<string>\"\n },\n \"defaultTagConfiguration\": {\n \"active\": true,\n \"n1DefaultTag\": \"<string>\",\n \"n2DefaultTag\": \"<string>\",\n \"useClarificationSections\": true\n },\n \"llmTagConfiguration\": {\n \"active\": true,\n \"prompt\": \"<string>\"\n },\n \"agenticLLMTagConfiguration\": {\n \"active\": true\n },\n \"imageTranscriptionSettings\": {\n \"enabled\": true,\n \"prompt\": \"<string>\"\n },\n \"eddieConfiguration\": {\n \"maxRepeatPerFlow\": 123,\n \"maxRepeatTransfer\": true\n },\n \"backofficeConfiguration\": {\n \"errorMessage\": \"<string>\"\n },\n \"frustrationDetection\": {\n \"enabled\": true,\n \"frustrationThreshold\": 123,\n \"handoverMessage\": \"<string>\"\n },\n \"contextEnrichment\": {\n \"contactData\": {\n \"enabled\": true\n },\n \"previousConversations\": {\n \"enabled\": true,\n \"maxTickets\": 123\n },\n \"customContext\": {\n \"activeWorkflowId\": \"<string>\"\n }\n },\n \"resolutionMessages\": {\n \"resolutionMessageWithUserFeedback\": \"<string>\",\n \"resolutionMessageForNoUserFeedback\": \"<string>\"\n },\n \"humanOfficeHoursConfig\": {\n \"regularRules\": [\n {\n \"weekdays\": [],\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ],\n \"specialDates\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"allDay\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n }\n ]\n },\n \"problemResolvedChecker\": {\n \"maximumMinutesWithoutResponse\": 123,\n \"problemResolvedQuestion\": \"<string>\",\n \"jobActive\": true,\n \"autoDetectProblemSolved\": true,\n \"identifyProblemSolvedPrompt\": \"<string>\",\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n },\n \"maxAttempts\": 123,\n \"retryIntervalMinutes\": 123,\n \"closeAfterMinutes\": 123,\n \"attemptMessages\": [\n \"<string>\"\n ],\n \"followUpPrompt\": \"<string>\"\n },\n \"botPromotingConfig\": {\n \"enabled\": true,\n \"flowPrompt\": {\n \"intentPrompt\": \"<string>\",\n \"replyPrompt\": \"<string>\",\n \"moreUserInteractionsRequired\": true\n }\n },\n \"forwardToHumanChecker\": {\n \"autoDetectForwardToHuman\": true,\n \"directHandoverAfterTurns\": 123,\n \"followUpMessage\": \"<string>\",\n \"staticMessagesEnabled\": true,\n \"identifyForwardToHumanPrompt\": \"<string>\",\n \"followUpPrompt\": \"<string>\",\n \"forwardDirectlyPrompt\": \"<string>\",\n \"directHandoverAfterEngagement\": true,\n \"evaluateOnEddieHandback\": true\n }\n}"
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": "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": "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
}
}
]
}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.
Body
Response
Saved. 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.