API Reference

POST /api/v1/authorize

The core endpoint for requesting authorization. AI agents call this endpoint before performing any sensitive action.

Request

POST/api/v1/authorize
{
  "agent_id": "string",      // Required: Unique identifier for the AI agent
  "action": "string",        // Required: The action the agent wants to perform
  "resource": "string",      // Required: The target resource
  "confidence": 0.85,        // Required: Float between 0.0 and 1.0
  "context": {               // Optional: Additional context for policy evaluation
    "reason": "string",
    "user_id": "string"
  }
}

Response

The response indicates whether the action is allowed, denied, or requires human approval.

Allowed (200 OK)

{
  "status": "allow",
  "request_id": "req_12345abcde"
}

Requires Approval (202 Accepted)

{
  "status": "requires_approval",
  "request_id": "req_67890fghij",
  "message": "Action queued for human review."
}

Denied (403 Forbidden)

{
  "status": "deny",
  "request_id": "req_13579klmno",
  "message": "Confidence score too low for requested action."
}