Skip to main content
POST
Create a trust policy
Creates a Trust Fabric gate policy (revision 1 of a new chain) after the Console’s own validation, and answers 201 with its id. Send name, description, category, scope (with scopeId for any scope except global), one recorded condition such as agent.rung >= 3, action, enforcement, enabled and priority; message is optional. A policy the Console’s validation refuses is 400 with its message. Without an Idempotency-Key, a repeat creates a second policy. 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

Body

application/json
name
string
required

Shown in Console; at most 200 characters.

Maximum string length: 200
description
string
required

At most 2000 characters.

Maximum string length: 2000
category
string
required

The gate category, as the Console offers it.

Required string length: 1 - 100
scope
string
required

global or the kind of target scopeId names.

Required string length: 1 - 100
condition
string
required

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

Required string length: 1 - 1000
action
string
required

What the gate does when the condition holds.

Required string length: 1 - 100
enforcement
string
required

How strictly the action is enforced.

Required string length: 1 - 100
priority
number
required

Lower numbers run first.

enabled
boolean
required

Whether the policy is live once created.

scopeId
string

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

Required string length: 1 - 200
message
string

Shown when the policy acts.

Maximum string length: 2000

Response

The created policy's id

data
object
required
meta
object
required