curl --request POST \
--url https://api.meshqu.com/v1/decisions/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-MeshQu-Tenant-Id: <api-key>' \
--data '
{
"context": {
"decision_type": "<string>",
"fields": {},
"evidence": [
{
"kind": "<string>",
"ref": "<string>",
"hash": "<string>",
"data": {}
}
],
"metadata": {
"actor_id": "<string>",
"correlation_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
},
"options": {
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluation_time": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.meshqu.com/v1/decisions/evaluate"
payload = {
"context": {
"decision_type": "<string>",
"fields": {},
"evidence": [
{
"kind": "<string>",
"ref": "<string>",
"hash": "<string>",
"data": {}
}
],
"metadata": {
"actor_id": "<string>",
"correlation_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
},
"options": {
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluation_time": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"X-MeshQu-Tenant-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-MeshQu-Tenant-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
context: {
decision_type: '<string>',
fields: {},
evidence: [{kind: '<string>', ref: '<string>', hash: '<string>', data: {}}],
metadata: {
actor_id: '<string>',
correlation_id: '<string>',
ip_address: '<string>',
user_agent: '<string>',
timestamp: '2023-11-07T05:31:56Z'
}
},
options: {
snapshot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
evaluation_time: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.meshqu.com/v1/decisions/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.meshqu.com/v1/decisions/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([
'context' => [
'decision_type' => '<string>',
'fields' => [
],
'evidence' => [
[
'kind' => '<string>',
'ref' => '<string>',
'hash' => '<string>',
'data' => [
]
]
],
'metadata' => [
'actor_id' => '<string>',
'correlation_id' => '<string>',
'ip_address' => '<string>',
'user_agent' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z'
]
],
'options' => [
'snapshot_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'evaluation_time' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-MeshQu-Tenant-Id: <api-key>"
],
]);
$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.meshqu.com/v1/decisions/evaluate"
payload := strings.NewReader("{\n \"context\": {\n \"decision_type\": \"<string>\",\n \"fields\": {},\n \"evidence\": [\n {\n \"kind\": \"<string>\",\n \"ref\": \"<string>\",\n \"hash\": \"<string>\",\n \"data\": {}\n }\n ],\n \"metadata\": {\n \"actor_id\": \"<string>\",\n \"correlation_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"options\": {\n \"snapshot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evaluation_time\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-MeshQu-Tenant-Id", "<api-key>")
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.meshqu.com/v1/decisions/evaluate")
.header("Authorization", "Bearer <token>")
.header("X-MeshQu-Tenant-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"decision_type\": \"<string>\",\n \"fields\": {},\n \"evidence\": [\n {\n \"kind\": \"<string>\",\n \"ref\": \"<string>\",\n \"hash\": \"<string>\",\n \"data\": {}\n }\n ],\n \"metadata\": {\n \"actor_id\": \"<string>\",\n \"correlation_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"options\": {\n \"snapshot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evaluation_time\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meshqu.com/v1/decisions/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-MeshQu-Tenant-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"decision_type\": \"<string>\",\n \"fields\": {},\n \"evidence\": [\n {\n \"kind\": \"<string>\",\n \"ref\": \"<string>\",\n \"hash\": \"<string>\",\n \"data\": {}\n }\n ],\n \"metadata\": {\n \"actor_id\": \"<string>\",\n \"correlation_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"options\": {\n \"snapshot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evaluation_time\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"decision": "ALLOW",
"violations": [
{
"rule_code": "<string>",
"severity": "low",
"reason": "<string>",
"reason_code": "FIELD_MISSING",
"field": "<string>",
"actual_value": "<unknown>",
"expected_value": "<unknown>",
"details": {},
"policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_shadow": true
}
],
"rules_evaluated": 123,
"evaluation_time_ms": 123,
"timestamp": "2023-11-07T05:31:56Z",
"policy_snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluated_rules_hash": "<string>",
"integrity_hash": "<string>",
"transparency_anchor": {
"provider": "<string>",
"entry_uuid": "<string>",
"log_index": 123,
"inclusion_proof": {
"hashes": [
"<string>"
],
"log_index": 123,
"root_hash": "<string>",
"tree_size": 123
},
"anchored_at": "2023-11-07T05:31:56Z",
"rekor_public_url": "<string>"
},
"action": {
"type": "<string>",
"reference_id": "<string>",
"metadata": {}
},
"rules_na": 123,
"na_rules": [
{
"rule_code": "<string>",
"when": "<unknown>",
"reason": "<string>"
}
],
"signature": "<string>",
"signature_kid": "<string>",
"signature_algorithm": "<string>",
"receipt_schema_version": 1,
"policy_snapshot_digest": "<string>",
"evidence_manifest_digest": "<string>",
"shadow_converted": true,
"original_decision": "ALLOW"
},
"snapshot": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hash": "<string>",
"rules_count": 123,
"policies_count": 123,
"cached": true
},
"duration_ms": 123,
"shadow_mode": {
"enabled": true,
"original_decision": "DENY"
},
"governance_source": {
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_name": "<string>",
"level": 1
},
"timing": {
"total_ms": 123,
"snapshot_resolve_ms": 123,
"engine_evaluate_ms": 123,
"source": "cache"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}Evaluate policies (dry-run)
Evaluates policies against a decision context without persisting.
Returns:
- decision: ALLOW, DENY, REVIEW, or ALERT
- violations: Rule violations with details
- integrity_hash: Cryptographic proof of evaluation
- snapshot: Policy state used
Use POST /v1/decisions/record to evaluate AND persist.
curl --request POST \
--url https://api.meshqu.com/v1/decisions/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-MeshQu-Tenant-Id: <api-key>' \
--data '
{
"context": {
"decision_type": "<string>",
"fields": {},
"evidence": [
{
"kind": "<string>",
"ref": "<string>",
"hash": "<string>",
"data": {}
}
],
"metadata": {
"actor_id": "<string>",
"correlation_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
},
"options": {
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluation_time": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://api.meshqu.com/v1/decisions/evaluate"
payload = {
"context": {
"decision_type": "<string>",
"fields": {},
"evidence": [
{
"kind": "<string>",
"ref": "<string>",
"hash": "<string>",
"data": {}
}
],
"metadata": {
"actor_id": "<string>",
"correlation_id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
},
"options": {
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluation_time": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"X-MeshQu-Tenant-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-MeshQu-Tenant-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
context: {
decision_type: '<string>',
fields: {},
evidence: [{kind: '<string>', ref: '<string>', hash: '<string>', data: {}}],
metadata: {
actor_id: '<string>',
correlation_id: '<string>',
ip_address: '<string>',
user_agent: '<string>',
timestamp: '2023-11-07T05:31:56Z'
}
},
options: {
snapshot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
evaluation_time: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://api.meshqu.com/v1/decisions/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.meshqu.com/v1/decisions/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([
'context' => [
'decision_type' => '<string>',
'fields' => [
],
'evidence' => [
[
'kind' => '<string>',
'ref' => '<string>',
'hash' => '<string>',
'data' => [
]
]
],
'metadata' => [
'actor_id' => '<string>',
'correlation_id' => '<string>',
'ip_address' => '<string>',
'user_agent' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z'
]
],
'options' => [
'snapshot_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'evaluation_time' => '2023-11-07T05:31:56Z'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-MeshQu-Tenant-Id: <api-key>"
],
]);
$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.meshqu.com/v1/decisions/evaluate"
payload := strings.NewReader("{\n \"context\": {\n \"decision_type\": \"<string>\",\n \"fields\": {},\n \"evidence\": [\n {\n \"kind\": \"<string>\",\n \"ref\": \"<string>\",\n \"hash\": \"<string>\",\n \"data\": {}\n }\n ],\n \"metadata\": {\n \"actor_id\": \"<string>\",\n \"correlation_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"options\": {\n \"snapshot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evaluation_time\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-MeshQu-Tenant-Id", "<api-key>")
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.meshqu.com/v1/decisions/evaluate")
.header("Authorization", "Bearer <token>")
.header("X-MeshQu-Tenant-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"decision_type\": \"<string>\",\n \"fields\": {},\n \"evidence\": [\n {\n \"kind\": \"<string>\",\n \"ref\": \"<string>\",\n \"hash\": \"<string>\",\n \"data\": {}\n }\n ],\n \"metadata\": {\n \"actor_id\": \"<string>\",\n \"correlation_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"options\": {\n \"snapshot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evaluation_time\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meshqu.com/v1/decisions/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-MeshQu-Tenant-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"decision_type\": \"<string>\",\n \"fields\": {},\n \"evidence\": [\n {\n \"kind\": \"<string>\",\n \"ref\": \"<string>\",\n \"hash\": \"<string>\",\n \"data\": {}\n }\n ],\n \"metadata\": {\n \"actor_id\": \"<string>\",\n \"correlation_id\": \"<string>\",\n \"ip_address\": \"<string>\",\n \"user_agent\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"options\": {\n \"snapshot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"evaluation_time\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"result": {
"decision": "ALLOW",
"violations": [
{
"rule_code": "<string>",
"severity": "low",
"reason": "<string>",
"reason_code": "FIELD_MISSING",
"field": "<string>",
"actual_value": "<unknown>",
"expected_value": "<unknown>",
"details": {},
"policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_shadow": true
}
],
"rules_evaluated": 123,
"evaluation_time_ms": 123,
"timestamp": "2023-11-07T05:31:56Z",
"policy_snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluated_rules_hash": "<string>",
"integrity_hash": "<string>",
"transparency_anchor": {
"provider": "<string>",
"entry_uuid": "<string>",
"log_index": 123,
"inclusion_proof": {
"hashes": [
"<string>"
],
"log_index": 123,
"root_hash": "<string>",
"tree_size": 123
},
"anchored_at": "2023-11-07T05:31:56Z",
"rekor_public_url": "<string>"
},
"action": {
"type": "<string>",
"reference_id": "<string>",
"metadata": {}
},
"rules_na": 123,
"na_rules": [
{
"rule_code": "<string>",
"when": "<unknown>",
"reason": "<string>"
}
],
"signature": "<string>",
"signature_kid": "<string>",
"signature_algorithm": "<string>",
"receipt_schema_version": 1,
"policy_snapshot_digest": "<string>",
"evidence_manifest_digest": "<string>",
"shadow_converted": true,
"original_decision": "ALLOW"
},
"snapshot": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"hash": "<string>",
"rules_count": 123,
"policies_count": 123,
"cached": true
},
"duration_ms": 123,
"shadow_mode": {
"enabled": true,
"original_decision": "DENY"
},
"governance_source": {
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_name": "<string>",
"level": 1
},
"timing": {
"total_ms": 123,
"snapshot_resolve_ms": 123,
"engine_evaluate_ms": 123,
"source": "cache"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}Authorizations
MeshQu API key passed as a bearer token: Authorization: Bearer mqu_…. Mint one in the console (Settings → API keys).
Tenant UUID for multi-tenant isolation. Required on all authenticated routes — validated before authentication (middleware/tenant.ts), so a missing or non-UUID header returns 400 (MISSING_TENANT_ID / INVALID_TENANT_ID) before the API key is checked.
Body
Request to evaluate policies against a decision context
Response
Response from policy evaluation endpoint
Response from policy evaluation endpoint
Result of a policy evaluation
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Total request duration in milliseconds
Show child attributes
Show child attributes
Attribution of which tenant policies governed this decision
Show child attributes
Show child attributes
Per-phase timing breakdown for the evaluation
Show child attributes
Show child attributes