Update notification and agent policy settings
curl --request PATCH \
--url https://api.contactbutton.com/v1/workspaces/{workspace}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notifications": {
"lead_email": true,
"booking_email": true,
"callback_email": true,
"chat_email": true,
"recipients": [
"jsmith@example.com"
]
},
"agent_policy": {
"allow_agent_requests": true,
"require_human_confirmation": true,
"allow_agent_to_agent_chat": true
},
"inbox": {
"mark_read_on_open": true,
"reopen_closed_on_inbound": true
}
}
'import requests
url = "https://api.contactbutton.com/v1/workspaces/{workspace}/settings"
payload = {
"notifications": {
"lead_email": True,
"booking_email": True,
"callback_email": True,
"chat_email": True,
"recipients": ["jsmith@example.com"]
},
"agent_policy": {
"allow_agent_requests": True,
"require_human_confirmation": True,
"allow_agent_to_agent_chat": True
},
"inbox": {
"mark_read_on_open": True,
"reopen_closed_on_inbound": True
}
}
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({
notifications: {
lead_email: true,
booking_email: true,
callback_email: true,
chat_email: true,
recipients: ['jsmith@example.com']
},
agent_policy: {
allow_agent_requests: true,
require_human_confirmation: true,
allow_agent_to_agent_chat: true
},
inbox: {mark_read_on_open: true, reopen_closed_on_inbound: true}
})
};
fetch('https://api.contactbutton.com/v1/workspaces/{workspace}/settings', 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}/settings",
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([
'notifications' => [
'lead_email' => true,
'booking_email' => true,
'callback_email' => true,
'chat_email' => true,
'recipients' => [
'jsmith@example.com'
]
],
'agent_policy' => [
'allow_agent_requests' => true,
'require_human_confirmation' => true,
'allow_agent_to_agent_chat' => true
],
'inbox' => [
'mark_read_on_open' => true,
'reopen_closed_on_inbound' => true
]
]),
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}/settings"
payload := strings.NewReader("{\n \"notifications\": {\n \"lead_email\": true,\n \"booking_email\": true,\n \"callback_email\": true,\n \"chat_email\": true,\n \"recipients\": [\n \"jsmith@example.com\"\n ]\n },\n \"agent_policy\": {\n \"allow_agent_requests\": true,\n \"require_human_confirmation\": true,\n \"allow_agent_to_agent_chat\": true\n },\n \"inbox\": {\n \"mark_read_on_open\": true,\n \"reopen_closed_on_inbound\": true\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}/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notifications\": {\n \"lead_email\": true,\n \"booking_email\": true,\n \"callback_email\": true,\n \"chat_email\": true,\n \"recipients\": [\n \"jsmith@example.com\"\n ]\n },\n \"agent_policy\": {\n \"allow_agent_requests\": true,\n \"require_human_confirmation\": true,\n \"allow_agent_to_agent_chat\": true\n },\n \"inbox\": {\n \"mark_read_on_open\": true,\n \"reopen_closed_on_inbound\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/workspaces/{workspace}/settings")
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 \"notifications\": {\n \"lead_email\": true,\n \"booking_email\": true,\n \"callback_email\": true,\n \"chat_email\": true,\n \"recipients\": [\n \"jsmith@example.com\"\n ]\n },\n \"agent_policy\": {\n \"allow_agent_requests\": true,\n \"require_human_confirmation\": true,\n \"allow_agent_to_agent_chat\": true\n },\n \"inbox\": {\n \"mark_read_on_open\": true,\n \"reopen_closed_on_inbound\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}Update notification and agent policy settings
PATCH
/
workspaces
/
{workspace}
/
settings
Update notification and agent policy settings
curl --request PATCH \
--url https://api.contactbutton.com/v1/workspaces/{workspace}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notifications": {
"lead_email": true,
"booking_email": true,
"callback_email": true,
"chat_email": true,
"recipients": [
"jsmith@example.com"
]
},
"agent_policy": {
"allow_agent_requests": true,
"require_human_confirmation": true,
"allow_agent_to_agent_chat": true
},
"inbox": {
"mark_read_on_open": true,
"reopen_closed_on_inbound": true
}
}
'import requests
url = "https://api.contactbutton.com/v1/workspaces/{workspace}/settings"
payload = {
"notifications": {
"lead_email": True,
"booking_email": True,
"callback_email": True,
"chat_email": True,
"recipients": ["jsmith@example.com"]
},
"agent_policy": {
"allow_agent_requests": True,
"require_human_confirmation": True,
"allow_agent_to_agent_chat": True
},
"inbox": {
"mark_read_on_open": True,
"reopen_closed_on_inbound": True
}
}
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({
notifications: {
lead_email: true,
booking_email: true,
callback_email: true,
chat_email: true,
recipients: ['jsmith@example.com']
},
agent_policy: {
allow_agent_requests: true,
require_human_confirmation: true,
allow_agent_to_agent_chat: true
},
inbox: {mark_read_on_open: true, reopen_closed_on_inbound: true}
})
};
fetch('https://api.contactbutton.com/v1/workspaces/{workspace}/settings', 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}/settings",
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([
'notifications' => [
'lead_email' => true,
'booking_email' => true,
'callback_email' => true,
'chat_email' => true,
'recipients' => [
'jsmith@example.com'
]
],
'agent_policy' => [
'allow_agent_requests' => true,
'require_human_confirmation' => true,
'allow_agent_to_agent_chat' => true
],
'inbox' => [
'mark_read_on_open' => true,
'reopen_closed_on_inbound' => true
]
]),
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}/settings"
payload := strings.NewReader("{\n \"notifications\": {\n \"lead_email\": true,\n \"booking_email\": true,\n \"callback_email\": true,\n \"chat_email\": true,\n \"recipients\": [\n \"jsmith@example.com\"\n ]\n },\n \"agent_policy\": {\n \"allow_agent_requests\": true,\n \"require_human_confirmation\": true,\n \"allow_agent_to_agent_chat\": true\n },\n \"inbox\": {\n \"mark_read_on_open\": true,\n \"reopen_closed_on_inbound\": true\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}/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notifications\": {\n \"lead_email\": true,\n \"booking_email\": true,\n \"callback_email\": true,\n \"chat_email\": true,\n \"recipients\": [\n \"jsmith@example.com\"\n ]\n },\n \"agent_policy\": {\n \"allow_agent_requests\": true,\n \"require_human_confirmation\": true,\n \"allow_agent_to_agent_chat\": true\n },\n \"inbox\": {\n \"mark_read_on_open\": true,\n \"reopen_closed_on_inbound\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contactbutton.com/v1/workspaces/{workspace}/settings")
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 \"notifications\": {\n \"lead_email\": true,\n \"booking_email\": true,\n \"callback_email\": true,\n \"chat_email\": true,\n \"recipients\": [\n \"jsmith@example.com\"\n ]\n },\n \"agent_policy\": {\n \"allow_agent_requests\": true,\n \"require_human_confirmation\": true,\n \"allow_agent_to_agent_chat\": true\n },\n \"inbox\": {\n \"mark_read_on_open\": true,\n \"reopen_closed_on_inbound\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"meta": {
"request_id": "<string>",
"next_cursor": "<string>"
}
}Authorizations
A Contact Button scoped bearer key. Send Authorization: Bearer <token>.
Token abilities are enforced independently of workspace membership; both checks must pass.
OAuth 2.0 authorization-code flows are not currently available.
Path Parameters
Body
application/json
Related topics
Get notification and agent policy settingsAgentMail integrationUpdate a call flowHuman and agent chatUpdate, publish, pause, or archive a surveyWas this page helpful?
⌘I