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.
POST
/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.
GET
/agentsList all agentsPOST
/agentsRegister new agentGET
/agents/:idGet agent detailsPATCH
/agents/:idUpdate agentDELETE
/agents/:idDelete agentPolicies
Define and manage governance policies.
GET
/policiesList all policiesPOST
/policiesCreate policyGET
/policies/:idGet policy detailsPUT
/policies/:idUpdate policyDELETE
/policies/:idDelete policyPOST
/policies/checkCheck policy complianceBudgets
Manage spending limits and track costs.
GET
/budgetsList all budgetsPOST
/budgetsCreate budgetGET
/budgets/:idGet budget detailsGET
/budgets/:id/statusGet current statusPOST
/budgets/:id/checkCheck if action fitsApprovals
Human-in-the-loop approval workflows.
GET
/approvalsList approval requestsGET
/approvals/:idGet approval detailsPOST
/approvals/:id/approveApprove requestPOST
/approvals/:id/rejectReject requestAudit Logs
Access compliance and audit records.
GET
/audit/logsQuery audit logsGET
/audit/receipts/:idGet compliance receiptPOST
/audit/exportExport audit dataRate Limits: Default rate limit is 1000 requests per minute. Contact us for higher limits.