Skip to main content
PATCH
Accept, dismiss, turn off, restore or edit a Rule.
Scope: policy:rules:write. See API Tokens.

Authorizations

Authorization
string
header
required

CloudThinker token: a personal access token ct_pat_… (fine-grained scopes, created in Settings) or an OAuth access token ct_oat_… (1 hour, from the OAuth flow). Send Authorization: Bearer <token>. Scopes have the form module:resource:read|write; write includes read.

Headers

If-Match
string
required

The ETag from the last GET. A mismatch returns 412.

Idempotency-Key
string

Unique per logical write. A retry with the same key and body returns the first result.

Required string length: 1 - 255

Path Parameters

workspace_id
string<uuid>
required

Workspace to act in. Every call names it.

rule_id
string<uuid>
required

Rule id.

Body

application/json

Send status, or Rule fields to edit. Not both. Editing an active Rule replaces it with a new id.

status
enum<string> | null

active accepts a proposed Rule or restores a dismissed one; dismissed dismisses or turns off.

Available options:
active,
dismissed
confirm_risky
boolean
default:false

Confirm restoring a Rule that allows risky writes.

effect
enum<string> | null
Available options:
allow,
require_approval,
deny
connector
string | null
Required string length: 1 - 255
operations
string[] | null
Minimum array length: 1
access_classes
string[] | null
connection_aliases
string[] | null
applies_to
enum<string>[] | null
Available options:
chat,
resolve,
optimize,
automations,
review
description
string | null
Maximum string length: 500
expires_in_hours
integer | null

New lifetime from now. Omit to keep the current window.

Required range: x >= 1

Response

OK

A Rule that decides whether an agent action is allowed, needs approval or is refused.

id
string<uuid>
required
status
enum<string>
required
Available options:
proposed,
active,
dismissed,
withdrawn,
replaced
effect
enum<string>
required
Available options:
allow,
require_approval,
deny
sentence
string
required

The Rule in one plain sentence.

description
string
required
connector
string
required

Connection prefix, or * for any.

operations
string[]
required
access_classes
string[]
required
connection_aliases
string[]
required
applies_to
enum<string>[]
required

Run types this Rule covers. Empty covers all.

Available options:
chat,
resolve,
optimize,
automations,
review
expires_at
string<date-time> | null
required
source
enum<string>
required
Available options:
human,
agent_proposal,
runbook,
legacy,
system,
grant,
template
proposal_reason
string | null
required

Why an agent proposed this Rule, if one did.

replaces
string<uuid> | null
required

The Rule this one replaced, if any.

accepted_by
string<uuid> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required