Tenant Policies

Import dynamic policies

Bulk import dynamic policies from JSON. Supports up to 100 policies per request. Every policy must have a category starting with dynamic- or media-.

On a deployment whose database connection cannot write the legacy policy tables (migrations/core/172), the request is refused 409 LEGACY_POLICY_WRITE_FROZEN before its body is read, whatever it contains, and the refusal names the typed authoring route. An owner-role deployment still imports.

post/api/v1/tenant-policies/import

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

overwrite_mode'skip' | 'overwrite' | 'error'

How to handle existing policies

Example request

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

Response

Import results

createdinteger

Number of policies created

updatedinteger

Number of policies updated

skippedinteger

Number of policies skipped

errorsstring[]

Error messages for failed imports

Changes

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