---
title: "Delete static policy"
method: DELETE
path: "/api/v1/static-policies/{id}"
tags: ["Static Policies"]
deprecated: true
---

# Delete static policy

`DELETE /api/v1/static-policies/{id}`

## Request

- Base URL: `https://agent.getaxonflow.com`
- URL: `https://agent.getaxonflow.com/api/v1/static-policies/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-agent-api/docs/api/v1/static-policies/:id/delete.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Soft-deletes a static policy (sets deleted_at timestamp).

**Restrictions:**
- System-tier policies cannot be deleted

## Path parameters

- `id` string, uuid, required

## Headers

- `X-User-ID` string

## Response `204`

Policy deleted successfully

## Other responses

- `403`: System policies cannot be deleted
- `404`: Policy not found
- `409`: The legacy policy tables are read-only. `migrations/core/172` revoked INSERT, UPDATE, DELETE and TRUNCATE on `static_policies` from the application roles, and this endpoint writes it, so the write is refused permanently rather than transiently. It is not an entitlement fact: no licence, edition or upgrade changes it. Author policies through the typed authoring route (`/api/v1/typed-policies`, in `orchestrator-api.yaml`) instead. Reads are unaffected. A deployment whose connection may still write the table (the database owner; a property of the connection, not of `AXONFLOW_DB_USE_APP_ROLE` alone) is not bound by the revoke and does not receive this response. The body is the `JSONError` envelope with `code` as the string `LEGACY_POLICY_WRITE_FROZEN` rather than the numeric status.

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-agent-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-agent-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-agent-api/revisions/34d30fcb7fa1?raw)
