Update an Agent's deterministic human handoff policy
curl --request PATCH \
--url https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"trigger_order": [],
"triggers": {
"explicit_request": {
"enabled": true
},
"unsupported_answer": {
"enabled": true
},
"negative_feedback": {
"enabled": true
},
"keywords": {
"enabled": true,
"values": [
"<string>"
]
},
"inactivity": {
"enabled": true,
"minutes": 722
},
"custom": {
"enabled": true,
"conditions": [
{
"value": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"enabled": true
}
]
}
},
"human_profile": {
"name": "<string>",
"role": "<string>",
"bio": "<string>"
},
"contact_app_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy"
payload = {
"enabled": True,
"trigger_order": [],
"triggers": {
"explicit_request": { "enabled": True },
"unsupported_answer": { "enabled": True },
"negative_feedback": { "enabled": True },
"keywords": {
"enabled": True,
"values": ["<string>"]
},
"inactivity": {
"enabled": True,
"minutes": 722
},
"custom": {
"enabled": True,
"conditions": [
{
"value": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"enabled": True
}
]
}
},
"human_profile": {
"name": "<string>",
"role": "<string>",
"bio": "<string>"
},
"contact_app_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
enabled: true,
trigger_order: [],
triggers: {
explicit_request: {enabled: true},
unsupported_answer: {enabled: true},
negative_feedback: {enabled: true},
keywords: {enabled: true, values: ['<string>']},
inactivity: {enabled: true, minutes: 722},
custom: {
enabled: true,
conditions: [
{
value: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
enabled: true
}
]
}
},
human_profile: {name: '<string>', role: '<string>', bio: '<string>'},
contact_app_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy', 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.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy",
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([
'enabled' => true,
'trigger_order' => [
],
'triggers' => [
'explicit_request' => [
'enabled' => true
],
'unsupported_answer' => [
'enabled' => true
],
'negative_feedback' => [
'enabled' => true
],
'keywords' => [
'enabled' => true,
'values' => [
'<string>'
]
],
'inactivity' => [
'enabled' => true,
'minutes' => 722
],
'custom' => [
'enabled' => true,
'conditions' => [
[
'value' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'enabled' => true
]
]
]
],
'human_profile' => [
'name' => '<string>',
'role' => '<string>',
'bio' => '<string>'
],
'contact_app_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy"
payload := strings.NewReader("{\n \"enabled\": true,\n \"trigger_order\": [],\n \"triggers\": {\n \"explicit_request\": {\n \"enabled\": true\n },\n \"unsupported_answer\": {\n \"enabled\": true\n },\n \"negative_feedback\": {\n \"enabled\": true\n },\n \"keywords\": {\n \"enabled\": true,\n \"values\": [\n \"<string>\"\n ]\n },\n \"inactivity\": {\n \"enabled\": true,\n \"minutes\": 722\n },\n \"custom\": {\n \"enabled\": true,\n \"conditions\": [\n {\n \"value\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"enabled\": true\n }\n ]\n }\n },\n \"human_profile\": {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"bio\": \"<string>\"\n },\n \"contact_app_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\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.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"trigger_order\": [],\n \"triggers\": {\n \"explicit_request\": {\n \"enabled\": true\n },\n \"unsupported_answer\": {\n \"enabled\": true\n },\n \"negative_feedback\": {\n \"enabled\": true\n },\n \"keywords\": {\n \"enabled\": true,\n \"values\": [\n \"<string>\"\n ]\n },\n \"inactivity\": {\n \"enabled\": true,\n \"minutes\": 722\n },\n \"custom\": {\n \"enabled\": true,\n \"conditions\": [\n {\n \"value\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"enabled\": true\n }\n ]\n }\n },\n \"human_profile\": {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"bio\": \"<string>\"\n },\n \"contact_app_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy")
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 \"enabled\": true,\n \"trigger_order\": [],\n \"triggers\": {\n \"explicit_request\": {\n \"enabled\": true\n },\n \"unsupported_answer\": {\n \"enabled\": true\n },\n \"negative_feedback\": {\n \"enabled\": true\n },\n \"keywords\": {\n \"enabled\": true,\n \"values\": [\n \"<string>\"\n ]\n },\n \"inactivity\": {\n \"enabled\": true,\n \"minutes\": 722\n },\n \"custom\": {\n \"enabled\": true,\n \"conditions\": [\n {\n \"value\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"enabled\": true\n }\n ]\n }\n },\n \"human_profile\": {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"bio\": \"<string>\"\n },\n \"contact_app_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}Update an Agent's deterministic human handoff policy
Automated triggers create an offer only. The visitor must explicitly continue before the conversation is projected to the Inbox and the team is notified.
PATCH
/
workspaces
/
{workspace}
/
agents
/
{agent}
/
handoff-policy
Update an Agent's deterministic human handoff policy
curl --request PATCH \
--url https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"trigger_order": [],
"triggers": {
"explicit_request": {
"enabled": true
},
"unsupported_answer": {
"enabled": true
},
"negative_feedback": {
"enabled": true
},
"keywords": {
"enabled": true,
"values": [
"<string>"
]
},
"inactivity": {
"enabled": true,
"minutes": 722
},
"custom": {
"enabled": true,
"conditions": [
{
"value": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"enabled": true
}
]
}
},
"human_profile": {
"name": "<string>",
"role": "<string>",
"bio": "<string>"
},
"contact_app_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy"
payload = {
"enabled": True,
"trigger_order": [],
"triggers": {
"explicit_request": { "enabled": True },
"unsupported_answer": { "enabled": True },
"negative_feedback": { "enabled": True },
"keywords": {
"enabled": True,
"values": ["<string>"]
},
"inactivity": {
"enabled": True,
"minutes": 722
},
"custom": {
"enabled": True,
"conditions": [
{
"value": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"enabled": True
}
]
}
},
"human_profile": {
"name": "<string>",
"role": "<string>",
"bio": "<string>"
},
"contact_app_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
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({
enabled: true,
trigger_order: [],
triggers: {
explicit_request: {enabled: true},
unsupported_answer: {enabled: true},
negative_feedback: {enabled: true},
keywords: {enabled: true, values: ['<string>']},
inactivity: {enabled: true, minutes: 722},
custom: {
enabled: true,
conditions: [
{
value: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: '<string>',
enabled: true
}
]
}
},
human_profile: {name: '<string>', role: '<string>', bio: '<string>'},
contact_app_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy', 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.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy",
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([
'enabled' => true,
'trigger_order' => [
],
'triggers' => [
'explicit_request' => [
'enabled' => true
],
'unsupported_answer' => [
'enabled' => true
],
'negative_feedback' => [
'enabled' => true
],
'keywords' => [
'enabled' => true,
'values' => [
'<string>'
]
],
'inactivity' => [
'enabled' => true,
'minutes' => 722
],
'custom' => [
'enabled' => true,
'conditions' => [
[
'value' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => '<string>',
'enabled' => true
]
]
]
],
'human_profile' => [
'name' => '<string>',
'role' => '<string>',
'bio' => '<string>'
],
'contact_app_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
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.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy"
payload := strings.NewReader("{\n \"enabled\": true,\n \"trigger_order\": [],\n \"triggers\": {\n \"explicit_request\": {\n \"enabled\": true\n },\n \"unsupported_answer\": {\n \"enabled\": true\n },\n \"negative_feedback\": {\n \"enabled\": true\n },\n \"keywords\": {\n \"enabled\": true,\n \"values\": [\n \"<string>\"\n ]\n },\n \"inactivity\": {\n \"enabled\": true,\n \"minutes\": 722\n },\n \"custom\": {\n \"enabled\": true,\n \"conditions\": [\n {\n \"value\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"enabled\": true\n }\n ]\n }\n },\n \"human_profile\": {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"bio\": \"<string>\"\n },\n \"contact_app_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\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.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"trigger_order\": [],\n \"triggers\": {\n \"explicit_request\": {\n \"enabled\": true\n },\n \"unsupported_answer\": {\n \"enabled\": true\n },\n \"negative_feedback\": {\n \"enabled\": true\n },\n \"keywords\": {\n \"enabled\": true,\n \"values\": [\n \"<string>\"\n ]\n },\n \"inactivity\": {\n \"enabled\": true,\n \"minutes\": 722\n },\n \"custom\": {\n \"enabled\": true,\n \"conditions\": [\n {\n \"value\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"enabled\": true\n }\n ]\n }\n },\n \"human_profile\": {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"bio\": \"<string>\"\n },\n \"contact_app_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/workspaces/{workspace}/agents/{agent}/handoff-policy")
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 \"enabled\": true,\n \"trigger_order\": [],\n \"triggers\": {\n \"explicit_request\": {\n \"enabled\": true\n },\n \"unsupported_answer\": {\n \"enabled\": true\n },\n \"negative_feedback\": {\n \"enabled\": true\n },\n \"keywords\": {\n \"enabled\": true,\n \"values\": [\n \"<string>\"\n ]\n },\n \"inactivity\": {\n \"enabled\": true,\n \"minutes\": 722\n },\n \"custom\": {\n \"enabled\": true,\n \"conditions\": [\n {\n \"value\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"<string>\",\n \"enabled\": true\n }\n ]\n }\n },\n \"human_profile\": {\n \"name\": \"<string>\",\n \"role\": \"<string>\",\n \"bio\": \"<string>\"\n },\n \"contact_app_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"resolution": "<string>",
"instance": "<string>",
"request_id": "<string>",
"errors": {}
}Authorizations
A Contact Button scoped bearer key. Send Authorization: Bearer <token>.
Token abilities are enforced independently of workspace membership; both checks must pass.
Interactive MCP clients use registered OAuth applications, Authorization Code + PKCE,
audience-bound tokens, and explicit workspace grants. Personal Sanctum tokens remain supported.
Headers
Stable 8–120 character key for safe mutation retries.
Required string length:
8 - 120Body
application/json
Required array length:
6 elementsAvailable options:
explicit_request, unsupported_answer, keywords, negative_feedback, inactivity, custom Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum array length:
10Was this page helpful?