curl --request PATCH \
--url https://api.statisfy.com/v1/integrations/hubspot/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"changes": {},
"expected_version": 1,
"validate_with_api": false
}
'import requests
url = "https://api.statisfy.com/v1/integrations/hubspot/config"
payload = {
"changes": {},
"expected_version": 1,
"validate_with_api": False
}
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({changes: {}, expected_version: 1, validate_with_api: false})
};
fetch('https://api.statisfy.com/v1/integrations/hubspot/config', 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.statisfy.com/v1/integrations/hubspot/config",
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([
'changes' => [
],
'expected_version' => 1,
'validate_with_api' => false
]),
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.statisfy.com/v1/integrations/hubspot/config"
payload := strings.NewReader("{\n \"changes\": {},\n \"expected_version\": 1,\n \"validate_with_api\": false\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.statisfy.com/v1/integrations/hubspot/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": {},\n \"expected_version\": 1,\n \"validate_with_api\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/hubspot/config")
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 \"changes\": {},\n \"expected_version\": 1,\n \"validate_with_api\": false\n}"
response = http.request(request)
puts response.read_body{
"configuration": {},
"source": "database",
"version": 123
}Change the HubSpot config
Changes the top-level settings in changes, each to its whole new value; every other key stays. The save runs the app’s checks (a refusal is a 422 with their text). Saving an Other account filter schedules its monthly run when none is set. A 409 means the config changed since you read it (or expected_version is not the live one): read it again.
curl --request PATCH \
--url https://api.statisfy.com/v1/integrations/hubspot/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"changes": {},
"expected_version": 1,
"validate_with_api": false
}
'import requests
url = "https://api.statisfy.com/v1/integrations/hubspot/config"
payload = {
"changes": {},
"expected_version": 1,
"validate_with_api": False
}
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({changes: {}, expected_version: 1, validate_with_api: false})
};
fetch('https://api.statisfy.com/v1/integrations/hubspot/config', 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.statisfy.com/v1/integrations/hubspot/config",
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([
'changes' => [
],
'expected_version' => 1,
'validate_with_api' => false
]),
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.statisfy.com/v1/integrations/hubspot/config"
payload := strings.NewReader("{\n \"changes\": {},\n \"expected_version\": 1,\n \"validate_with_api\": false\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.statisfy.com/v1/integrations/hubspot/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": {},\n \"expected_version\": 1,\n \"validate_with_api\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/hubspot/config")
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 \"changes\": {},\n \"expected_version\": 1,\n \"validate_with_api\": false\n}"
response = http.request(request)
puts response.read_body{
"configuration": {},
"source": "database",
"version": 123
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
The config version you read. Sent: a change against a version that is no longer live is a 409 and writes nothing (0 = the config was never saved). Left out, the version this call reads is used, so a change saved between that read and this write is still a 409: read again and retry
x >= 0Response
Successful Response
The HubSpot settings, by top-level key, with their version.
Was this page helpful?