API Reference
API Endpoints
Complete reference for the Tork Governance REST API.
Base URL
All API requests are made to the following base URL:
RESTful
Standard REST conventions
Authenticated
API key required
Rate Limited
1000 req/min default
Authentication
Include your API key in the Authorization header:
Governance
Scan and redact PII from AI agent content in real-time.
/governScan content for PIIRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The text content to scan for PII (max 100KB) |
options.mode | string | No | Action mode: "detect", "redact" (default), or "deny" |
region | string[] | No | Regional PII profiles to activate (e.g. ["AU", "AE"]) |
industry | string | No | Industry profile to activate (e.g. "healthcare", "finance", "legal") |
Available Regions: AU, AE, BR, CN, DE, FR, GB, IN, JP, KR, NG, ZA. Each region activates country-specific PII patterns like Aadhaar (IN), Emirates ID (AE), CPF (BR), and more.
Response
| Field | Type | Description |
|---|---|---|
action | string | "allow", "redact", or "deny" |
output | string | Redacted content (or original if no PII found) |
pii_detected | array | Array of { type, count } for each PII type found. Includes regional types (e.g. "emirates_id", "aadhaar", "cpf") when region profiles are active |
latency_ms | number | Processing time in milliseconds |
receipt | object | Compliance receipt with receipt_id, timestamp, content_hash, hmac_signature, and fingerprint |
governance_dna | object | Governance DNA with fingerprint, risk level, score, and applied policies |
usage | object | Usage counters: calls_used, calls_limit, calls_remaining |
Example: Basic Scan
Example: Regional Detection
Agents
Manage AI agent registrations and configurations.
/agentsList all agents/agentsRegister new agent/agents/:idGet agent details/agents/:idUpdate agent/agents/:idDelete agentPolicies
Define and manage governance policies.
/policiesList all policies/policiesCreate policy/policies/:idGet policy details/policies/:idUpdate policy/policies/:idDelete policy/policies/checkCheck policy compliancePolicy Envelopes
Receive a Tork Tower governance envelope (schema_version 2). The envelope is stored byte-exact and hashed with SHA-256 over the raw request body, so a later compliance receipt covers exactly what was sent. Separate from /policies, which is the YAML policy store.
/policy-envelopesSubmit a governance envelope(tool_id, policy_version) identifies one version. Re-submitting identical bytes returns 200 with the existing record and writes nothing. Submitting different bytes under the same version returns 409 — a stored envelope is never overwritten, because a receipt may already cover it. Publish a new policy_version instead.
Send the envelope as raw JSON (--data-binary). The hash covers the exact bytes you transmit, so reformatting the document changes content_hash.
Budgets
Manage spending limits and track costs.
/budgetsList all budgets/budgetsCreate budget/budgets/:idGet budget details/budgets/:id/statusGet current status/budgets/:id/checkCheck if action fitsApprovals
Human-in-the-loop approval workflows.
/approvalsList approval requests/approvals/:idGet approval details/approvals/:id/approveApprove request/approvals/:id/rejectReject requestAudit Logs
Access compliance and audit records.
/audit/logsQuery audit logs/audit/receipts/:idGet compliance receipt/audit/exportExport audit dataRate Limits: Default rate limit is 1000 requests per minute. Contact us for higher limits.