Dynamic Policies

Create a dynamic policy

Create a new dynamic policy. category is required and must start with dynamic- or media- (e.g., dynamic-risk, media-safety).

post/api/v1/dynamic-policies

Request

Headers

X-Tenant-IDstring required
Example:tenant_abc123

Tenant identifier for multi-tenancy isolation. When calling through the Agent (recommended), this header is stamped automatically from the authenticated client — you do not set it yourself. Required only on direct Orchestrator calls (internal deployments).

X-User-IDstring
Example:user@company.com

User identifier for audit logging

Request body

namestring required
descriptionstring
type'content' | 'user' | 'risk' | 'cost' | 'context_aware' | 'media' | 'rate-limit' | 'budget' | 'time-access' | 'role-access' | 'mcp' | 'connector' required

Policy type determines evaluation context:

  • content: Evaluates request/response content
  • user: Evaluates user attributes
  • risk: Evaluates risk scores
  • cost: Evaluates cost estimates
  • context_aware: Context-aware controls (tenant isolation, debug restriction, sensitive-data control)
  • media: Media governance policies (multimodal image governance)
  • rate-limit, budget, time-access: MCP rate/budget controls
  • role-access, mcp, connector: MCP access controls
categorystring

Policy category (dynamic-risk, dynamic-compliance, media-safety, etc.). Required on the /api/v1/dynamic-policies surface, where it must start with dynamic- or media-.

tier'organization' | 'tenant'

Policy tier. Only organization or tenant is allowed via the API.

priorityinteger
enabledboolean
tagsstring[]

Tags for categorization

Example request

{
  "actions": [
    {
      "config": {
        "message": "Request blocked by policy",
        "channel": "security-alerts"
      }
    }
  ]
}

Response

Dynamic policy created

Example response

{
  "policy": {
    "id": "pol_abc123def456",
    "name": "Block PII Access",
    "description": "Prevent unauthorized access to personally identifiable information",
    "category": "dynamic-risk",
    "actions": [
      {
        "config": {
          "message": "Request blocked by policy",
          "channel": "security-alerts"
        }
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.