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

# Delete a dynamic policy

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

## Request

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

> **Deprecated.**

Soft-delete a dynamic policy. The policy is marked as deleted but retained for audit purposes.

## Headers

- `X-User-ID` string

## Response `204`

Dynamic policy deleted

## Other responses

- `400`: Request validation failed
- `401`: Missing or invalid tenant ID
- `403`: Tier validation failed
- `404`: Policy not found
- `409`: The legacy policy tables are read-only. `migrations/core/172` revoked INSERT, UPDATE, DELETE and TRUNCATE on `static_policies` and `dynamic_policies` from the application roles, and this endpoint writes them, 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 on this endpoint are unaffected. A deployment whose connection may still write the tables (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. Where the connection cannot write them, the create, update and bulk-import routes answer this before reading the request body, whatever it contains.
- `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)
