curl --request PATCH \
--url http://localhost:8080/integrations/hubspot/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_user_id": "<string>",
"handoff_user_id": "<string>",
"ai_reply_to_all_enabled": true,
"close_ticket_stage_id": "<string>",
"post_handoff_note": true
}
'import requests
url = "http://localhost:8080/integrations/hubspot/settings"
payload = {
"default_user_id": "<string>",
"handoff_user_id": "<string>",
"ai_reply_to_all_enabled": True,
"close_ticket_stage_id": "<string>",
"post_handoff_note": 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({
default_user_id: '<string>',
handoff_user_id: '<string>',
ai_reply_to_all_enabled: true,
close_ticket_stage_id: '<string>',
post_handoff_note: true
})
};
fetch('http://localhost:8080/integrations/hubspot/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/hubspot/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_user_id' => '<string>',
'handoff_user_id' => '<string>',
'ai_reply_to_all_enabled' => true,
'close_ticket_stage_id' => '<string>',
'post_handoff_note' => 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 := "http://localhost:8080/integrations/hubspot/settings"
payload := strings.NewReader("{\n \"default_user_id\": \"<string>\",\n \"handoff_user_id\": \"<string>\",\n \"ai_reply_to_all_enabled\": true,\n \"close_ticket_stage_id\": \"<string>\",\n \"post_handoff_note\": true\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/hubspot/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_user_id\": \"<string>\",\n \"handoff_user_id\": \"<string>\",\n \"ai_reply_to_all_enabled\": true,\n \"close_ticket_stage_id\": \"<string>\",\n \"post_handoff_note\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/integrations/hubspot/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_user_id\": \"<string>\",\n \"handoff_user_id\": \"<string>\",\n \"ai_reply_to_all_enabled\": true,\n \"close_ticket_stage_id\": \"<string>\",\n \"post_handoff_note\": true\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"settings": {
"default_user_id": "<string>",
"handoff_assignment_type": "unassigned",
"handoff_user_id": "<string>",
"ai_reply_to_all_enabled": true,
"close_ticket_stage_id": "<string>",
"post_handoff_note": true
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Update HubSpot integration settings
Change the HubSpot AI user, handoff assignment, reply-all, close stage, or handoff comment. Omitted fields keep their value.
curl --request PATCH \
--url http://localhost:8080/integrations/hubspot/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"default_user_id": "<string>",
"handoff_user_id": "<string>",
"ai_reply_to_all_enabled": true,
"close_ticket_stage_id": "<string>",
"post_handoff_note": true
}
'import requests
url = "http://localhost:8080/integrations/hubspot/settings"
payload = {
"default_user_id": "<string>",
"handoff_user_id": "<string>",
"ai_reply_to_all_enabled": True,
"close_ticket_stage_id": "<string>",
"post_handoff_note": 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({
default_user_id: '<string>',
handoff_user_id: '<string>',
ai_reply_to_all_enabled: true,
close_ticket_stage_id: '<string>',
post_handoff_note: true
})
};
fetch('http://localhost:8080/integrations/hubspot/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/hubspot/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_user_id' => '<string>',
'handoff_user_id' => '<string>',
'ai_reply_to_all_enabled' => true,
'close_ticket_stage_id' => '<string>',
'post_handoff_note' => 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 := "http://localhost:8080/integrations/hubspot/settings"
payload := strings.NewReader("{\n \"default_user_id\": \"<string>\",\n \"handoff_user_id\": \"<string>\",\n \"ai_reply_to_all_enabled\": true,\n \"close_ticket_stage_id\": \"<string>\",\n \"post_handoff_note\": true\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/hubspot/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"default_user_id\": \"<string>\",\n \"handoff_user_id\": \"<string>\",\n \"ai_reply_to_all_enabled\": true,\n \"close_ticket_stage_id\": \"<string>\",\n \"post_handoff_note\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/integrations/hubspot/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_user_id\": \"<string>\",\n \"handoff_user_id\": \"<string>\",\n \"ai_reply_to_all_enabled\": true,\n \"close_ticket_stage_id\": \"<string>\",\n \"post_handoff_note\": true\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"settings": {
"default_user_id": "<string>",
"handoff_assignment_type": "unassigned",
"handoff_user_id": "<string>",
"ai_reply_to_all_enabled": true,
"close_ticket_stage_id": "<string>",
"post_handoff_note": true
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
HubSpot user id the AI acts as
1After handoff: unassigned = clear the owner, assign_to_user = assign to handoff_user_id, leave_unchanged = keep the current owner
unassigned, assign_to_user, leave_unchanged HubSpot user id handed-off conversations go to when handoff_assignment_type is assign_to_user
true = AI email replies go to every recipient on the thread (reply-all), not just the sender
HubSpot ticket pipeline stage id used when a session is closed; null = the pipeline default closed stage
true = a handoff posts a summary comment on the HubSpot conversation/ticket
Was this page helpful?