---
updatedAt: 2026-08-17T05:44:46.000Z
agentTools:
  projectIndex: https://docs.kondukto.io/llms.txt
---

# Get Flags

Returns the active flags available to the authenticated organization. The returned flag IDs can be used with the vulnerability flag update endpoint.

# 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/flags": {
      "get": {
        "responses": {
          "200": {
            "description": "OK — List of available flags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "description": "Pagination offset used in the request",
                      "default": "0"
                    },
                    "limit": {
                      "type": "integer",
                      "default": "30",
                      "description": "Number of flags returned"
                    },
                    "total": {
                      "type": "integer",
                      "description": "Total number of available flags"
                    },
                    "flags": {
                      "type": "array",
                      "description": "List of available flags",
                      "items": {
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "24-character hexadecimal object ID of the flag"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name of the flag"
                          },
                          "color": {
                            "type": "string",
                            "description": "Hex color code associated with the flag"
                          }
                        },
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request — The flags could not be retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message describing what went wrong",
                      "default": "failed to get flags"
                    }
                  }
                }
              }
            }
          },
          "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 does not have permission to read flags.",
            "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": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": "30"
            },
            "required": false,
            "description": "Number of flags to return. The default and maximum value is 30."
          },
          {
            "in": "query",
            "name": "start",
            "schema": {
              "type": "integer",
              "default": "0"
            },
            "description": "Pagination offset. The default value is 0."
          }
        ],
        "operationId": "get_api-v2-flags",
        "summary": "Get Flags",
        "description": "Returns the active flags available to the authenticated organization. The returned flag IDs can be used with the vulnerability flag update endpoint."
      }
    }
  }
}
```