Update Freshchat settings
curl --request PATCH \
--url http://localhost:8080/integrations/freshchat/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_agent_email": "[email protected]",
"enabled": true,
"auto_handle_all_incoming_chats": true,
"handoff_agent_email": "[email protected]",
"handoff_group_id": "<string>",
"handoff_marker_property_name": "<string>"
}
'import requests
url = "http://localhost:8080/integrations/freshchat/settings"
payload = {
"default_agent_email": "[email protected]",
"enabled": True,
"auto_handle_all_incoming_chats": True,
"handoff_agent_email": "[email protected]",
"handoff_group_id": "<string>",
"handoff_marker_property_name": "<string>"
}
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({
default_agent_email: '[email protected]',
enabled: true,
auto_handle_all_incoming_chats: true,
handoff_agent_email: '[email protected]',
handoff_group_id: '<string>',
handoff_marker_property_name: '<string>'
})
};
fetch('http://localhost:8080/integrations/freshchat/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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/integrations/freshchat/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([
'default_agent_email' => '[email protected]',
'enabled' => true,
'auto_handle_all_incoming_chats' => true,
'handoff_agent_email' => '[email protected]',
'handoff_group_id' => '<string>',
'handoff_marker_property_name' => '<string>'
]),
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 := "http://localhost:8080/integrations/freshchat/settings"
payload := strings.NewReader("{\n \"default_agent_email\": \"[email protected]\",\n \"enabled\": true,\n \"auto_handle_all_incoming_chats\": true,\n \"handoff_agent_email\": \"[email protected]\",\n \"handoff_group_id\": \"<string>\",\n \"handoff_marker_property_name\": \"<string>\"\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("http://localhost:8080/integrations/freshchat/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_agent_email\": \"[email protected]\",\n \"enabled\": true,\n \"auto_handle_all_incoming_chats\": true,\n \"handoff_agent_email\": \"[email protected]\",\n \"handoff_group_id\": \"<string>\",\n \"handoff_marker_property_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/integrations/freshchat/settings")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_agent_email\": \"[email protected]\",\n \"enabled\": true,\n \"auto_handle_all_incoming_chats\": true,\n \"handoff_agent_email\": \"[email protected]\",\n \"handoff_group_id\": \"<string>\",\n \"handoff_marker_property_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"settings": {
"domain": "<string>",
"enabled": true,
"default_agent_email": "<string>",
"auto_handle_all_incoming_chats": true,
"handoff_behavior": "unassign",
"handoff_agent_email": "<string>",
"handoff_group_id": "<string>",
"handoff_marker_property_name": "<string>"
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Freshchat Integration
Update Freshchat settings
Change the Freshchat AI agent, conversation intake, or handoff routing, or pause the integration. Omitted fields keep their value.
PATCH
/
integrations
/
freshchat
/
settings
Update Freshchat settings
curl --request PATCH \
--url http://localhost:8080/integrations/freshchat/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_agent_email": "[email protected]",
"enabled": true,
"auto_handle_all_incoming_chats": true,
"handoff_agent_email": "[email protected]",
"handoff_group_id": "<string>",
"handoff_marker_property_name": "<string>"
}
'import requests
url = "http://localhost:8080/integrations/freshchat/settings"
payload = {
"default_agent_email": "[email protected]",
"enabled": True,
"auto_handle_all_incoming_chats": True,
"handoff_agent_email": "[email protected]",
"handoff_group_id": "<string>",
"handoff_marker_property_name": "<string>"
}
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({
default_agent_email: '[email protected]',
enabled: true,
auto_handle_all_incoming_chats: true,
handoff_agent_email: '[email protected]',
handoff_group_id: '<string>',
handoff_marker_property_name: '<string>'
})
};
fetch('http://localhost:8080/integrations/freshchat/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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/integrations/freshchat/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([
'default_agent_email' => '[email protected]',
'enabled' => true,
'auto_handle_all_incoming_chats' => true,
'handoff_agent_email' => '[email protected]',
'handoff_group_id' => '<string>',
'handoff_marker_property_name' => '<string>'
]),
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 := "http://localhost:8080/integrations/freshchat/settings"
payload := strings.NewReader("{\n \"default_agent_email\": \"[email protected]\",\n \"enabled\": true,\n \"auto_handle_all_incoming_chats\": true,\n \"handoff_agent_email\": \"[email protected]\",\n \"handoff_group_id\": \"<string>\",\n \"handoff_marker_property_name\": \"<string>\"\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("http://localhost:8080/integrations/freshchat/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_agent_email\": \"[email protected]\",\n \"enabled\": true,\n \"auto_handle_all_incoming_chats\": true,\n \"handoff_agent_email\": \"[email protected]\",\n \"handoff_group_id\": \"<string>\",\n \"handoff_marker_property_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/integrations/freshchat/settings")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"default_agent_email\": \"[email protected]\",\n \"enabled\": true,\n \"auto_handle_all_incoming_chats\": true,\n \"handoff_agent_email\": \"[email protected]\",\n \"handoff_group_id\": \"<string>\",\n \"handoff_marker_property_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"settings": {
"domain": "<string>",
"enabled": true,
"default_agent_email": "<string>",
"auto_handle_all_incoming_chats": true,
"handoff_behavior": "unassign",
"handoff_agent_email": "<string>",
"handoff_group_id": "<string>",
"handoff_marker_property_name": "<string>"
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Pattern:
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Where a conversation goes when the AI hands off: unassign (back to the queue), freshchat_automation (leave it to Freshchat assignment rules), assign_to_agent (handoff_agent_email), assign_to_group (handoff_group_id)
Available options:
unassign, freshchat_automation, assign_to_agent, assign_to_group Pattern:
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Minimum string length:
1Minimum string length:
1Was this page helpful?