System Policies
Create static policy
Creates a new static policy for the tenant.
Tier restrictions:
- system tier: Cannot be created via API (managed by AxonFlow)
- organization tier: Requires Enterprise license
- tenant tier: Default, limited to 20 policies in Community mode
Part of ADR-019: Unified Policy Management System.
v11: on a deployment whose database connection cannot write static_policies (migrations/core/172), this route answers 409 LEGACY_POLICY_WRITE_FROZEN before the request body is read, whatever it contains, naming the typed authoring route. An owner-role deployment still creates.
post/api/v1/system-policies
Request
- Base URLhttps://agent.getaxonflow.com
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Authorizationstring
Basic auth credentials: Basic base64(clientId:clientSecret). Required in evaluation/enterprise mode. Optional in community mode (defaults to community tenant).
X-User-IDstring
User ID for audit trail
Request body
Example request
{
"name": "Custom Employee ID Detection",
"pattern": "EMP-[0-9]{6}"
}Response
Policy created successfully
Example response
{
"policy_id": "sys_sqli_union_select",
"name": "UNION SELECT Detection",
"description": "Detects SQL injection attempts using UNION SELECT",
"tier": "system",
"pattern": "(?i)\\bUNION\\s+(ALL\\s+)?SELECT\\b",
"priority": 1000,
"version": 1
}Changes
No recorded changes to this operation across all 1 revision of this API.