evaluate-action when your agent has its own HTTP client and you want Sentrail to make the policy decision, but you handle the actual API call yourself. This is useful for custom pipelines, internal APIs, or tools not yet natively proxied.
Base URL: https://<project-ref>.supabase.co/functions/v1/evaluate-action
Required scope: evaluate
Request
Body
| Field | Type | Required | Description |
|---|---|---|---|
tool | string | Yes | One of: github, linear, slack, notion, internal_api, mcp |
action | string | Yes | Action string, e.g. pull_request.create |
riskLevel | string | Yes | low, medium, high, or critical |
agentId | string | No | Agent identifier |
agentName | string | No | Human-readable agent name |
resourceType | string | No | Resource type, e.g. pull_request |
resourceId | string | No | Resource identifier, e.g. owner/repo#42 |
payload | object | No | Action payload (truncated in audit log) |
requestedBy | string | No | Who initiated the action |
Response
| Field | Type | Description |
|---|---|---|
ok | boolean | Always true on 200 |
decision | string | allow, block, or require_approval |
reason | string | Human-readable explanation |
matchedPolicyId | string | null | UUID of the matched policy |
approvalRequestId | string | null | Present when decision = require_approval |
auditLogId | string | UUID of the audit log entry |
correlationId | string | UUID linking this to the full request lifecycle |
Error responses
Status codes
| Code | Meaning |
|---|---|
200 | Evaluation completed (check decision field) |
400 | Invalid request body |
401 | Invalid or expired API key, or missing evaluate scope |
405 | Method not allowed (only POST is accepted) |
500 | Unexpected server error |