Pedir proposta ao assistente
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/assist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task": "webhook_mapping",
"source_id": "0192f79e-11ab-7c31-8e4f-7d2e3f506b71",
"description": "Map the ERP invoice events: credited, disputed and overdue."
}
'import requests
url = "https://{space}.{region}.api.niadra.com/v1/assist"
payload = {
"task": "webhook_mapping",
"source_id": "0192f79e-11ab-7c31-8e4f-7d2e3f506b71",
"description": "Map the ERP invoice events: credited, disputed and overdue."
}
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({
task: 'webhook_mapping',
source_id: '0192f79e-11ab-7c31-8e4f-7d2e3f506b71',
description: 'Map the ERP invoice events: credited, disputed and overdue.'
})
};
fetch('https://{space}.{region}.api.niadra.com/v1/assist', 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://{space}.{region}.api.niadra.com/v1/assist",
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([
'task' => 'webhook_mapping',
'source_id' => '0192f79e-11ab-7c31-8e4f-7d2e3f506b71',
'description' => 'Map the ERP invoice events: credited, disputed and overdue.'
]),
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://{space}.{region}.api.niadra.com/v1/assist"
payload := strings.NewReader("{\n \"task\": \"webhook_mapping\",\n \"source_id\": \"0192f79e-11ab-7c31-8e4f-7d2e3f506b71\",\n \"description\": \"Map the ERP invoice events: credited, disputed and overdue.\"\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://{space}.{region}.api.niadra.com/v1/assist")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task\": \"webhook_mapping\",\n \"source_id\": \"0192f79e-11ab-7c31-8e4f-7d2e3f506b71\",\n \"description\": \"Map the ERP invoice events: credited, disputed and overdue.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/assist")
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 \"task\": \"webhook_mapping\",\n \"source_id\": \"0192f79e-11ab-7c31-8e4f-7d2e3f506b71\",\n \"description\": \"Map the ERP invoice events: credited, disputed and overdue.\"\n}"
response = http.request(request)
puts response.read_body{
"run_id": "0192f7c0-5d21-7f3b-8a4c-2b3c4d5e6f70",
"task": "webhook_mapping",
"status": "queued",
"created_at": "2026-09-22T19:00:00Z",
"config_type": null,
"diff_id": null,
"diff_hash": null,
"checks": {},
"problems": []
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Revisão e assistente
Pedir proposta ao assistente
O assistente de configuração propõe um mapeamento, esquema, política ou regra como diff para aprovação.
POST
/
v1
/
assist
Pedir proposta ao assistente
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/assist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task": "webhook_mapping",
"source_id": "0192f79e-11ab-7c31-8e4f-7d2e3f506b71",
"description": "Map the ERP invoice events: credited, disputed and overdue."
}
'import requests
url = "https://{space}.{region}.api.niadra.com/v1/assist"
payload = {
"task": "webhook_mapping",
"source_id": "0192f79e-11ab-7c31-8e4f-7d2e3f506b71",
"description": "Map the ERP invoice events: credited, disputed and overdue."
}
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({
task: 'webhook_mapping',
source_id: '0192f79e-11ab-7c31-8e4f-7d2e3f506b71',
description: 'Map the ERP invoice events: credited, disputed and overdue.'
})
};
fetch('https://{space}.{region}.api.niadra.com/v1/assist', 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://{space}.{region}.api.niadra.com/v1/assist",
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([
'task' => 'webhook_mapping',
'source_id' => '0192f79e-11ab-7c31-8e4f-7d2e3f506b71',
'description' => 'Map the ERP invoice events: credited, disputed and overdue.'
]),
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://{space}.{region}.api.niadra.com/v1/assist"
payload := strings.NewReader("{\n \"task\": \"webhook_mapping\",\n \"source_id\": \"0192f79e-11ab-7c31-8e4f-7d2e3f506b71\",\n \"description\": \"Map the ERP invoice events: credited, disputed and overdue.\"\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://{space}.{region}.api.niadra.com/v1/assist")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task\": \"webhook_mapping\",\n \"source_id\": \"0192f79e-11ab-7c31-8e4f-7d2e3f506b71\",\n \"description\": \"Map the ERP invoice events: credited, disputed and overdue.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/assist")
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 \"task\": \"webhook_mapping\",\n \"source_id\": \"0192f79e-11ab-7c31-8e4f-7d2e3f506b71\",\n \"description\": \"Map the ERP invoice events: credited, disputed and overdue.\"\n}"
response = http.request(request)
puts response.read_body{
"run_id": "0192f7c0-5d21-7f3b-8a4c-2b3c4d5e6f70",
"task": "webhook_mapping",
"status": "queued",
"created_at": "2026-09-22T19:00:00Z",
"config_type": null,
"diff_id": null,
"diff_hash": null,
"checks": {},
"problems": []
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Autorizações
sourceKeypersonToken
nia_sk_...
Corpo
application/json
Resposta
Na fila. Acompanhe a execução até proposed ou delivered.
Opções disponíveis:
queued, proposed, delivered, rejected, failed Opções disponíveis:
webhook_mapping, extraction_schema, source_policy, trigger_or_trait_rule Validação contra as amostras, dentro da célula.
O diff que espera aprovação no plano de controle.
O documento de configuração proposto, como foi enviado ao plano de controle.

