---
title: "Delete policy"
method: DELETE
path: "/orgs/{org_name}/governance/policies/{policy_id}"
tags: ["Policies"]
---

# Delete policy

`DELETE /orgs/{org_name}/governance/policies/{policy_id}`

## Request

- Base URL: `https://hub.docker.com/v2`
- URL: `https://hub.docker.com/v2/orgs/{org_name}/governance/policies/{policy_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/docker/apis/docker-ai-governance-policy-api/docs/orgs/:org_name/governance/policies/:policy_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Permanently deletes the policy and its rule set. Returns the deleted
policy as a courtesy; its `updated_at` is unchanged by the deletion.
Changes may take up to five minutes to reach developer machines.

## Response `200`

Policy deleted, returns the deleted policy.

- DeletePolicyResponse: The full deleted policy.
  - `deleted` Policy, required: Full policy representation. Exactly one of `allowlist_v0` or `cedar_v1` is present, depending on the policy type.
    - `id` string, required
    - `name` string, required: Human-readable label, unique within the organization.
    - `org` string, required
    - `scope` Scope, required: Restricts the policy to specific teams. An empty or absent list means the policy applies org-wide.
      - `teams` string[]: Team IDs the policy applies to. Each must be a valid team in the organization.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `allowlist_v0` AllowlistV0: Network, HTTP, or filesystem allowlist containing a list of rules. Present on Policy when `PolicySummary.type` is `allowlist_v0`; omitted when the policy has no rules yet. All rules in an allowlist share the same domain. All rules are evaluated on every request: `deny` always wins over `allow`.
      - `domain` 'network' | 'filesystem': The access-control domain shared by all rules in this allowlist. Derived from rule actions: network actions (`connect:tcp`, `connect:udp`) produce `network`; filesystem actions (`read`, `write`) produce `filesystem`. Present when `rules` is non-empty; absent when the allowlist has no rules.
      - `rules` Rule[], required
        - union: A single allow or deny rule within an allowlist policy.
          - object
            - `id` string, required
            - `name` string, required: Human-readable label for the rule.
            - `actions` string[], required: Network actions: `connect:tcp`, `connect:udp`. Filesystem actions: `read`, `write`. HTTP actions: `request:get`, `request:post`, `request:put`, `request:delete`, `request:patch`, `request:head`, `request:options`, `request:connect`, `request:trace`. All actions in a rule must belong to the same layer; mixing HTTP, network, or filesystem actions in one rule is rejected.
            - `resources` string[], required: Network domain: hostnames (for example, `example.com`), wildcard subdomains (`*.example.com` or `**.example.com`), hostnames with port (for example, `example.com:443`), or CIDRs in IPv4 or IPv6 notation (for example, `10.0.0.0/8` or `2001:db8::/32`). Filesystem domain: paths (for example, `/data`); `*` matches within one path segment, `**` matches recursively (for example, `/data/**`). Required for network and filesystem rules and forbidden for HTTP rules.
            - `http_resources` HTTPResource[]: HTTP request targets. Required for HTTP rules and forbidden for network and filesystem rules. A request matches when any target matches.
              - …
            - `decision` 'allow' | 'deny', required: Outcome applied when this rule matches a request. `deny` always wins: if any rule in the policy matches with `decision: deny`, the request is denied even if other rules match with `decision: allow`.
          - object
            - `id` string, required
            - `name` string, required: Human-readable label for the rule.
            - `actions` string[], required: Network actions: `connect:tcp`, `connect:udp`. Filesystem actions: `read`, `write`. HTTP actions: `request:get`, `request:post`, `request:put`, `request:delete`, `request:patch`, `request:head`, `request:options`, `request:connect`, `request:trace`. All actions in a rule must belong to the same layer; mixing HTTP, network, or filesystem actions in one rule is rejected.
            - `resources` string[]: Network domain: hostnames (for example, `example.com`), wildcard subdomains (`*.example.com` or `**.example.com`), hostnames with port (for example, `example.com:443`), or CIDRs in IPv4 or IPv6 notation (for example, `10.0.0.0/8` or `2001:db8::/32`). Filesystem domain: paths (for example, `/data`); `*` matches within one path segment, `**` matches recursively (for example, `/data/**`). Required for network and filesystem rules and forbidden for HTTP rules.
            - `http_resources` HTTPResource[], required: HTTP request targets. Required for HTTP rules and forbidden for network and filesystem rules. A request matches when any target matches.
              - …
            - `decision` 'allow' | 'deny', required: Outcome applied when this rule matches a request. `deny` always wins: if any rule in the policy matches with `decision: deny`, the request is denied even if other rules match with `decision: allow`.
    - `cedar_v1` CedarV1Policy: Cedar:V1 policy body. Present on `Policy` when `PolicySummary.type` is `cedar_v1`. Cedar policies encode their rules directly in `text` rather than in the rules sub-resource; the rules endpoints are not available for Cedar policies.
      - `text` string, required: One or more Cedar `permit` or `forbid` statements. Must be syntactically valid Cedar and must not carry an `@id` annotation (IDs are server-assigned).
      - `schema_url` string, required: URL of the Cedar schema this policy was authored against. The evaluator looks up the schema by this URL from its built-in registry. Use `https://schemas.docker.com/policy/cedar/v1/mcp/v0` for MCP policies.

## Other responses

- `401`: Missing or invalid credentials
- `403`: Caller lacks the required permission for this org, or the org is not entitled to use governance.
- `404`: Not found
- `500`: Internal server error

## Changes

- **2026-10-02** `4f9f7d5cadd5`: 2 breaking, 9 warning, 1 info
  - the response property `deleted/allowlist_v0/rules/items/resources` became optional for the status `200`
  - added `subschema #1, subschema #2` to the `deleted/allowlist_v0/rules/items/` response property `oneOf` list for the response status `200`
  - added the new `request:connect` enum value to the `deleted/allowlist_v0/rules/items/actions/items/` response property for the response status `200`
  - added the new `request:delete` enum value to the `deleted/allowlist_v0/rules/items/actions/items/` response property for the response status `200`
  - …8 more
- **2026-09-22** `85e78016fe38`: 1 info
  - added the optional property `deleted/cedar_v1` to the response with the `200` status
- **2026-06-10** `c133c0782991`: 4 warning
  - added the new `limit_exceeded` enum value to the `error/code` response property for the response status `401`
  - added the new `limit_exceeded` enum value to the `error/code` response property for the response status `403`
  - added the new `limit_exceeded` enum value to the `error/code` response property for the response status `404`
  - added the new `limit_exceeded` enum value to the `error/code` response property for the response status `500`
- **2026-06-04** `67e1167ee1cf`: 1 info
  - endpoint added
- **2026-06-02** `6b4e5e1d724e`: 1 breaking
  - api removed without deprecation

[Operation history](https://skmtc.dev/docker/apis/docker-ai-governance-policy-api/changes/orgs/:org_name/governance/policies/:policy_id/delete.md)

---

[API](https://skmtc.dev/docker/apis/docker-ai-governance-policy-api.md) - [All operations](https://skmtc.dev/docker/apis/docker-ai-governance-policy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/docker/apis/docker-ai-governance-policy-api/revisions/4f9f7d5cadd5?raw)
