curl --request POST \
--url https://api.visiqlabs.com/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
"action"
],
"agent_id": "billing-copilot",
"target_app": "stripe",
"action": "refund.create",
"context": {
"amount_cents": 5000
}
}
'import requests
url = "https://api.visiqlabs.com/evaluate"
payload = {
"operations": ["action"],
"agent_id": "billing-copilot",
"target_app": "stripe",
"action": "refund.create",
"context": { "amount_cents": 5000 }
}
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({
operations: ['action'],
agent_id: 'billing-copilot',
target_app: 'stripe',
action: 'refund.create',
context: {amount_cents: 5000}
})
};
fetch('https://api.visiqlabs.com/evaluate', 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/evaluate",
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([
'operations' => [
'action'
],
'agent_id' => 'billing-copilot',
'target_app' => 'stripe',
'action' => 'refund.create',
'context' => [
'amount_cents' => 5000
]
]),
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/evaluate"
payload := strings.NewReader("{\n \"operations\": [\n \"action\"\n ],\n \"agent_id\": \"billing-copilot\",\n \"target_app\": \"stripe\",\n \"action\": \"refund.create\",\n \"context\": {\n \"amount_cents\": 5000\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/evaluate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n \"action\"\n ],\n \"agent_id\": \"billing-copilot\",\n \"target_app\": \"stripe\",\n \"action\": \"refund.create\",\n \"context\": {\n \"amount_cents\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/evaluate")
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 \"operations\": [\n \"action\"\n ],\n \"agent_id\": \"billing-copilot\",\n \"target_app\": \"stripe\",\n \"action\": \"refund.create\",\n \"context\": {\n \"amount_cents\": 5000\n }\n}"
response = http.request(request)
puts response.read_body{
"operations": [
"action"
],
"decision": "permit",
"plane_decision": "permit",
"reason": "Within policy",
"reason_code": null,
"rule_code": "R-1042",
"enforced": true,
"agent_mode": "enforce"
}{
"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."
}Evaluate a governed event (unified)
The single, operation-native evaluation endpoint. Declare which operations the event performs via operations[] and receive the union decision vocabulary. Hybrid events (e.g. ["retrieval","action"]) are evaluated on both facets and combined fail-closed to the most restrictive outcome. A legacy { kind: "action" | "retrieval", ... } shape is also accepted for compatibility.
Requires scope rules:evaluate (dual-accepts the legacy allow:write / recall:write).
curl --request POST \
--url https://api.visiqlabs.com/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operations": [
"action"
],
"agent_id": "billing-copilot",
"target_app": "stripe",
"action": "refund.create",
"context": {
"amount_cents": 5000
}
}
'import requests
url = "https://api.visiqlabs.com/evaluate"
payload = {
"operations": ["action"],
"agent_id": "billing-copilot",
"target_app": "stripe",
"action": "refund.create",
"context": { "amount_cents": 5000 }
}
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({
operations: ['action'],
agent_id: 'billing-copilot',
target_app: 'stripe',
action: 'refund.create',
context: {amount_cents: 5000}
})
};
fetch('https://api.visiqlabs.com/evaluate', 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/evaluate",
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([
'operations' => [
'action'
],
'agent_id' => 'billing-copilot',
'target_app' => 'stripe',
'action' => 'refund.create',
'context' => [
'amount_cents' => 5000
]
]),
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/evaluate"
payload := strings.NewReader("{\n \"operations\": [\n \"action\"\n ],\n \"agent_id\": \"billing-copilot\",\n \"target_app\": \"stripe\",\n \"action\": \"refund.create\",\n \"context\": {\n \"amount_cents\": 5000\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/evaluate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"operations\": [\n \"action\"\n ],\n \"agent_id\": \"billing-copilot\",\n \"target_app\": \"stripe\",\n \"action\": \"refund.create\",\n \"context\": {\n \"amount_cents\": 5000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/evaluate")
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 \"operations\": [\n \"action\"\n ],\n \"agent_id\": \"billing-copilot\",\n \"target_app\": \"stripe\",\n \"action\": \"refund.create\",\n \"context\": {\n \"amount_cents\": 5000\n }\n}"
response = http.request(request)
puts response.read_body{
"operations": [
"action"
],
"decision": "permit",
"plane_decision": "permit",
"reason": "Within policy",
"reason_code": null,
"rule_code": "R-1042",
"enforced": true,
"agent_mode": "enforce"
}{
"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
The operation-native request. Include action fields (target_app, action) when operations contains action or delegation; include retrieval fields (resource_type, ...) when it contains retrieval. A legacy { kind: "action" | "retrieval", ... } body is also accepted.
1 - 3 elementsaction, retrieval, delegation 1 - 2551 - 2551 - 255retrieve, tool_call, prompt_render 1 - 255641284000Response
The unified decision. results[] is present for hybrid events.
For single-facet events the top-level fields carry the projected decision. For hybrid events, decision is the most-restrictive outcome and results[] carries the per-operation breakdown.
action, retrieval, delegation permit, deny, approval_required, redact, escalate, mask The originating facet's verbatim decision word (single-facet responses).
off, monitor, enforce, null Present for hybrid events, with one entry per evaluated operation.
Show child attributes
Show child attributes