Python
item = niadra.open("0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34", conversation_id="call-4471")
if item:
print(item.summary, item.resolution)const { data: item } = await niadra.open("0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34", { conversation_id: "call-4471" });
if (item) console.log(item.summary, item.resolution);curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/history/open \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"item_id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34",
"verification": "V1",
"conversation_id": "call-4471"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
item_id: '0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34',
verification: 'V1',
conversation_id: 'call-4471'
})
};
fetch('https://{space}.{region}.api.niadra.com/v1/history/open', 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/history/open",
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([
'item_id' => '0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34',
'verification' => 'V1',
'conversation_id' => 'call-4471'
]),
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/history/open"
payload := strings.NewReader("{\n \"item_id\": \"0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34\",\n \"verification\": \"V1\",\n \"conversation_id\": \"call-4471\"\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/history/open")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": \"0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34\",\n \"verification\": \"V1\",\n \"conversation_id\": \"call-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/history/open")
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 \"item_id\": \"0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34\",\n \"verification\": \"V1\",\n \"conversation_id\": \"call-4471\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34",
"kind": "episode",
"summary": "Technician did not show up for the scheduled visit.",
"requested": "A new visit and compensation",
"promises": [
{
"by": "company",
"what": "New visit on Mar 13, morning",
"due_at": "2026-03-13T15:00:00Z",
"status": "kept"
}
],
"outcome": "resolved",
"resolution": "$40 credit on the April bill",
"derived": [],
"timeline": [],
"as_of": "2026-09-22T17:07:02Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Histórico
Abrir um item
Uma conversa ou um objeto aberto: o que foi pedido, as promessas, o desfecho e o que nasceu dele, com o id da conversa e o cliente no corpo.
POST
/
v1
/
history
/
open
Python
item = niadra.open("0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34", conversation_id="call-4471")
if item:
print(item.summary, item.resolution)const { data: item } = await niadra.open("0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34", { conversation_id: "call-4471" });
if (item) console.log(item.summary, item.resolution);curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/history/open \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"item_id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34",
"verification": "V1",
"conversation_id": "call-4471"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
item_id: '0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34',
verification: 'V1',
conversation_id: 'call-4471'
})
};
fetch('https://{space}.{region}.api.niadra.com/v1/history/open', 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/history/open",
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([
'item_id' => '0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34',
'verification' => 'V1',
'conversation_id' => 'call-4471'
]),
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/history/open"
payload := strings.NewReader("{\n \"item_id\": \"0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34\",\n \"verification\": \"V1\",\n \"conversation_id\": \"call-4471\"\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/history/open")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"item_id\": \"0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34\",\n \"verification\": \"V1\",\n \"conversation_id\": \"call-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/history/open")
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 \"item_id\": \"0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34\",\n \"verification\": \"V1\",\n \"conversation_id\": \"call-4471\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34",
"kind": "episode",
"summary": "Technician did not show up for the scheduled visit.",
"requested": "A new visit and compensation",
"promises": [
{
"by": "company",
"what": "New visit on Mar 13, morning",
"due_at": "2026-03-13T15:00:00Z",
"status": "kept"
}
],
"outcome": "resolved",
"resolution": "$40 credit on the April bill",
"derived": [],
"timeline": [],
"as_of": "2026-09-22T17:07:02Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Corpo
application/json
GET /v1/history/items/{item_id} com o id da conversa e o cliente no corpo.
Nível de verificação da sessão. V0 autodeclarado, V1 plausível pelo canal, V2 atestado pelo canal, V3 desafiado (OTP ou login), V4 conferido com um sistema de registro ou por um atendente. no_customer vale para tarefas sem cliente presente e só é aceito de fontes de agente interno.
Opções disponíveis:
V0, V1, V2, V3, V4, no_customer Resposta
O item aberto, como GET /v1/history/items/{item_id} devolve.

