Skip to main content
POST
Create an action 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_-]+$

Body

application/json
name
string
required
Required string length: 1 - 255
rego_source
string
required
Minimum string length: 1
description
string
Maximum string length: 1000
natural_language
string
Maximum string length: 2000
priority
integer
default:0
enabled
boolean
default:true

Response

The created rule.

id
string<uuid>
name
string
description
string | null
rego_source
string
natural_language
string | null
priority
integer
enabled
boolean
created_at
string<date-time>
updated_at
string<date-time>