---
updatedAt: 2026-05-12T10:01:07.000Z
---

# Modify a policy

This operation enables you to modify an existing vulnerability custom policy.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "Vuln Custom Policy API (Legacy)",
    "license": {
      "name": "(c) Copyright 2020 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/vuln_custom_policy/{id}": {
      "put": {
        "tags": [
          "Vuln Custom Policy API v1.0"
        ],
        "summary": "Modify a policy",
        "description": "This operation enables you to modify an existing vulnerability custom policy.",
        "operationId": "editExistingCustomPolicy",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Custom policy id.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information to modify existing custom policy information.",
          "content": {
            "application/json": {
              "encoding": {},
              "schema": {
                "$ref": "#/components/schemas/VulnCustomPolicyPutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provides the information of modified existing custom policy.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VulnCustomPolicyResponse"
                }
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "VulnCustomPolicyPutRequest": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Custom Policy name."
          },
          "description": {
            "type": "string",
            "description": "Custom Policy description."
          },
          "risk_scores": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "vuln_class_id"
              ],
              "properties": {
                "vuln_class_id": {
                  "type": "number",
                  "description": "Vulnerability class ID."
                },
                "accepted": {
                  "type": "number",
                  "description": "If this field is set, the policy will customize vuln status of the vuln with given vuln_class_id."
                },
                "risk_score": {
                  "type": "number",
                  "description": "Customized risk score."
                }
              }
            }
          }
        }
      },
      "VulnCustomPolicyResponse": {
        "properties": {
          "customized_on": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "risk_scores": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "vuln_class_id": {
                  "type": "string"
                },
                "accepted": {
                  "type": "number"
                },
                "risk_score": {
                  "type": "string"
                }
              }
            }
          },
          "customized_by": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "proxy-enabled": true
  }
}
```