Ingest cognition beats
curl --request POST \
--url https://api.visiqlabs.com/allow/cognition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session": {
"session_id": "sess-42",
"root_agent_id": "billing-copilot"
},
"beats": [
{
"clientEventId": "beat-1",
"agentId": "billing-copilot",
"sessionId": "sess-42",
"seq": 0,
"ts": 1789560000000,
"kind": "thought",
"content": {
"text": "Checking the refund policy first."
}
}
]
}
'import requests
url = "https://api.visiqlabs.com/allow/cognition"
payload = {
"session": {
"session_id": "sess-42",
"root_agent_id": "billing-copilot"
},
"beats": [
{
"clientEventId": "beat-1",
"agentId": "billing-copilot",
"sessionId": "sess-42",
"seq": 0,
"ts": 1789560000000,
"kind": "thought",
"content": { "text": "Checking the refund policy first." }
}
]
}
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({
session: {session_id: 'sess-42', root_agent_id: 'billing-copilot'},
beats: [
{
clientEventId: 'beat-1',
agentId: 'billing-copilot',
sessionId: 'sess-42',
seq: 0,
ts: 1789560000000,
kind: 'thought',
content: {text: 'Checking the refund policy first.'}
}
]
})
};
fetch('https://api.visiqlabs.com/allow/cognition', 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://api.visiqlabs.com/allow/cognition",
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([
'session' => [
'session_id' => 'sess-42',
'root_agent_id' => 'billing-copilot'
],
'beats' => [
[
'clientEventId' => 'beat-1',
'agentId' => 'billing-copilot',
'sessionId' => 'sess-42',
'seq' => 0,
'ts' => 1789560000000,
'kind' => 'thought',
'content' => [
'text' => 'Checking the refund policy first.'
]
]
]
]),
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://api.visiqlabs.com/allow/cognition"
payload := strings.NewReader("{\n \"session\": {\n \"session_id\": \"sess-42\",\n \"root_agent_id\": \"billing-copilot\"\n },\n \"beats\": [\n {\n \"clientEventId\": \"beat-1\",\n \"agentId\": \"billing-copilot\",\n \"sessionId\": \"sess-42\",\n \"seq\": 0,\n \"ts\": 1789560000000,\n \"kind\": \"thought\",\n \"content\": {\n \"text\": \"Checking the refund policy first.\"\n }\n }\n ]\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://api.visiqlabs.com/allow/cognition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session\": {\n \"session_id\": \"sess-42\",\n \"root_agent_id\": \"billing-copilot\"\n },\n \"beats\": [\n {\n \"clientEventId\": \"beat-1\",\n \"agentId\": \"billing-copilot\",\n \"sessionId\": \"sess-42\",\n \"seq\": 0,\n \"ts\": 1789560000000,\n \"kind\": \"thought\",\n \"content\": {\n \"text\": \"Checking the refund policy first.\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/cognition")
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 \"session\": {\n \"session_id\": \"sess-42\",\n \"root_agent_id\": \"billing-copilot\"\n },\n \"beats\": [\n {\n \"clientEventId\": \"beat-1\",\n \"agentId\": \"billing-copilot\",\n \"sessionId\": \"sess-42\",\n \"seq\": 0,\n \"ts\": 1789560000000,\n \"kind\": \"thought\",\n \"content\": {\n \"text\": \"Checking the refund policy first.\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"received": 1,
"dropped": 0,
"rejected": []
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Cognition
Ingest cognition beats
The wrapped harness batch-ships Agent Cortex cognition beats here. Capture is off by default and is re-checked on the server: beats for an agent with capture off are counted in dropped and not stored. Beats are validated one by one, like decision telemetry. Raw content is encrypted at rest. Accepted batches return 202.
POST
/
allow
/
cognition
Ingest cognition beats
curl --request POST \
--url https://api.visiqlabs.com/allow/cognition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session": {
"session_id": "sess-42",
"root_agent_id": "billing-copilot"
},
"beats": [
{
"clientEventId": "beat-1",
"agentId": "billing-copilot",
"sessionId": "sess-42",
"seq": 0,
"ts": 1789560000000,
"kind": "thought",
"content": {
"text": "Checking the refund policy first."
}
}
]
}
'import requests
url = "https://api.visiqlabs.com/allow/cognition"
payload = {
"session": {
"session_id": "sess-42",
"root_agent_id": "billing-copilot"
},
"beats": [
{
"clientEventId": "beat-1",
"agentId": "billing-copilot",
"sessionId": "sess-42",
"seq": 0,
"ts": 1789560000000,
"kind": "thought",
"content": { "text": "Checking the refund policy first." }
}
]
}
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({
session: {session_id: 'sess-42', root_agent_id: 'billing-copilot'},
beats: [
{
clientEventId: 'beat-1',
agentId: 'billing-copilot',
sessionId: 'sess-42',
seq: 0,
ts: 1789560000000,
kind: 'thought',
content: {text: 'Checking the refund policy first.'}
}
]
})
};
fetch('https://api.visiqlabs.com/allow/cognition', 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://api.visiqlabs.com/allow/cognition",
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([
'session' => [
'session_id' => 'sess-42',
'root_agent_id' => 'billing-copilot'
],
'beats' => [
[
'clientEventId' => 'beat-1',
'agentId' => 'billing-copilot',
'sessionId' => 'sess-42',
'seq' => 0,
'ts' => 1789560000000,
'kind' => 'thought',
'content' => [
'text' => 'Checking the refund policy first.'
]
]
]
]),
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://api.visiqlabs.com/allow/cognition"
payload := strings.NewReader("{\n \"session\": {\n \"session_id\": \"sess-42\",\n \"root_agent_id\": \"billing-copilot\"\n },\n \"beats\": [\n {\n \"clientEventId\": \"beat-1\",\n \"agentId\": \"billing-copilot\",\n \"sessionId\": \"sess-42\",\n \"seq\": 0,\n \"ts\": 1789560000000,\n \"kind\": \"thought\",\n \"content\": {\n \"text\": \"Checking the refund policy first.\"\n }\n }\n ]\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://api.visiqlabs.com/allow/cognition")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session\": {\n \"session_id\": \"sess-42\",\n \"root_agent_id\": \"billing-copilot\"\n },\n \"beats\": [\n {\n \"clientEventId\": \"beat-1\",\n \"agentId\": \"billing-copilot\",\n \"sessionId\": \"sess-42\",\n \"seq\": 0,\n \"ts\": 1789560000000,\n \"kind\": \"thought\",\n \"content\": {\n \"text\": \"Checking the refund policy first.\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/allow/cognition")
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 \"session\": {\n \"session_id\": \"sess-42\",\n \"root_agent_id\": \"billing-copilot\"\n },\n \"beats\": [\n {\n \"clientEventId\": \"beat-1\",\n \"agentId\": \"billing-copilot\",\n \"sessionId\": \"sess-42\",\n \"seq\": 0,\n \"ts\": 1789560000000,\n \"kind\": \"thought\",\n \"content\": {\n \"text\": \"Checking the refund policy first.\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"received": 1,
"dropped": 0,
"rejected": []
}{
"error": "Invalid request body",
"code": "invalid_request",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized",
"code": "unauthenticated"
}{
"error": "insufficient_scope",
"code": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}{
"error": "rate_limiter_unavailable",
"code": "rate_limiter_unavailable",
"detail": "Rate limiter unavailable, please retry."
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint harness keys under Settings → Harness Keys and API keys under Settings → API Keys in the dashboard.
Body
application/json