curl --request POST \
--url https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"config": {}
}'import requests
url = "https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config"
payload = { "config": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({config: {}})
};
fetch('https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/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.example.com/api/v1/teams/{team_id}/integrations/{provider}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
]
]),
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.example.com/api/v1/teams/{team_id}/integrations/{provider}/config"
payload := strings.NewReader("{\n \"config\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"provider": "<string>",
"status": "<string>",
"account_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Save Config
Save a multi-field configuration for a team integration (e.g. Keystatic, WordPress).
Sensitive fields (github_token for Keystatic, app_password /
application_password for WordPress) per the
_SENSITIVE_EXTRA_DATA_KEYS map are split out of body.config
via team_integration_service.extract_sensitive_for_storage,
encrypted with AES-256-GCM, and persisted on
IntegrationCredential.access_token_encrypted. The remaining
non-sensitive config writes to extra_data (REPLACE semantics —
POST is the create / full-rewrite path, distinct from PATCH’s
shallow merge). See migration e8b3encsec01.
On row UPDATE, a blank sensitive value preserves the stored
encrypted secret (re-saving config without re-typing the token
is supported). On row CREATE without a sensitive value, the
encrypted column is left NULL; the verify_post_migration
invariant will flag the row if it’s also status='connected'.
curl --request POST \
--url https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"config": {}
}'import requests
url = "https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config"
payload = { "config": {} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({config: {}})
};
fetch('https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/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.example.com/api/v1/teams/{team_id}/integrations/{provider}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'config' => [
]
]),
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.example.com/api/v1/teams/{team_id}/integrations/{provider}/config"
payload := strings.NewReader("{\n \"config\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/teams/{team_id}/integrations/{provider}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"provider": "<string>",
"status": "<string>",
"account_name": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Multi-field config payload.
config accepts Any values (not just str) so nested
structures like Keystatic's content_paths — a {task_type: path} dict — can round-trip through the API and JSONB column
without forcing the frontend to JSON.stringify them. The
pre-2026-06-02 shape was dict[str, str] which (a) made the
frontend serialise nested dicts to JSON strings and then (b) made
the publish-leg resolver crash on those strings with
AttributeError: 'str' object has no attribute 'get' — the
CMT publish loop incident.
The backend resolver (KeystaticAdapter._resolve_content_path)
still defensively handles JSON-stringified shapes for back-compat
with credentials saved before this widening (PR #1835). New saves
go in as native dicts via this widened schema.
Was this page helpful?