Skip to main content
Policies define what an agent is allowed to do. Each policy is attached to a single agent and contains one or more rules. When /v1/authorize is called, Veto evaluates all enabled policies for the agent in priority order and returns the first matching decision.

The policy object

id
string
UUID uniquely identifying the policy.
agentId
string
UUID of the agent this policy applies to.
name
string
Human-readable name for the policy.
rules
PolicyRule[]
Array of rules. At least one rule is required. Maximum 50 rules per policy.
priority
number
Evaluation order. Higher values are evaluated first. Defaults to 0.
enabled
boolean
Whether this policy is active. Disabled policies are skipped during evaluation.
createdAt
string
ISO 8601 timestamp of creation.
updatedAt
string
ISO 8601 timestamp of the last update.

POST /v1/policies

Create a new policy.
Requires an API key with admin scope.
agent_id
string
required
UUID of the agent this policy applies to. The agent must exist in your workspace.
name
string
required
Descriptive name for the policy. Must be between 1 and 255 characters.
rules
PolicyRule[]
required
Array of policy rules. Minimum 1, maximum 50. See the policy object above for the PolicyRule schema.
priority
number
default:"0"
Evaluation order relative to other policies for this agent. Higher values are evaluated first. Must be an integer between 0 and 1,000.
enabled
boolean
default:"true"
Whether the policy is active immediately on creation.
Returns the created policy object with HTTP 201.
curl -X POST https://api.veto.tools/v1/policies \
  -H "Authorization: Bearer veto_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Allow file reads with rate limit",
    "priority": 10,
    "rules": [
      {
        "type": "tool_allowlist",
        "tools": ["file.read", "file.list"]
      },
      {
        "type": "rate_limit",
        "tools": ["file.read"],
        "rateLimit": { "maxCalls": 1000, "windowSeconds": 3600 }
      }
    ]
  }'
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "agentId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Allow file reads with rate limit",
  "priority": 10,
  "enabled": true,
  "rules": [
    {
      "type": "tool_allowlist",
      "tools": ["file.read", "file.list"]
    },
    {
      "type": "rate_limit",
      "tools": ["file.read"],
      "rateLimit": { "maxCalls": 1000, "windowSeconds": 3600 }
    }
  ],
  "createdAt": "2026-01-15T10:00:00.000Z",
  "updatedAt": "2026-01-15T10:00:00.000Z"
}

GET /v1/policies

List policies in your workspace.
agent_id
string
Filter by agent UUID. Returns only policies attached to this agent.
limit
number
default:"100"
Maximum number of policies to return. Must be between 1 and 200.
offset
number
default:"0"
Number of policies to skip.
Returns a paginated envelope with an array of policy objects.
curl "https://api.veto.tools/v1/policies?agent_id=550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer veto_..."

GET /v1/policies/:id

Retrieve a single policy by UUID. Returns the policy object, or 404 with POLICY_NOT_FOUND if it does not exist in your workspace.
curl https://api.veto.tools/v1/policies/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
  -H "Authorization: Bearer veto_..."

PATCH /v1/policies/:id

Update an existing policy. All fields are optional.
Requires an API key with admin scope.
name
string
New name for the policy.
rules
PolicyRule[]
Replacement rule set. When provided, replaces the entire rules array. Minimum 1, maximum 50.
priority
number
New priority value. Integer between 0 and 1,000.
enabled
boolean
Enable or disable the policy. Disabled policies are skipped during evaluation.
Returns the updated policy object.
curl -X PATCH https://api.veto.tools/v1/policies/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
  -H "Authorization: Bearer veto_..." \
  -H "Content-Type: application/json" \
  -d '{ "enabled": false }'

DELETE /v1/policies/:id

Permanently delete a policy.
Requires an API key with admin scope.
Returns 204 No Content on success.
curl -X DELETE https://api.veto.tools/v1/policies/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
  -H "Authorization: Bearer veto_..."