Skip to main content

Policies API

API endpoints for policy rule management, validation, testing, and approval workflows. Base Path: /api/policies
Code Reference: app/api/policy_editor_routes.py

Policy Management

List Policies

List all policies with optional filters. Query Parameters:
  • category: Filter by category
  • status: Filter by status
  • created_by: Filter by creator ID
  • limit: Maximum results (default: 100)
  • offset: Pagination offset
Response: List of policies with metadata

Create Policy

Create a new policy rule. Request Body:
Response: Created policy with ID

Update Policy

Update an existing policy. Request Body:
Response: Updated policy

Delete Policy

Delete a policy (soft delete). Response: Deletion confirmation

Policy Validation

Validate Policy YAML

Validate policy YAML syntax and structure. Request Body:
Response: Validation result with errors (if any)

Policy Testing

Test Policy

Test a policy with sample transactions. Request Body:
Response: Test results with actual vs expected decisions

Policy Approval

Approve Policy

Approve a policy for production use. Request Body:
Response: Approval confirmation

Reject Policy

Reject a policy with reason. Request Body:
Response: Rejection confirmation

Additional Resources


Last Updated: 2026-01-14
Code Reference: app/api/policy_editor_routes.py