---
title: "List policy templates"
method: GET
path: "/api/v1/templates"
tags: ["Templates"]
deprecated: true
---

# List policy templates

`GET /api/v1/templates`

## Request

- Base URL: `https://agent.getaxonflow.com`
- URL: `https://agent.getaxonflow.com/api/v1/templates`
- Auth: none declared. Required headers: `X-Tenant-ID`
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api/docs/api/v1/templates/get.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Retrieve available policy templates for quick policy creation.
Templates provide pre-configured policies for common use cases like
HIPAA compliance, GDPR data protection, and rate limiting.

## Query parameters

- `category` 'general' | 'security' | 'compliance' | 'content_safety' | 'rate_limiting' | 'access_control' | 'data_protection' | 'custom'
- `search` string
- `tags` string
- `active` boolean
- `builtin` boolean
- `page` integer
- `page_size` integer

## Headers

- `X-Tenant-ID` string, required

## Response `200`

List of templates

- TemplatesListResponse
  - `templates` TemplateResource[]
    - `id` string: Unique template identifier
    - `name` string: Template name (machine-readable)
    - `display_name` string: Human-readable display name
    - `description` string: Template description
    - `category` string: Template category
    - `subcategory` string: Template subcategory
    - `template` object: Policy template with variable placeholders
      - `type` 'content' | 'user' | 'risk' | 'cost' | 'context_aware' | 'media' | 'rate-limit' | 'budget' | 'time-access' | 'role-access' | 'mcp' | 'connector': 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
      - `conditions` PolicyCondition[]
        - `field` 'query' | 'response' | 'user.email' | 'user.role' | 'user.department' | 'user.tenant_id' | 'risk_score' | 'request_type' | 'connector' | 'cost_estimate' | 'media.has_faces' | 'media.face_count' | 'media.has_biometric_data' | 'media.nsfw_score' | 'media.violence_score' | 'media.content_safe' | 'media.document_type' | 'media.is_sensitive_document' | 'media.has_pii' | 'media.pii_types' | 'media.has_extracted_text' | 'media.extracted_text_length' | 'step.gate_count' | 'step.completion_count' | 'step.prior_completion_status' | 'step.prior_output_available' | 'step.last_decision' | 'step.first_attempt_age_seconds' | 'step.idempotency_key', required: Field to evaluate. `media.*` fields apply to media governance policies (multimodal image governance); `step.*` fields are retry-aware workflow step fields for WCP policies.
        - `operator` 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'contains_any' | 'regex' | 'greater_than' | 'less_than' | 'in' | 'not_in', required: Comparison operator for conditions
        - `value` union, required: Value to compare against
          - string
          - number
          - boolean
          - string[]
      - `actions` PolicyAction[]
        - `type` 'block' | 'require_approval' | 'redact' | 'warn' | 'alert' | 'log' | 'route' | 'modify_risk', required: Action to take when policy matches: - `block`: Block the request with message - `require_approval`: Hold the request for human approval (HITL) - `redact`: Redact sensitive content from response - `warn`: Allow the request but attach a warning - `alert`: Send alert to configured channel - `log`: Log to audit trail - `route`: Route to specific provider - `modify_risk`: Adjust risk score
        - `config` object: Action-specific configuration
    - `variables` TemplateVariable[]: Variables that can be customized
      - `name` string, required: Variable name used in template
      - `type` 'string' | 'number' | 'boolean' | 'array', required: Variable data type
      - `required` boolean: Whether this variable must be provided when applying the template
      - `default` union: Default value if not provided
        - string
        - number
        - boolean
        - string[]
      - `description` string: Human-readable description
      - `validation` string: Regex pattern for validating the variable value
    - `is_builtin` boolean: Whether this is a built-in template
    - `is_active` boolean: Whether this template is active
    - `version` string: Template version
    - `tags` string[]: Tags for categorization
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `pagination` PaginationMeta: Pagination metadata
    - `page` integer: Current page number
    - `page_size` integer: Items per page
    - `total_items` integer: Total number of items
    - `total_pages` integer: Total number of pages

## Other responses

- `401`: Missing or invalid tenant ID
- `500`: Internal server error

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api/revisions/302fbde24320?raw)
