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

# Update Issue

> Perform actions on an issue (add comment or change status)



## OpenAPI

````yaml api-reference/openapi.json post /api/org/projects/{shortcode}/findings/{ref}
openapi: 3.0.3
info:
  title: Dvuln Organisation API
  description: API for managing projects, issues, and comments in Dvuln platform
  version: 1.0.0
servers:
  - url: https://{host}
    description: Dvuln API Server
    variables:
      host:
        default: console.dvuln.com
        description: The API host domain
security:
  - ApiKeyAuth: []
paths:
  /api/org/projects/{shortcode}/findings/{ref}:
    post:
      summary: Update Issue
      description: Perform actions on an issue (add comment or change status)
      operationId: updateIssue
      parameters:
        - name: shortcode
          in: path
          required: true
          description: Project shortcode identifier
          schema:
            type: string
        - name: ref
          in: path
          required: true
          description: Issue/finding reference identifier
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  title: Comment Action
                  required:
                    - action
                    - comment
                  properties:
                    action:
                      type: string
                      enum:
                        - comment
                      description: Action type for adding a comment
                    comment:
                      type: string
                      description: The comment text to add
                - type: object
                  title: State Change Action
                  required:
                    - action
                    - state
                  properties:
                    action:
                      type: string
                      enum:
                        - state_change
                      description: Action type for changing issue state
                    state:
                      type: integer
                      description: >
                        The new state ID for the issue.


                        Valid state IDs:

                        - 1: Draft - Issue has been created and awaiting details
                        from the reporter

                        - 2: Awaiting Review - Issue has been finalised and is
                        awaiting review from the project manager

                        - 3: Open - Issue has been reviewed and details are
                        available to the client

                        - 4: Retest - Client has marked issue as resolved and
                        has requested the issue to be retested

                        - 5: Accepted Risk - Client has marked the issue as an
                        accepted risk

                        - 6: False Positive - Issue has been marked as a
                        false-positive finding

                        - 7: Resolved - Issue has been retested and closed as
                        resolved


                        IMPORTANT: The API will only accept state IDs that are
                        valid for the current issue status.

                        Valid transitions are specified in the issue's
                        status.canMoveToId field (comma-separated).

                        For example, if canMoveToId is "4", only state 4
                        (Retest) will be accepted.

                        If canMoveToId is "4,5,6", states 4, 5, and 6 are valid
                        transitions.
            examples:
              addComment:
                value:
                  action: comment
                  comment: This is a test comment
              changeState:
                value:
                  action: state_change
                  state: 3
      responses:
        '200':
          description: Action performed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    example: OK
        '400':
          description: Bad request - Invalid input
        '403':
          description: Forbidden - Invalid or missing API key
        '404':
          description: Issue not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Token
      description: API key for authentication

````