curl --request POST \
--url https://control.api.niadra.com/v1/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": [
"billing"
],
"verification_ceiling": "no_customer",
"trusted_action_ops": [
"credit"
],
"navigation_enabled": true,
"confirms_before_acting": false,
"critical": false
}
'import requests
url = "https://control.api.niadra.com/v1/sources"
payload = {
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": ["billing"],
"verification_ceiling": "no_customer",
"trusted_action_ops": ["credit"],
"navigation_enabled": True,
"confirms_before_acting": False,
"critical": False
}
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',
name: 'Billing agent',
audience: 'internal_agent',
vendor: 'in-house',
channel: 'erp',
purposes: ['billing'],
verification_ceiling: 'no_customer',
trusted_action_ops: ['credit'],
navigation_enabled: true,
confirms_before_acting: false,
critical: false
})
};
fetch('https://control.api.niadra.com/v1/sources', 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/sources",
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',
'name' => 'Billing agent',
'audience' => 'internal_agent',
'vendor' => 'in-house',
'channel' => 'erp',
'purposes' => [
'billing'
],
'verification_ceiling' => 'no_customer',
'trusted_action_ops' => [
'credit'
],
'navigation_enabled' => true,
'confirms_before_acting' => false,
'critical' => 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://control.api.niadra.com/v1/sources"
payload := strings.NewReader("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"name\": \"Billing agent\",\n \"audience\": \"internal_agent\",\n \"vendor\": \"in-house\",\n \"channel\": \"erp\",\n \"purposes\": [\n \"billing\"\n ],\n \"verification_ceiling\": \"no_customer\",\n \"trusted_action_ops\": [\n \"credit\"\n ],\n \"navigation_enabled\": true,\n \"confirms_before_acting\": false,\n \"critical\": false\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/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"name\": \"Billing agent\",\n \"audience\": \"internal_agent\",\n \"vendor\": \"in-house\",\n \"channel\": \"erp\",\n \"purposes\": [\n \"billing\"\n ],\n \"verification_ceiling\": \"no_customer\",\n \"trusted_action_ops\": [\n \"credit\"\n ],\n \"navigation_enabled\": true,\n \"confirms_before_acting\": false,\n \"critical\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/sources")
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 \"name\": \"Billing agent\",\n \"audience\": \"internal_agent\",\n \"vendor\": \"in-house\",\n \"channel\": \"erp\",\n \"purposes\": [\n \"billing\"\n ],\n \"verification_ceiling\": \"no_customer\",\n \"trusted_action_ops\": [\n \"credit\"\n ],\n \"navigation_enabled\": true,\n \"confirms_before_acting\": false,\n \"critical\": false\n}"
response = http.request(request)
puts response.read_body{
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c45",
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": [
"billing"
],
"verification_ceiling": "no_customer",
"confirms_before_acting": false,
"navigation_enabled": true,
"trusted_action_ops": [
"credit"
],
"critical": false,
"revoked_at": null
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Criar fonte
Uma fonte nova, com canal, finalidade, audiência e teto de verificação.
curl --request POST \
--url https://control.api.niadra.com/v1/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": [
"billing"
],
"verification_ceiling": "no_customer",
"trusted_action_ops": [
"credit"
],
"navigation_enabled": true,
"confirms_before_acting": false,
"critical": false
}
'import requests
url = "https://control.api.niadra.com/v1/sources"
payload = {
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": ["billing"],
"verification_ceiling": "no_customer",
"trusted_action_ops": ["credit"],
"navigation_enabled": True,
"confirms_before_acting": False,
"critical": False
}
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',
name: 'Billing agent',
audience: 'internal_agent',
vendor: 'in-house',
channel: 'erp',
purposes: ['billing'],
verification_ceiling: 'no_customer',
trusted_action_ops: ['credit'],
navigation_enabled: true,
confirms_before_acting: false,
critical: false
})
};
fetch('https://control.api.niadra.com/v1/sources', 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/sources",
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',
'name' => 'Billing agent',
'audience' => 'internal_agent',
'vendor' => 'in-house',
'channel' => 'erp',
'purposes' => [
'billing'
],
'verification_ceiling' => 'no_customer',
'trusted_action_ops' => [
'credit'
],
'navigation_enabled' => true,
'confirms_before_acting' => false,
'critical' => 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://control.api.niadra.com/v1/sources"
payload := strings.NewReader("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"name\": \"Billing agent\",\n \"audience\": \"internal_agent\",\n \"vendor\": \"in-house\",\n \"channel\": \"erp\",\n \"purposes\": [\n \"billing\"\n ],\n \"verification_ceiling\": \"no_customer\",\n \"trusted_action_ops\": [\n \"credit\"\n ],\n \"navigation_enabled\": true,\n \"confirms_before_acting\": false,\n \"critical\": false\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/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"space_id\": \"0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23\",\n \"name\": \"Billing agent\",\n \"audience\": \"internal_agent\",\n \"vendor\": \"in-house\",\n \"channel\": \"erp\",\n \"purposes\": [\n \"billing\"\n ],\n \"verification_ceiling\": \"no_customer\",\n \"trusted_action_ops\": [\n \"credit\"\n ],\n \"navigation_enabled\": true,\n \"confirms_before_acting\": false,\n \"critical\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/sources")
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 \"name\": \"Billing agent\",\n \"audience\": \"internal_agent\",\n \"vendor\": \"in-house\",\n \"channel\": \"erp\",\n \"purposes\": [\n \"billing\"\n ],\n \"verification_ceiling\": \"no_customer\",\n \"trusted_action_ops\": [\n \"credit\"\n ],\n \"navigation_enabled\": true,\n \"confirms_before_acting\": false,\n \"critical\": false\n}"
response = http.request(request)
puts response.read_body{
"source_id": "0192f0a0-5f60-7172-8d83-9e0f1a2b3c45",
"space_id": "0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23",
"name": "Billing agent",
"audience": "internal_agent",
"vendor": "in-house",
"channel": "erp",
"purposes": [
"billing"
],
"verification_ceiling": "no_customer",
"confirms_before_acting": false,
"navigation_enabled": true,
"trusted_action_ops": [
"credit"
],
"critical": false,
"revoked_at": null
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corpo
O que a fonte pode ler, pela classe de audiência: agente que fala com o cliente, agente interno, mesa humana e outras.
customer_agent, internal_agent, human, reviewer, analyst, trigger_target, export 1 - 2561 - 256O agente confirma valores antes de agir, então a medição não conta essas confirmações como pergunta repetida.
As sessões desta fonte ficam fora dos grupos de controle e sempre recebem a memória.
Se a fonte pode usar as ferramentas de navegação do histórico.
As finalidades pelas quais a política libera o acesso, como customer_service ou billing.
321 - 256Operações em que as ações declaradas por esta fonte podem fechar pendências antes de o sistema de registro confirmar.
641 - 2561 - 256O nível de verificação mais alto que esta fonte pode declarar: V2 para agentes automatizados, V3 para fontes que fazem OTP, V4 só para mesa humana e sistema de registro, no_customer para agentes internos.
V0, V1, V2, V3, V4, no_customer Resposta
A fonte.
customer_agent, internal_agent, human, reviewer, analyst, trigger_target, export Níveis de verificação da sessão. no_customer fica fora da escala de V0 a V4.
V0, V1, V2, V3, V4, no_customer 
