---
updatedAt: 2026-05-12T09:59:33.000Z
---

# Delete custom policy

This operation allows you to delete an existing custom policy, as identified by the custom policy ID.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "ErrorMessage": {
        "description": "ErrorMessage describes the error",
        "properties": {
          "code": {
            "format": "int64",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "license": {
      "name": "(c) Copyright 2020 WhiteHat Security"
    },
    "title": "Custom Policies API",
    "version": "2.0.0"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/customPolicies/{id}": {
      "delete": {
        "description": "This operation allows you to delete an existing custom policy, as identified by the custom policy ID.",
        "operationId": "DeletePolicySwagger",
        "parameters": [
          {
            "description": "Custom policy ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer",
              "x-go-name": "ID"
            },
            "x-go-name": "ID"
          }
        ],
        "responses": {
          "200": {
            "description": "SuccessResponse request succeeded"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage"
                }
              }
            },
            "description": "BadRequestResponse indicates a request with invalid parameters"
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access"
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized"
          },
          "404": {
            "description": "NotFoundResponse indicates a request for a resource that does not exist"
          },
          "500": {
            "description": "GenericError generic error"
          }
        },
        "summary": "Delete custom policy",
        "tags": [
          "Custom Policies API v2.0"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com/"
    }
  ],
  "tags": [
    {
      "name": "Custom Policies API v2.0"
    }
  ],
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```