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

# Update Review Discussion

> Create a review thread, reply, edit or delete your own comment, or resolve or reopen a thread. Use body for create, reply and edit; thread_id for reply, resolve and reopen; comment_id for edit and delete; original_item_id only to start an item thread. Requires a user token and the same review and item access as the app. Closed or applied reviews are read-only.

## Authentication and permissions

> **Token requirements:** **User-based token (OAuth)**.
>
> Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.

| Credential | Access requirements |
| - | - |
| Organization-scoped API key | Unsupported |
| Workspace-scoped API key | Unsupported |
| User-based token (OAuth) | Supported, subject to permissions |

Permissions joined by **+** are all required; **or** separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Workspace keys must allow every workspace checked by the request. OAuth access depends on the user’s roles and resource access.

Requires a user token and the same review and item access as comments in the app. Comments stay within the review's organization. Only the author may edit or delete a comment. Closed or applied reviews are read-only.

* **User: session review:** Requires permission to view configuration sessions in the session's workspace.

* **User: promotion:** Requires review or apply permission on the target workspace, or both staging permission on the target workspace and author permission on the source workspace.

* **User: parent-to-branch pull:** For a recorded parent-to-branch pull, staging permission on the target branch and branch permission on the source parent also authorize access.


## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/reviews/{review_id}/discussion
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Membership API
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: Alerts API
  - name: Analytics API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Procedure API
  - name: Approval Request API
  - name: Assignment Rules API
  - name: Audit Log API
  - name: Billing API
  - name: Browser API
  - name: Campaign API
  - name: Change Blackout API
  - name: Change Model API
  - name: Connected Channels API
  - name: Custom Field API
  - name: Custom Role API
  - name: Custom Service API
  - name: Dashboards API
  - name: Email Intake API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Forms
  - name: Forms API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Improvement Request API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: One-Time Window API
  - name: Package API
  - name: Platform Migration API
  - name: Project API
  - name: Report API
  - name: Review API
  - name: Role Sync API
  - name: Roles API
  - name: SLA API
  - name: Schedule API
  - name: Skills API
  - name: Tag API
  - name: Ticket API
  - name: Ticket Import API
  - name: Ticket Type API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Widgets API
  - name: Worker API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
  - name: Workspace API
  - name: Workspace Group API
  - name: Workspace SDLC Settings API
  - name: Workspace User API
paths:
  /v2/reviews/{review_id}/discussion:
    post:
      tags:
        - Review API
      summary: Update Review Discussion
      description: >-
        Create a review thread, reply, edit or delete your own comment, or
        resolve or reopen a thread. Use body for create, reply and edit;
        thread_id for reply, resolve and reopen; comment_id for edit and delete;
        original_item_id only to start an item thread. Requires a user token and
        the same review and item access as the app. Closed or applied reviews
        are read-only.
      operationId: svrelay.publicv2.PublicAPIServiceV2.UpdateReviewDiscussion
      parameters:
        - name: review_id
          in: path
          required: true
          schema:
            type: string
            title: review_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                operation:
                  $ref: >-
                    #/components/schemas/svmeta.publicapi.ReviewDiscussionOperation
                  title: operation
                threadId:
                  type: string
                  title: thread_id
                  description: Required for reply, resolve and reopen.
                commentId:
                  type: string
                  title: comment_id
                  description: Required for edit and delete.
                originalItemId:
                  type:
                    - string
                    - 'null'
                  title: original_item_id
                  description: Set only when creating a thread on an item.
                body:
                  type: string
                  title: body
                  description: Required for create_thread, reply and edit.
              title: UpdateReviewDiscussionRequest
              required:
                - operation
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svmeta.publicapi.UpdateReviewDiscussionResponse
      security:
        - BearerAuth: []
components:
  schemas:
    svmeta.publicapi.ReviewDiscussionOperation:
      type: string
      title: ReviewDiscussionOperation
      enum:
        - REVIEW_DISCUSSION_OPERATION_UNSPECIFIED
        - REVIEW_DISCUSSION_OPERATION_CREATE_THREAD
        - REVIEW_DISCUSSION_OPERATION_REPLY
        - REVIEW_DISCUSSION_OPERATION_EDIT
        - REVIEW_DISCUSSION_OPERATION_DELETE
        - REVIEW_DISCUSSION_OPERATION_RESOLVE
        - REVIEW_DISCUSSION_OPERATION_REOPEN
    svmeta.publicapi.UpdateReviewDiscussionResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svmeta.publicapi.ReviewDiscussionUpdate'
          title: data
          x-stainless-terraform-configurability: optional
      title: UpdateReviewDiscussionResponse
      additionalProperties: false
    svmeta.publicapi.ReviewDiscussionUpdate:
      type: object
      properties:
        threadId:
          type: string
          title: thread_id
          x-stainless-terraform-configurability: optional
        commentId:
          type: string
          title: comment_id
          x-stainless-terraform-configurability: optional
      title: ReviewDiscussionUpdate
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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