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

# Create a policy

This operation enables you to create a new vulnerability policy.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "VulnPolicy API (Legacy)",
    "license": {
      "name": "(c) Copyright 2020 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/{client_id}/vuln_policy": {
      "post": {
        "tags": [
          "VulnPolicy API v1.0"
        ],
        "summary": "Create a policy",
        "description": "This operation enables you to create a new vulnerability policy.",
        "operationId": "createNewPolicy",
        "parameters": [
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID where the policy will be created.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information to create a new vuln policy.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VulnPolicyPostRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "SuccessResponse request succeeded.",
            "content": {}
          },
          "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": {}
          },
          "409": {
            "description": "Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "VulnPolicyPostRequest": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the vuln policy."
          },
          "auto_vote": {
            "type": "number",
            "description": "Specifies whether vulns associated with policy to be auto voted."
          },
          "vuln_classes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "vuln class ID."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Specifies whether the vuln class to be enabled or disabled.",
                  "enum": [
                    true,
                    false
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "proxy-enabled": true
  }
}
```