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

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

POST /v1/policies

Create a new policy.
Requires an API key with admin scope.
string
required
UUID of the agent this policy applies to. The agent must exist in your workspace.
string
required
Descriptive name for the policy. Must be between 1 and 255 characters.
PolicyRule[]
required
Array of policy rules. Minimum 1, maximum 50. See the policy object above for the PolicyRule schema.
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.
boolean
default:"true"
Whether the policy is active immediately on creation.
Returns the created policy object with HTTP 201.

GET /v1/policies

List policies in your workspace.
string
Filter by agent UUID. Returns only policies attached to this agent.
number
default:"100"
Maximum number of policies to return. Must be between 1 and 200.
number
default:"0"
Number of policies to skip.
Returns a paginated envelope with an array of policy objects.

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.

PATCH /v1/policies/:id

Update an existing policy. All fields are optional.
Requires an API key with admin scope.
string
New name for the policy.
PolicyRule[]
Replacement rule set. When provided, replaces the entire rules array. Minimum 1, maximum 50.
number
New priority value. Integer between 0 and 1,000.
boolean
Enable or disable the policy. Disabled policies are skipped during evaluation.
Returns the updated policy object.

DELETE /v1/policies/:id

Permanently delete a policy.
Requires an API key with admin scope.
Returns 204 No Content on success.