---
updatedAt: 2026-08-17T17:12:51.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/governance/llms.txt
---

# Delete a policy

Delete a policy by its unique identifier.
This endpoint removes the specified policy from the system.


# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "JFrog Unified Policy Service APIs",
    "description": "JFrog Unified Policy Service APIs for managing policies across the JFrog Platform.\n\nThis API provides endpoints for creating, updating, and managing policies\nthat can be applied to various JFrog platform resources.\n\n## Authentication\nAll API requests require a valid JWT bearer token in the Authorization header.\n",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support",
      "url": "https://jfrog.com/contact-us/",
      "email": "support@jfrog.com"
    },
    "license": {
      "name": "JFrog Terms of Service",
      "url": "https://jfrog.com/terms-and-conditions/"
    }
  },
  "servers": [
    {
      "url": "https://api.jfrog.com/unifiedpolicy/api/v1",
      "description": "JFrog Unified Policy Service API"
    }
  ],
  "tags": [
    {
      "name": "policy",
      "description": "policies to apply rules to resources in the JFrog Platform."
    }
  ],
  "paths": {
    "/policies/{policyId}": {
      "delete": {
        "summary": "Delete a policy",
        "description": "Delete a policy by its unique identifier.\nThis endpoint removes the specified policy from the system.\n",
        "tags": [
          "policy"
        ],
        "operationId": "policiesDelete",
        "parameters": [
          {
            "$ref": "#/components/parameters/policyIdPathParam"
          }
        ],
        "responses": {
          "204": {
            "description": "There is no content to send for this request, but the headers may be useful."
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "409": {
            "$ref": "#/components/responses/ConflictError"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "unifiedPolicyAuth": [
              "policy:delete"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "description": "JWT Bearer token authentication",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "unifiedPolicyAuth": {
        "description": "Unified Policy OAuth2 security scheme defining required permission scopes.\nUses JFrog's permission scope format: <resource-type>:<target>:<action>\n\nWhile OAuth2 is defined here for permission documentation, the actual \nimplementation uses JWT Bearer tokens transported via Authorization header.\n\nPermission scopes follow JFrog's standard format:\n- policy:*:read - Read access to all policies\n- policy:project-key:write - Write access to project-specific policies\n- template:*:manage - Full management access to all templates\n- rule:rule-id:delete - Delete access to specific rule\n",
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://your-jfrog-instance.com/access/oauth/authorize",
            "tokenUrl": "https://your-domain.jfrog.io/access/oauth/token",
            "scopes": {
              "policy:read": "Read access to policies",
              "policy:manage": "Full management access to policies",
              "policy:*:read": "Read access to all policies",
              "policy:*:write": "Write access to all policies",
              "policy:*:delete": "Delete access to all policies",
              "policy:*:manage": "Full management access to all policies",
              "policy:*:execute": "Execute/evaluate all policies",
              "policy:project:read": "Read access to project-scoped policies",
              "policy:project:write": "Write access to project-scoped policies",
              "policy:project:delete": "Delete access to project-scoped policies",
              "policy:project:manage": "Full management of project-scoped policies",
              "policy:project:execute": "Execute project-scoped policies",
              "template:read": "Read access to templates",
              "template:manage": "Full management access to templates",
              "template:*:read": "Read access to all templates",
              "template:*:write": "Write access to all templates",
              "template:*:delete": "Delete access to all templates",
              "template:*:manage": "Full management access to all templates",
              "rule:read": "Read access to rules",
              "rule:*:read": "Read access to all rules",
              "rule:*:write": "Write access to all rules",
              "rule:*:delete": "Delete access to all rules",
              "rule:*:manage": "Full management access to all rules",
              "evaluation:*:read": "Read access to all evaluations",
              "evaluation:*:write": "Write access to create evaluations",
              "evaluation:*:delete": "Delete access to evaluations",
              "system:admin": "Full system administrative access",
              "internal:developer:w": "Internal developer write access",
              "unifiedpolicy:admin": "Full unified policy administrative access"
            }
          }
        }
      }
    },
    "parameters": {
      "policyIdPathParam": {
        "name": "policyId",
        "in": "path",
        "description": "Policy identifier.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/JFrogId"
        }
      }
    },
    "schemas": {
      "JFrogId": {
        "type": "string",
        "description": "A Snowflake unique identifier (64-bit integer, represented as a string).",
        "pattern": "^[0-9]*$",
        "minLength": 4,
        "maxLength": 20,
        "example": "123456789012345",
        "x-oapi-codegen-extra-tags": {
          "binding": "required,min=4,max=20,regex=^[0-9]*$"
        }
      },
      "JFBaseError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "A unique, machine-readable code for the general error type.",
            "example": "resource_not_found",
            "x-oapi-codegen-extra-tags": {
              "binding": "required,min=1,max=100"
            }
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "A human-readable message summarizing the error.",
            "example": "The resource with the specified ID was not found.",
            "x-oapi-codegen-extra-tags": {
              "binding": "required,min=1,max=1000"
            }
          },
          "trace_id": {
            "type": "string",
            "maxLength": 64,
            "description": "A unique trace identifier for distributed tracing, logging, and support purposes.\nTypically an uber trace id (hexadecimal string, 16 or 32 characters) matching the regex pattern ^[0-9a-fA-F-]{1,64}$,\nautomatically extracted from the 'uber-trace-id' header when available.\n",
            "example": "1a2b3c4d5e6f7890",
            "x-oapi-codegen-extra-tags": {
              "binding": "omitempty,max=64"
            }
          }
        },
        "required": [
          "code",
          "message"
        ],
        "x-oapi-codegen-extra-tags": {
          "binding": "required"
        }
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "Authentication credentials are required or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "unauthorized": {
                "$ref": "#/components/examples/UnauthorizedErrorExample"
              }
            }
          }
        }
      },
      "ForbiddenError": {
        "description": "You do not have sufficient permissions to perform this action.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "forbidden": {
                "$ref": "#/components/examples/ForbiddenErrorExample"
              }
            }
          }
        }
      },
      "NotFoundError": {
        "description": "The resource with the specified ID was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "not_found": {
                "$ref": "#/components/examples/NotFoundErrorExample"
              }
            }
          }
        }
      },
      "ConflictError": {
        "description": "The request conflicts with the current state of the resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "conflict": {
                "$ref": "#/components/examples/ConflictErrorExample"
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "An unexpected error occurred. Please contact support.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/JFBaseError"
            },
            "examples": {
              "internal_server_error": {
                "$ref": "#/components/examples/InternalServerErrorExample"
              }
            }
          }
        }
      }
    },
    "examples": {
      "UnauthorizedErrorExample": {
        "summary": "Unauthorized Error",
        "description": "Example of unauthorized error",
        "value": {
          "code": "unauthorized",
          "message": "Authentication token is required.",
          "trace_id": "c3d4e5f6-7890-9012-cdef-345678901234"
        }
      },
      "ForbiddenErrorExample": {
        "summary": "Forbidden Error",
        "description": "Example of forbidden error",
        "value": {
          "code": "forbidden",
          "message": "You do not have sufficient permissions to perform this action.",
          "trace_id": "e5f6a7b8-7890-1234-efab-567890123456"
        }
      },
      "NotFoundErrorExample": {
        "summary": "Not Found Error",
        "description": "Example of resource not found error",
        "value": {
          "code": "not_found",
          "message": "The requested resource was not found.",
          "trace_id": "a7b8c9d0-e1f2-3456-abcd-789012345678"
        }
      },
      "ConflictErrorExample": {
        "summary": "Conflict Error",
        "description": "Example of resource conflict error",
        "value": {
          "code": "conflict",
          "message": "The request conflicts with the current state of the resource.",
          "trace_id": "b8c9d0e1-f2a3-4567-abcd-890123456789"
        }
      },
      "InternalServerErrorExample": {
        "summary": "Internal Server Error",
        "description": "Example of internal server error",
        "value": {
          "code": "internal_server_error",
          "message": "An unexpected error occurred while processing your request.",
          "trace_id": "c3d4e5f6-a7b8-9012-abcd-345678901234"
        }
      }
    }
  }
}
```