Skip to main content
PATCH
Edit a trust policy
Edits the newest revision of a trust policy by writing revision n+1, and answers 200 with the new revision’s id. Send policyId and at least one field to change; the rest is copied forward. The edited revision is disabled and the new one keeps its enabled state. An older revision is 409. policies:manage must be held at the platform scope: policies have no org-unit home, so a key or External App whose grant covers only some org units receives 403, and an agent can never hold the key. The audit event names the credential that decided, as the Console’s names the person. With an Idempotency-Key, a same-key retry within 24 hours returns the recorded answer only while you still hold policies:manage at the platform scope (see Idempotency). See Trust policies.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Headers

Idempotency-Key
string

Optional logical intent key. A same-key retry within 24 hours returns the recorded result without writing again.

Required string length: 1 - 255

Path Parameters

trustPolicyId
string
required

The newest revision's id; an older one is 409.

Required string length: 1 - 200

Body

application/json
name
string

Shown in Console; at most 200 characters.

Maximum string length: 200
description
string

At most 2000 characters.

Maximum string length: 2000
category
string

The gate category, as the Console offers it.

Required string length: 1 - 100
scope
string

global or the kind of target scopeId names.

Required string length: 1 - 100
scopeId
string

The id the scope targets; required for every scope except global.

Required string length: 1 - 200
condition
string

One recorded condition: "field operator value", e.g. "agent.rung >= 3".

Required string length: 1 - 1000
action
string

What the gate does when the condition holds.

Required string length: 1 - 100
enforcement
string

How strictly the action is enforced.

Required string length: 1 - 100
message
string

Shown when the policy acts.

Maximum string length: 2000
priority
number

Lower numbers run first.

Response

The new revision's id

data
object
required
meta
object
required