Skip to main content
PUT
Update a rule

Authorizations

Authorization
string
header
required

A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint harness keys under Settings → Harness Keys and API keys under Settings → API Keys in the dashboard.

Headers

Idempotency-Key
string

Optional. Makes this write safe to retry: a repeat with the same key, method, path (including its query string) and body within 24 hours returns the stored response with X-Idempotent-Replayed: true instead of running again. Reusing the key with a different request is a 422; a repeat while the first is still running is a 409, until the first request's 2-minute processing lease expires, after which the repeat runs. See REST conventions.

Required string length: 1 - 256
Pattern: ^[A-Za-z0-9_-]+$
X-Idempotency-Key
string

The legacy spelling of Idempotency-Key, accepted with the same behaviour. Sending both with different values is a 400.

Required string length: 1 - 256
Pattern: ^[A-Za-z0-9_-]+$

Path Parameters

id
string<uuid>
required

The rule UUID.

Body

application/json
operations
enum<string>[]

The operations the rule governs, stored as applies_to. The list must include action or retrieval; delegation is only an additional tag, and a delegation-only list is refused with 400.

Required array length: 1 - 3 elements
Available options:
action,
retrieval,
delegation
name
string
Required string length: 1 - 255
description
string
Maximum string length: 1000
rego_source
string
Required string length: 1 - 100000
natural_language
string
Maximum string length: 2000
priority
integer
enabled
boolean
target_app
string | null
Maximum string length: 255
action_pattern
string | null
Maximum string length: 255
trust_tier
string | null
Maximum string length: 64
surface
string | null
Maximum string length: 128
principal_exclusions
string[] | null
Required string length: 1 - 255

Response

The updated rule.

id
string<uuid>
rule_code
string
name
string
description
string | null
rego_source
string
natural_language
string | null
priority
integer
enabled
boolean
applies_to
enum<string>[]
Available options:
action,
retrieval,
delegation
target_app
string | null
action_pattern
string | null
trust_tier
string | null
surface
string | null
principal_exclusions
string[] | null
created_at
string<date-time>
updated_at
string<date-time>