Documentation Index
Fetch the complete documentation index at: https://docs.meshai.dev/llms.txt
Use this file to discover all available pages before exploring further.
Audit Trail
List Audit Events
GET /governance/audit-trail
| Parameter | Type | Description |
|---|
event_type | string | Filter by type (e.g., agent.registered, policy.violated) |
target_id | string | Filter by target entity ID |
from | string | Start date (ISO 8601) |
to | string | End date (ISO 8601) |
page | integer | Page number |
limit | integer | Results per page |
curl "https://api.meshai.dev/governance/audit-trail?event_type=policy.violated&limit=50" \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": [
{
"id": "evt_abc123",
"event_type": "policy.violated",
"actor": "agt_xyz789",
"target_id": "pol_def456",
"target_type": "policy",
"details": {
"policy_name": "production-model-allowlist",
"violation": "Model gpt-3.5-turbo is not in the allowed list"
},
"timestamp": "2026-03-17T10:00:00Z"
}
],
"meta": { "total": 15, "page": 1, "limit": 50 }
}
Export Audit Events
GET /governance/audit-trail/export
| Parameter | Type | Description |
|---|
format | string | csv or json |
from | string | Start date (ISO 8601) |
to | string | End date (ISO 8601) |
event_type | string | Filter by type |
curl "https://api.meshai.dev/governance/audit-trail/export?format=csv&from=2026-01-01" \
-H "Authorization: Bearer msh_YOUR_API_KEY" \
-o audit-trail.csv
Risk Classification
Get Classification
GET /agents/{agent_id}/risk-classification
curl https://api.meshai.dev/agents/agt_abc123/risk-classification \
-H "Authorization: Bearer msh_YOUR_API_KEY"
Classify Agent
POST /agents/{agent_id}/risk-classification
curl -X POST https://api.meshai.dev/agents/agt_abc123/risk-classification \
-H "Authorization: Bearer msh_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"risk_level": "high",
"justification": "Agent processes employee performance data"
}'
Get AI Suggestion
GET /agents/{agent_id}/risk-classification/suggest
curl https://api.meshai.dev/agents/agt_abc123/risk-classification/suggest \
-H "Authorization: Bearer msh_YOUR_API_KEY"
Policies
List Policies
curl https://api.meshai.dev/governance/policies \
-H "Authorization: Bearer msh_YOUR_API_KEY"
Create Policy
POST /governance/policies
curl -X POST https://api.meshai.dev/governance/policies \
-H "Authorization: Bearer msh_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "production-model-allowlist",
"policy_type": "model_allowlist",
"config": { "allowed_models": ["gpt-4o", "claude-sonnet-4-20250514"] },
"scope": "global",
"enabled": true
}'
Policy types: model_allowlist, block_provider, require_approval, budget_limit, rate_limit, require_human_review. See Policies for config details.
Get Policy
GET /governance/policies/{policy_id}
Update Policy
PATCH /governance/policies/{policy_id}
curl -X PATCH https://api.meshai.dev/governance/policies/pol_abc123 \
-H "Authorization: Bearer msh_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "enabled": false }'
Delete Policy
DELETE /governance/policies/{policy_id}
curl -X DELETE https://api.meshai.dev/governance/policies/pol_abc123 \
-H "Authorization: Bearer msh_YOUR_API_KEY"
Approvals
List Approvals
GET /governance/approvals
| Parameter | Type | Description |
|---|
status | string | pending, approved, denied, expired |
agent_id | string | Filter by agent |
page | integer | Page number |
limit | integer | Results per page |
curl "https://api.meshai.dev/governance/approvals?status=pending" \
-H "Authorization: Bearer msh_YOUR_API_KEY"
Decide Approval
POST /governance/approvals/{approval_id}/decide
curl -X POST https://api.meshai.dev/governance/approvals/apr_abc123/decide \
-H "Authorization: Bearer msh_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"decision": "approved",
"reason": "Agent configuration verified"
}'
The decision field must be approved or denied.