> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corgea.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update detection status

> Changes one accessible SAST detection. Requires `heeler.view_issue` and `heeler.change_issue_status`. Supply status and a non-empty comment. False-positive and accepted-risk comments must explain the decision; other statuses, including reopening, are exempt from justification review but still require a comment. When company settings require approval, false_positive, duplicate, or accepted_risk decisions return 202 and leave the detection unchanged until approval. The False positive setting also covers duplicate. Requesters with permission to approve triage requests bypass this requirement. Bulk count and severity thresholds do not apply. Unknown fields are rejected.

Also served at `/api/v1/issue/{issue_id}`, this endpoint's earlier name, which stays supported with the same parameters and response.



## OpenAPI

````yaml /api-reference/openapi.json patch /detections/{issue_id}
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API for interacting with Corgea's scanning and vulnerability management
    features
servers:
  - url: https://www.corgea.app/api/v1
    description: Production server
  - url: https://eu.corgea.app/api/v1
    description: EU production server
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /detections/{issue_id}:
    patch:
      tags:
        - Detections
      summary: Update detection status
      description: >-
        Changes one accessible SAST detection. Requires `heeler.view_issue` and
        `heeler.change_issue_status`. Supply status and a non-empty comment.
        False-positive and accepted-risk comments must explain the decision;
        other statuses, including reopening, are exempt from justification
        review but still require a comment. When company settings require
        approval, false_positive, duplicate, or accepted_risk decisions return
        202 and leave the detection unchanged until approval. The False positive
        setting also covers duplicate. Requesters with permission to approve
        triage requests bypass this requirement. Bulk count and severity
        thresholds do not apply. Unknown fields are rejected.


        Also served at `/api/v1/issue/{issue_id}`, this endpoint's earlier name,
        which stays supported with the same parameters and response.
      operationId: updateIssueStatus
      parameters:
        - name: issue_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The ID of the issue
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueStatusRequest'
      responses:
        '200':
          description: Request completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueStatusResponse'
        '202':
          description: Awaiting approval; issue status is unchanged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueStatusResponse'
        '400':
          description: Invalid request or insufficient justification
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: Issue changed before the update was saved; refresh and retry
components:
  schemas:
    IssueStatusRequest:
      type: object
      properties:
        status:
          type: string
          enum:
            - open
            - fix_in_progress
            - fixed
            - false_positive
            - accepted_risk
            - duplicate
        comment:
          type: string
          minLength: 1
        expiry_date:
          type: string
          format: date-time
          nullable: true
          description: >-
            Optional future ISO-8601 expiry for accepted risk, at most 366 days
            away.
      required:
        - status
        - comment
      additionalProperties: false
    IssueStatusResponse:
      type: object
      properties:
        status:
          type: string
          example: ok
        action:
          $ref: '#/components/schemas/TriageAction'
        issue:
          type: object
          properties:
            id:
              type: string
              format: uuid
            status:
              type: string
              enum:
                - open
                - fix_in_progress
                - fixed
                - false_positive
                - accepted_risk
                - duplicate
            status_comment:
              type: string
              nullable: true
            accepted_risk_expiry_date:
              type: string
              format: date-time
              nullable: true
    TriageAction:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - preview
            - pending_approval
            - applied
            - rejected
            - failed
        source:
          type: string
          enum:
            - api
            - cli
            - cxone
        target_status:
          type: string
        justification:
          type: string
        accepted_risk_expiry_date:
          type: string
          format: date-time
          nullable: true
        rule:
          type: object
        source_metadata:
          type: object
        requires_approval:
          type: boolean
        requested_by:
          type: integer
          nullable: true
        approved_by:
          type: integer
          nullable: true
        rejected_by:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        reviewed_at:
          type: string
          format: date-time
          nullable: true
        applied_at:
          type: string
          format: date-time
          nullable: true
        counts:
          type: object
          properties:
            matched:
              type: integer
            unmatched:
              type: integer
            ambiguous:
              type: integer
            applied:
              type: integer
            conflicts:
              type: integer
  responses:
    Unauthorized:
      description: Invalid or missing token
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Missing or invalid authorization header
    Forbidden:
      description: Permission denied or feature unavailable
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Permission denied
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Policy not found
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: >-
        API key for authentication API tokens belonging to inactive users are
        rejected.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token (JWT) in the Authorization header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.