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"
}Create a source
A new source, with channel, purpose, audience and verification ceiling.
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"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
What the source may read, by audience class: a customer-facing agent, an internal agent, a human desk and others.
customer_agent, internal_agent, human, reviewer, analyst, trigger_target, export 1 - 2561 - 256The agent confirms values before acting, so measurement does not count those confirmations as repeated questions.
Sessions of this source stay out of control groups and always receive the memory.
Whether the source may use the history navigation tools.
Purposes the policy grants access by, such as customer_service or billing.
321 - 256Operations whose declared actions this source may use to close open items before the system of record confirms them.
641 - 2561 - 256The highest verification level this source may declare: V2 for automated agents, V3 for sources that run OTP, V4 only for human desks and systems of record, no_customer for internal agents.
V0, V1, V2, V3, V4, no_customer Response
The source.
customer_agent, internal_agent, human, reviewer, analyst, trigger_target, export Session verification levels. no_customer sits outside the V0-V4 scale.
V0, V1, V2, V3, V4, no_customer 
