---
updatedAt: 2026-08-17T09:36:44.000Z
agentTools:
  projectIndex: https://docs.kondukto.io/llms.txt
---

# Update Vulnerability Flags

Adds or removes one or more existing flags from multiple vulnerabilities. The caller must have permission to update vulnerability flags and must be able to access every requested vulnerability. Vulnerability IDs and flag IDs must be valid 24-character hexadecimal object IDs. Do not repeat an ID within either array.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "ASPM API v2 — Vulnerability Flags",
    "version": "2.0.0",
    "description": "Public API v2 endpoints for retrieving available flags and adding or removing flags from vulnerabilities."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "your-hostname",
          "description": "Your ASPM instance hostname"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "PersonalAccessToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Cookie",
        "description": "Personal Access Token for authentication"
      }
    }
  },
  "security": [
    {
      "PersonalAccessToken": []
    }
  ],
  "paths": {
    "/api/v2/vulnerabilities/flags": {
      "patch": {
        "responses": {
          "200": {
            "description": "OK — Flags updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "massage": {
                      "type": "string",
                      "default": "flags have been updated in vulnerabilities successfully",
                      "description": "Success message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — The JSON input is invalid; operation is invalid; an ID array is empty; a vulnerability ID has an invalid format; a flag ID is invalid or does not reference an existing active flag; or the update failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message describing what went wrong"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized — Authentication failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message describing what went wrong"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — The caller lacks the required permission, or one or more requested vulnerabilities do not exist or are inaccessible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message describing what went wrong"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — The API rate limit was exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message describing what went wrong"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [],
        "operationId": "patch_api-v2-vulnerabilities-flags",
        "summary": "Update Vulnerability Flags",
        "description": "Adds or removes one or more existing flags from multiple vulnerabilities. The caller must have permission to update vulnerability flags and must be able to access every requested vulnerability. Vulnerability IDs and flag IDs must be valid 24-character hexadecimal object IDs. Do not repeat an ID within either array.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation": {
                    "type": "string",
                    "description": "Operation to perform on the vulnerability flags. Accepted values are add and remove.",
                    "enum": [
                      "add",
                      "remove"
                    ]
                  },
                  "vulnerability_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "One or more unique vulnerability IDs (24-character hexadecimal object IDs). Do not repeat an ID within the array."
                  },
                  "flag_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "One or more unique, existing, active flag IDs (24-character hexadecimal object IDs). Do not repeat an ID within the array."
                  }
                },
                "required": [
                  "operation",
                  "vulnerability_ids",
                  "flag_ids"
                ]
              }
            }
          }
        }
      }
    }
  }
}
```