Share feedback
Answers are generated based on the documentation.

Delete policy

DELETE/orgs/{org_name}/governance/policies/{policy_id}
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.

Connection and access

API connection and authentication guidance

https://hub.docker.com/v2

Use one of these alternatives. Requirements within an alternative apply together.

  • bearerAuth

Parameters

org_name path Required

Docker Hub organization name.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

policy_id path Required

Unique policy identifier.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Response 200

Policy deleted, returns the deleted policy.

application/json

Schema: DeletePolicyResponse

default

{
  "deleted": {
    "allowlist_v0": {
      "domain": "network",
      "rules": [
        {
          "actions": [
            "connect:tcp",
            "connect:udp"
          ],
          "decision": "allow",
          "id": "rule_06evsm9qjm1pdsk0a8nkfaxy7jna",
          "name": "allow research mirrors",
          "resources": [
            "research.mitre.org",
            "cve.mitre.org"
          ]
        }
      ]
    },
    "created_at": "2026-04-22T00:00:00Z",
    "id": "pol_06evsmp24r1pg71cm8500546pkbn",
    "name": "Security Research — hardened",
    "org": "my-org",
    "scope": {
      "teams": [
        "d290f1ee-6c54-4b01-90e6-d701748f0851"
      ]
    },
    "updated_at": "2026-04-22T00:00:00Z"
  }
}

Response 401

Missing or invalid credentials

application/json

Schema: Error

default

{
  "error": {
    "code": "unauthenticated",
    "message": "unauthenticated"
  }
}

Response 403

Caller lacks the required permission for this org, or the org is not entitled to use governance.

application/json

Schema: Error

default

{
  "error": {
    "code": "permission_denied",
    "message": "permission denied"
  }
}

Response 404

Not found

application/json

Schema: Error

default

{
  "error": {
    "code": "not_found",
    "message": "policy not found"
  }
}

Response 500

Internal server error

application/json

Schema: Error

default

{
  "error": {
    "code": "internal",
    "message": "internal error"
  }
}

Referenced schemas

#/components/schemas/DeletePolicyResponse

Complete operation contract
{
  "description": "Permanently deletes the policy and its rule set. Returns the deleted\npolicy as a courtesy; its `updated_at` is unchanged by the deletion.\nChanges may take up to five minutes to reach developer machines.\n",
  "operationId": "deletePolicy",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "examples": {
            "default": {
              "value": {
                "deleted": {
                  "allowlist_v0": {
                    "domain": "network",
                    "rules": [
                      {
                        "actions": [
                          "connect:tcp",
                          "connect:udp"
                        ],
                        "decision": "allow",
                        "id": "rule_06evsm9qjm1pdsk0a8nkfaxy7jna",
                        "name": "allow research mirrors",
                        "resources": [
                          "research.mitre.org",
                          "cve.mitre.org"
                        ]
                      }
                    ]
                  },
                  "created_at": "2026-04-22T00:00:00Z",
                  "id": "pol_06evsmp24r1pg71cm8500546pkbn",
                  "name": "Security Research — hardened",
                  "org": "my-org",
                  "scope": {
                    "teams": [
                      "d290f1ee-6c54-4b01-90e6-d701748f0851"
                    ]
                  },
                  "updated_at": "2026-04-22T00:00:00Z"
                }
              }
            }
          },
          "schema": {
            "$ref": "#/components/schemas/DeletePolicyResponse"
          }
        }
      },
      "description": "Policy deleted, returns the deleted policy."
    },
    "401": {
      "$ref": "#/components/responses/Unauthenticated"
    },
    "403": {
      "$ref": "#/components/responses/PermissionDenied"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    },
    "500": {
      "$ref": "#/components/responses/InternalError"
    }
  },
  "summary": "Delete policy",
  "tags": [
    "policies"
  ]
}