Python
page = niadra.timeline(
phone("+14155550123"),
filters={"since": "2026-01-01T00:00:00Z"},
limit=20,
)
for item in page.items:
print(item.at, item.kind, item.text)const { data: page } = await niadra.timeline({
subject: handles.phone("+14155550123"),
filters: { since: "2026-01-01T00:00:00Z" },
limit: 20,
});
for (const item of page?.items ?? []) console.log(item.at, item.kind, item.text);curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/history/timeline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject": {
"type": "phone_e164",
"value": "+14155550123"
},
"filters": {
"since": "2026-01-01T00:00:00Z"
},
"limit": 20,
"verification": "V1"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject: {type: 'phone_e164', value: '+14155550123'},
filters: {since: '2026-01-01T00:00:00Z'},
limit: 20,
verification: 'V1'
})
};
fetch('https://{space}.{region}.api.niadra.com/v1/history/timeline', 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/timeline",
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([
'subject' => [
'type' => 'phone_e164',
'value' => '+14155550123'
],
'filters' => [
'since' => '2026-01-01T00:00:00Z'
],
'limit' => 20,
'verification' => 'V1'
]),
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/timeline"
payload := strings.NewReader("{\n \"subject\": {\n \"type\": \"phone_e164\",\n \"value\": \"+14155550123\"\n },\n \"filters\": {\n \"since\": \"2026-01-01T00:00:00Z\"\n },\n \"limit\": 20,\n \"verification\": \"V1\"\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/timeline")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject\": {\n \"type\": \"phone_e164\",\n \"value\": \"+14155550123\"\n },\n \"filters\": {\n \"since\": \"2026-01-01T00:00:00Z\"\n },\n \"limit\": 20,\n \"verification\": \"V1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/history/timeline")
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 \"subject\": {\n \"type\": \"phone_e164\",\n \"value\": \"+14155550123\"\n },\n \"filters\": {\n \"since\": \"2026-01-01T00:00:00Z\"\n },\n \"limit\": 20,\n \"verification\": \"V1\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d35",
"kind": "episode",
"text": "Customer confirmed the credit and the new visit",
"at": "2026-03-14T12:02:00Z",
"channel": "whatsapp",
"source_id": "0192f79e-11ac-7d42-9f50-8e3f40617c82",
"outcome": "resolved"
},
{
"id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34",
"kind": "episode",
"text": "Technician did not show up · $40 credit on the April bill · settled",
"at": "2026-03-12T14:20:00Z",
"channel": "voice",
"source_id": "0192f79e-11aa-7b20-9f3e-6c1d2e4f5a60",
"outcome": "resolved"
}
],
"next_cursor": "c_01J8ZQ",
"withheld": 1,
"as_of": "2026-09-22T17:07:02Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Histórico
Linha do tempo
Conversas e ações de agentes, do mais recente para o mais antigo, uma linha cada, pelo handle do cliente ou pelo id do perfil, no corpo.
POST
/
v1
/
history
/
timeline
Python
page = niadra.timeline(
phone("+14155550123"),
filters={"since": "2026-01-01T00:00:00Z"},
limit=20,
)
for item in page.items:
print(item.at, item.kind, item.text)const { data: page } = await niadra.timeline({
subject: handles.phone("+14155550123"),
filters: { since: "2026-01-01T00:00:00Z" },
limit: 20,
});
for (const item of page?.items ?? []) console.log(item.at, item.kind, item.text);curl --request POST \
--url https://{space}.{region}.api.niadra.com/v1/history/timeline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject": {
"type": "phone_e164",
"value": "+14155550123"
},
"filters": {
"since": "2026-01-01T00:00:00Z"
},
"limit": 20,
"verification": "V1"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject: {type: 'phone_e164', value: '+14155550123'},
filters: {since: '2026-01-01T00:00:00Z'},
limit: 20,
verification: 'V1'
})
};
fetch('https://{space}.{region}.api.niadra.com/v1/history/timeline', 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/timeline",
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([
'subject' => [
'type' => 'phone_e164',
'value' => '+14155550123'
],
'filters' => [
'since' => '2026-01-01T00:00:00Z'
],
'limit' => 20,
'verification' => 'V1'
]),
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/timeline"
payload := strings.NewReader("{\n \"subject\": {\n \"type\": \"phone_e164\",\n \"value\": \"+14155550123\"\n },\n \"filters\": {\n \"since\": \"2026-01-01T00:00:00Z\"\n },\n \"limit\": 20,\n \"verification\": \"V1\"\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/timeline")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subject\": {\n \"type\": \"phone_e164\",\n \"value\": \"+14155550123\"\n },\n \"filters\": {\n \"since\": \"2026-01-01T00:00:00Z\"\n },\n \"limit\": 20,\n \"verification\": \"V1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/history/timeline")
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 \"subject\": {\n \"type\": \"phone_e164\",\n \"value\": \"+14155550123\"\n },\n \"filters\": {\n \"since\": \"2026-01-01T00:00:00Z\"\n },\n \"limit\": 20,\n \"verification\": \"V1\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d35",
"kind": "episode",
"text": "Customer confirmed the credit and the new visit",
"at": "2026-03-14T12:02:00Z",
"channel": "whatsapp",
"source_id": "0192f79e-11ac-7d42-9f50-8e3f40617c82",
"outcome": "resolved"
},
{
"id": "0192f7a3-7c32-7b0c-9e16-5b8a0f1c2d34",
"kind": "episode",
"text": "Technician did not show up · $40 credit on the April bill · settled",
"at": "2026-03-12T14:20:00Z",
"channel": "voice",
"source_id": "0192f79e-11aa-7b20-9f3e-6c1d2e4f5a60",
"outcome": "resolved"
}
],
"next_cursor": "c_01J8ZQ",
"withheld": 1,
"as_of": "2026-09-22T17:07:02Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Corpo
application/json
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
Uma página.

