Propose a configuration change
curl --request POST \
--url https://control.api.niadra.com/v1/config/diffs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"type": "webhook-endpoints",
"document": [
{
"endpoint_id": "whe_crm",
"url": "https://crm.acme.example/hooks/niadra",
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c46",
"event_types": [
"trigger.fired",
"action.recorded"
],
"secret_refs": [
"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm"
],
"enabled": true
}
],
"reason": "Send trigger firings and agent actions to the CRM"
}
'import requests
url = "https://control.api.niadra.com/v1/config/diffs"
payload = {
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"type": "webhook-endpoints",
"document": [
{
"endpoint_id": "whe_crm",
"url": "https://crm.acme.example/hooks/niadra",
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c46",
"event_types": ["trigger.fired", "action.recorded"],
"secret_refs": ["spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm"],
"enabled": True
}
],
"reason": "Send trigger firings and agent actions to the CRM"
}
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({
space_id: '0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23',
type: 'webhook-endpoints',
document: [
{
endpoint_id: 'whe_crm',
url: 'https://crm.acme.example/hooks/niadra',
source_id: '0192f0a0-5f60-7172-8d83-9e0f1a2b3c46',
event_types: ['trigger.fired', 'action.recorded'],
secret_refs: ['spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm'],
enabled: true
}
],
reason: 'Send trigger firings and agent actions to the CRM'
})
};
fetch('https://control.api.niadra.com/v1/config/diffs', 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://control.api.niadra.com/v1/config/diffs",
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([
'space_id' => '0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23',
'type' => 'webhook-endpoints',
'document' => [
[
'endpoint_id' => 'whe_crm',
'url' => 'https://crm.acme.example/hooks/niadra',
'source_id' => '0192f0a0-5f60-7172-8d83-9e0f1a2b3c46',
'event_types' => [
'trigger.fired',
'action.recorded'
],
'secret_refs' => [
'spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm'
],
'enabled' => true
]
],
'reason' => 'Send trigger firings and agent actions to the CRM'
]),
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://control.api.niadra.com/v1/config/diffs"
payload := strings.NewReader("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"type\": \"webhook-endpoints\",\n \"document\": [\n {\n \"endpoint_id\": \"whe_crm\",\n \"url\": \"https://crm.acme.example/hooks/niadra\",\n \"source_id\": \"0192f0a0-5f60-7172-8d83-9e0f1a2b3c46\",\n \"event_types\": [\n \"trigger.fired\",\n \"action.recorded\"\n ],\n \"secret_refs\": [\n \"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm\"\n ],\n \"enabled\": true\n }\n ],\n \"reason\": \"Send trigger firings and agent actions to the CRM\"\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://control.api.niadra.com/v1/config/diffs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"type\": \"webhook-endpoints\",\n \"document\": [\n {\n \"endpoint_id\": \"whe_crm\",\n \"url\": \"https://crm.acme.example/hooks/niadra\",\n \"source_id\": \"0192f0a0-5f60-7172-8d83-9e0f1a2b3c46\",\n \"event_types\": [\n \"trigger.fired\",\n \"action.recorded\"\n ],\n \"secret_refs\": [\n \"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm\"\n ],\n \"enabled\": true\n }\n ],\n \"reason\": \"Send trigger firings and agent actions to the CRM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/config/diffs")
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 \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"type\": \"webhook-endpoints\",\n \"document\": [\n {\n \"endpoint_id\": \"whe_crm\",\n \"url\": \"https://crm.acme.example/hooks/niadra\",\n \"source_id\": \"0192f0a0-5f60-7172-8d83-9e0f1a2b3c46\",\n \"event_types\": [\n \"trigger.fired\",\n \"action.recorded\"\n ],\n \"secret_refs\": [\n \"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm\"\n ],\n \"enabled\": true\n }\n ],\n \"reason\": \"Send trigger firings and agent actions to the CRM\"\n}"
response = http.request(request)
puts response.read_body{
"diff_id": "0192f7b2-6071-7283-9e94-0f1a2b3c4d56",
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"type": "webhook-endpoints",
"document": [
{
"endpoint_id": "whe_crm",
"url": "https://crm.acme.example/hooks/niadra",
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c46",
"event_types": [
"trigger.fired",
"action.recorded"
],
"secret_refs": [
"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm"
],
"enabled": true
}
],
"reason": "Send trigger firings and agent actions to the CRM",
"status": "pending",
"base_version": 7,
"applied_version": null,
"author_id": "0192f0a0-4e5f-7061-9c72-8d9e0f1a2b34",
"author_label": null,
"created_at": "2026-09-22T18:10:00Z",
"decided_at": null,
"decided_by": null,
"rollback_of": null
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Control: configuration
Propose a configuration change
Policy, view, mapping or rule, always as a versioned diff.
POST
/
v1
/
config
/
diffs
Propose a configuration change
curl --request POST \
--url https://control.api.niadra.com/v1/config/diffs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"type": "webhook-endpoints",
"document": [
{
"endpoint_id": "whe_crm",
"url": "https://crm.acme.example/hooks/niadra",
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c46",
"event_types": [
"trigger.fired",
"action.recorded"
],
"secret_refs": [
"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm"
],
"enabled": true
}
],
"reason": "Send trigger firings and agent actions to the CRM"
}
'import requests
url = "https://control.api.niadra.com/v1/config/diffs"
payload = {
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"type": "webhook-endpoints",
"document": [
{
"endpoint_id": "whe_crm",
"url": "https://crm.acme.example/hooks/niadra",
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c46",
"event_types": ["trigger.fired", "action.recorded"],
"secret_refs": ["spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm"],
"enabled": True
}
],
"reason": "Send trigger firings and agent actions to the CRM"
}
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({
space_id: '0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23',
type: 'webhook-endpoints',
document: [
{
endpoint_id: 'whe_crm',
url: 'https://crm.acme.example/hooks/niadra',
source_id: '0192f0a0-5f60-7172-8d83-9e0f1a2b3c46',
event_types: ['trigger.fired', 'action.recorded'],
secret_refs: ['spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm'],
enabled: true
}
],
reason: 'Send trigger firings and agent actions to the CRM'
})
};
fetch('https://control.api.niadra.com/v1/config/diffs', 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://control.api.niadra.com/v1/config/diffs",
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([
'space_id' => '0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23',
'type' => 'webhook-endpoints',
'document' => [
[
'endpoint_id' => 'whe_crm',
'url' => 'https://crm.acme.example/hooks/niadra',
'source_id' => '0192f0a0-5f60-7172-8d83-9e0f1a2b3c46',
'event_types' => [
'trigger.fired',
'action.recorded'
],
'secret_refs' => [
'spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm'
],
'enabled' => true
]
],
'reason' => 'Send trigger firings and agent actions to the CRM'
]),
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://control.api.niadra.com/v1/config/diffs"
payload := strings.NewReader("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"type\": \"webhook-endpoints\",\n \"document\": [\n {\n \"endpoint_id\": \"whe_crm\",\n \"url\": \"https://crm.acme.example/hooks/niadra\",\n \"source_id\": \"0192f0a0-5f60-7172-8d83-9e0f1a2b3c46\",\n \"event_types\": [\n \"trigger.fired\",\n \"action.recorded\"\n ],\n \"secret_refs\": [\n \"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm\"\n ],\n \"enabled\": true\n }\n ],\n \"reason\": \"Send trigger firings and agent actions to the CRM\"\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://control.api.niadra.com/v1/config/diffs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"type\": \"webhook-endpoints\",\n \"document\": [\n {\n \"endpoint_id\": \"whe_crm\",\n \"url\": \"https://crm.acme.example/hooks/niadra\",\n \"source_id\": \"0192f0a0-5f60-7172-8d83-9e0f1a2b3c46\",\n \"event_types\": [\n \"trigger.fired\",\n \"action.recorded\"\n ],\n \"secret_refs\": [\n \"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm\"\n ],\n \"enabled\": true\n }\n ],\n \"reason\": \"Send trigger firings and agent actions to the CRM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/config/diffs")
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 \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"type\": \"webhook-endpoints\",\n \"document\": [\n {\n \"endpoint_id\": \"whe_crm\",\n \"url\": \"https://crm.acme.example/hooks/niadra\",\n \"source_id\": \"0192f0a0-5f60-7172-8d83-9e0f1a2b3c46\",\n \"event_types\": [\n \"trigger.fired\",\n \"action.recorded\"\n ],\n \"secret_refs\": [\n \"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm\"\n ],\n \"enabled\": true\n }\n ],\n \"reason\": \"Send trigger firings and agent actions to the CRM\"\n}"
response = http.request(request)
puts response.read_body{
"diff_id": "0192f7b2-6071-7283-9e94-0f1a2b3c4d56",
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"type": "webhook-endpoints",
"document": [
{
"endpoint_id": "whe_crm",
"url": "https://crm.acme.example/hooks/niadra",
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c46",
"event_types": [
"trigger.fired",
"action.recorded"
],
"secret_refs": [
"spaces/0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23/webhook/whsec-crm"
],
"enabled": true
}
],
"reason": "Send trigger firings and agent actions to the CRM",
"status": "pending",
"base_version": 7,
"applied_version": null,
"author_id": "0192f0a0-4e5f-7061-9c72-8d9e0f1a2b34",
"author_label": null,
"created_at": "2026-09-22T18:10:00Z",
"decided_at": null,
"decided_by": null,
"rollback_of": null
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
The diff, pending approval.
The version the diff created when it was applied.
Set when a cell proposed the diff, such as assistant@cell-1.
The configuration version the diff was written against. A diff written against an outdated document is refused at approval.
The diff this one rolled back.
Available options:
pending, proposed, applied, rejected 
