Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

API token obtained from the Tokens endpoint or CLI device login. Include as Authorization: Bearer <token>. Requests made with a managed CLI session also include X-Strix-Workspace: <organization_id> to pin a process to the workspace it started in; recovery endpoints report the current workspace after a concurrent switch.

Body

application/json
policy_key
string
required

Unique key of the policy. Sending an existing key updates that policy.

Required string length: 1 - 120
policy_value
string
required

Rule text the agent follows, for example Never submit forms on the production checkout.

Required string length: 1 - 12000
policy_type
string
default:constraint

Category of the policy, for example constraint or preference.

Required string length: 1 - 60
is_active
boolean
default:true

When false, the policy is stored but the agent ignores it.

metadata
object

Free-form JSON object stored with the policy.

Response

Saved policy.

The response is of type object.