curl -X POST \
https://<host>/v1/policies \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <ADMIN_API_KEY>" \
-d '{
"name": "policy-textops",
"actions": [
{
"name": "sanitize",
"priority": 1,
"parallel": false,
"settings": {"level": "standard"}
},
{
"name": "classify",
"priority": 2,
"parallel": false,
"settings": {"labels": ["spam", "ham"]}
}
],
"telemetry": {
"exporters": [
{"name": "otlp", "settings": {"endpoint": "https://otel.example"}}
],
"extra_params": {"tenant": "acme"},
"enable_plugin_traces": true,
"enable_request_traces": false,
"header_mapping": {"x-request-id": "trace_id"}
},
"trustlens": {
"app_id": "app-123",
"team_id": "team-xyz",
"type": "sync",
"mapping": {
"input": {
"extract_fields": {"text": "$.payload.input_text"},
"data_projection": {"user": "$.payload.user_id"}
},
"output": {
"extract_fields": {"result": "$.payload.result"},
"data_projection": {}
}
}
}
}'