id
when calling POST /v1/actions
.
What is a policy?
A policy is a declarative object that describes:- The list of actions to run, with order (priority) and parallelization hints
- Optional telemetry exporters and settings
- Optional TrustLens configuration for advanced insights
Create a policy
Use the admin endpointPOST /v1/policies
with at least one action:
Use a policy
CallPOST /v1/actions
with the policy_id
you received and a payload
to process:
Best practices
- Keep actions small and composable; use multiple actions rather than one complex action
- Prefer sequential execution unless parallel execution is safe and idempotent
- Name policies clearly and use tags/metadata in your platform to track versions
- Restrict execution using allowed policies on API keys