---
title: Policies
full: true
_openapi:
  toc:
    - depth: 2
      title: '`GET /v1/policies` — list active policy summaries.'
      url: '#get-v1policies--list-active-policy-summaries'
    - depth: 2
      title: '`POST /v1/policies` — create or update a policy from YAML or JSON.'
      url: '#post-v1policies--create-or-update-a-policy-from-yaml-or-json'
    - depth: 2
      title: >-
        `PATCH /v1/policies/batch/enabled` — enable or disable multiple
        policies.
      url: '#patch-v1policiesbatchenabled--enable-or-disable-multiple-policies'
    - depth: 2
      title: '`POST /v1/policies/draft` — LLM-draft a policy skeleton from a natural-'
      url: '#post-v1policiesdraft--llm-draft-a-policy-skeleton-from-a-natural-'
    - depth: 2
      title: >-
        `POST /v1/policies/validate` — validate policy YAML or JSON without
        saving it.
      url: '#post-v1policiesvalidate--validate-policy-yaml-or-json-without-saving-it'
    - depth: 2
      title: '`GET /v1/policies/:id` — fetch a policy document.'
      url: '#get-v1policiesid--fetch-a-policy-document'
    - depth: 2
      title: '`DELETE /v1/policies/:id` — soft-delete a policy.'
      url: '#delete-v1policiesid--soft-delete-a-policy'
    - depth: 2
      title: '`PATCH /v1/policies/:id/enabled` — enable or disable a policy.'
      url: '#patch-v1policiesidenabled--enable-or-disable-a-policy'
  structuredData:
    headings:
      - content: '`GET /v1/policies` — list active policy summaries.'
        id: get-v1policies--list-active-policy-summaries
      - content: '`POST /v1/policies` — create or update a policy from YAML or JSON.'
        id: post-v1policies--create-or-update-a-policy-from-yaml-or-json
      - content: >-
          `PATCH /v1/policies/batch/enabled` — enable or disable multiple
          policies.
        id: patch-v1policiesbatchenabled--enable-or-disable-multiple-policies
      - content: >-
          `POST /v1/policies/draft` — LLM-draft a policy skeleton from a
          natural-
        id: post-v1policiesdraft--llm-draft-a-policy-skeleton-from-a-natural-
      - content: >-
          `POST /v1/policies/validate` — validate policy YAML or JSON without
          saving it.
        id: >-
          post-v1policiesvalidate--validate-policy-yaml-or-json-without-saving-it
      - content: '`GET /v1/policies/:id` — fetch a policy document.'
        id: get-v1policiesid--fetch-a-policy-document
      - content: '`DELETE /v1/policies/:id` — soft-delete a policy.'
        id: delete-v1policiesid--soft-delete-a-policy
      - content: '`PATCH /v1/policies/:id/enabled` — enable or disable a policy.'
        id: patch-v1policiesidenabled--enable-or-disable-a-policy
    contents:
      - content: |-
          language prompt. The server holds the provider key; callers see a
          strict, typed response. Returns 503 when no LLM is configured.
        heading: post-v1policiesdraft--llm-draft-a-policy-skeleton-from-a-natural-
---

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

<APIPage document={"../../docs/openapi.yaml"} webhooks={[]} operations={[{"path":"/v1/policies","method":"get"},{"path":"/v1/policies","method":"post"},{"path":"/v1/policies/batch/enabled","method":"patch"},{"path":"/v1/policies/draft","method":"post"},{"path":"/v1/policies/validate","method":"post"},{"path":"/v1/policies/{id}","method":"get"},{"path":"/v1/policies/{id}","method":"delete"},{"path":"/v1/policies/{id}/enabled","method":"patch"}]} showTitle showDescription />