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

# Update custom policy

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

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "CVSSV3": {
        "description": "CVSSV3 is a swagger struct only, mirroring data.CVSSV3, so that null values are correctly rendered in api docs",
        "properties": {
          "environmentalScore": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "environmentalVector": {
            "$ref": "#/components/schemas/CVSSV3Vector"
          },
          "score": {
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "vector": {
            "$ref": "#/components/schemas/CVSSV3Vector"
          }
        },
        "type": "object"
      },
      "CVSSV3Vector": {
        "description": "CVSSV3Vector is the CVSS V3 Vector data for the finding record",
        "properties": {
          "A": {
            "type": "string"
          },
          "AC": {
            "type": "string"
          },
          "AR": {
            "type": "string"
          },
          "AV": {
            "type": "string"
          },
          "C": {
            "type": "string"
          },
          "CR": {
            "type": "string"
          },
          "I": {
            "type": "string"
          },
          "IR": {
            "type": "string"
          },
          "MA": {
            "type": "string"
          },
          "MAC": {
            "type": "string"
          },
          "MAV": {
            "type": "string"
          },
          "MC": {
            "type": "string"
          },
          "MI": {
            "type": "string"
          },
          "MPR": {
            "type": "string"
          },
          "MS": {
            "type": "string"
          },
          "MUI": {
            "type": "string"
          },
          "PR": {
            "type": "string"
          },
          "S": {
            "type": "string"
          },
          "UI": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorMessage": {
        "description": "ErrorMessage describes the error",
        "properties": {
          "code": {
            "format": "int64",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PolicyCreateSwagger": {
        "description": "PolicyCreateSwagger parameters for vuln customization POST operation",
        "properties": {
          "assetType": {
            "type": "string"
          },
          "assignedSubIDs": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "vulnClassCustomizations": {
            "items": {
              "$ref": "#/components/schemas/VulnClassCustomization"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PolicyResponseSwagger": {
        "description": "PolicyResponseSwagger provides info about single custom policy",
        "properties": {
          "assetCount": {
            "format": "int64",
            "type": "integer"
          },
          "assetType": {
            "type": "string"
          },
          "assignedSubIDs": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "nullable": true,
            "type": "array"
          },
          "clientId:": {
            "format": "int64",
            "type": "integer"
          },
          "createdBy": {
            "properties": {
              "id": {
                "format": "int64",
                "type": "integer"
              },
              "username": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "createdOn": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "reason": {
            "nullable": true,
            "type": "string"
          },
          "vulnClassCustomizations": {
            "items": {
              "$ref": "#/components/schemas/VulnClassCustomization"
            },
            "nullable": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "VulnClassCustomization": {
        "description": "VulnClassCustomization is a swagger struct only, mirroring data.VulnClassCustomization, so that null values are correctly rendered in api docs",
        "properties": {
          "accepted": {
            "type": "boolean"
          },
          "customRisk": {
            "format": "int64",
            "type": "integer"
          },
          "cvssV3": {
            "$ref": "#/components/schemas/CVSSV3"
          },
          "vulnClassID": {
            "format": "int64",
            "type": "integer"
          }
        },
        "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}": {
      "put": {
        "description": "This operation allows you to update an existing custom policy, as identified by the custom policy ID.",
        "operationId": "PolicyUpdateSwagger",
        "parameters": [
          {
            "description": "Custom policy ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer",
              "x-go-name": "ID"
            },
            "x-go-name": "ID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyCreateSwagger"
              }
            }
          },
          "description": "PolicyUpdateSwagger parameters for vuln customization PUT operation"
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyResponseSwagger"
                }
              }
            },
            "description": "PolicyResponse provides info about single custom policy"
          },
          "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"
          }
        },
        "summary": "Update custom policy",
        "tags": [
          "Custom Policies API v2.0"
        ],
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com/"
    }
  ],
  "tags": [
    {
      "name": "Custom Policies API v2.0"
    }
  ],
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```