Aproveitamento de uma conversa
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/context-use/conversation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "call-4471"
}
'import requests
url = "https://{space}.{region}.api.niadra.com/v1/context-use/conversation"
payload = { "conversation_id": "call-4471" }
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({conversation_id: 'call-4471'})
};
fetch('https://{space}.{region}.api.niadra.com/v1/context-use/conversation', 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/context-use/conversation",
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([
'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/context-use/conversation"
payload := strings.NewReader("{\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/context-use/conversation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"call-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/context-use/conversation")
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 \"conversation_id\": \"call-4471\"\n}"
response = http.request(request)
puts response.read_body{
"conversation_id": "call-4471",
"entries": [
{
"source_id": "0192f79e-11aa-7b20-9f3e-6c1d2e4f5a60",
"channel": "voice",
"view": "voice",
"experiment_group": "memory",
"manifest_hash": "sha256:5b1e0c",
"measure_version": "2",
"measured_at": "2026-09-22T17:12:40Z",
"used": 2,
"questions": 3,
"repeated": 0,
"contradicted": 0,
"late": false,
"transfer_unread": null,
"not_measured_reason": null,
"items": [
{
"id": "0192f7a2-9d52-7f4b-8a6e-3d5f7a9b1c24",
"kind": "action",
"used": true,
"repeated": false,
"contradicted": false,
"evidence": [
"0192f7a1-6a2b-7d11-9c3e-1a2b3c4d5e06"
]
}
]
}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Padrões, medição e uso
Aproveitamento de uma conversa
O detalhe de cada entrega de uma conversa, com os itens usados e o turno de cada sinal, com o id da conversa no corpo.
POST
/
v1
/
context-use
/
conversation
Aproveitamento de uma conversa
curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/context-use/conversation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "call-4471"
}
'import requests
url = "https://{space}.{region}.api.niadra.com/v1/context-use/conversation"
payload = { "conversation_id": "call-4471" }
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({conversation_id: 'call-4471'})
};
fetch('https://{space}.{region}.api.niadra.com/v1/context-use/conversation', 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/context-use/conversation",
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([
'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/context-use/conversation"
payload := strings.NewReader("{\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/context-use/conversation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"call-4471\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/context-use/conversation")
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 \"conversation_id\": \"call-4471\"\n}"
response = http.request(request)
puts response.read_body{
"conversation_id": "call-4471",
"entries": [
{
"source_id": "0192f79e-11aa-7b20-9f3e-6c1d2e4f5a60",
"channel": "voice",
"view": "voice",
"experiment_group": "memory",
"manifest_hash": "sha256:5b1e0c",
"measure_version": "2",
"measured_at": "2026-09-22T17:12:40Z",
"used": 2,
"questions": 3,
"repeated": 0,
"contradicted": 0,
"late": false,
"transfer_unread": null,
"not_measured_reason": null,
"items": [
{
"id": "0192f7a2-9d52-7f4b-8a6e-3d5f7a9b1c24",
"kind": "action",
"used": true,
"repeated": false,
"contradicted": false,
"evidence": [
"0192f7a1-6a2b-7d11-9c3e-1a2b3c4d5e06"
]
}
]
}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Autorizações
sourceKeypersonToken
nia_sk_...
Corpo
application/json
Um id de conversa ou de tarefa no corpo: ele pode ser um telefone ou um e-mail.
Required string length:
1 - 512
