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

# Review a merge proposal

> Approve a merge_proposal or request changes on it. A user's latest review replaces their previous one. Non-admins need an approval from another user before the merge is allowed.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/agents/{agent_id}/merge-proposals/{merge_proposal_id}/reviews
openapi: 3.1.0
info:
  title: Threetone API
  description: >-
    APIs for the Threetone Agents Platform and shared workspace resources.
    Authenticate programmatic requests with an API key in the x-api-key header.
  version: '1.0'
servers:
  - url: https://api.threetone.in
    description: Production
security: []
paths:
  /v1/convai/agents/{agent_id}/merge-proposals/{merge_proposal_id}/reviews:
    post:
      tags:
        - Agents Platform
      summary: Review a merge proposal
      description: >-
        Approve a merge_proposal or request changes on it. A user's latest
        review replaces their previous one. Non-admins need an approval from
        another user before the merge is allowed.
      operationId: submit_merge_proposal_review_route
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            description: The id of an agent. This is returned on agent creation.
            examples:
              - agent_3701k3ttaq12ewp8b7qv5rfyszkz
            embed: true
            title: Agent Id
          description: The id of an agent. This is returned on agent creation.
        - name: merge_proposal_id
          in: path
          required: true
          schema:
            type: string
            description: Unique identifier for the merge_proposal.
            examples:
              - agtmprop_8901k4t9z5defmb8vh3e9361y7nj
            title: Merge Proposal Id
          description: Unique identifier for the merge_proposal.
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your API key for programmatic access. Send it in the x-api-key
              header; you can create and manage keys from the Developers page.
            title: X-Api-Key
          description: >-
            Your API key for programmatic access. Send it in the x-api-key
            header; you can create and manage keys from the Developers page.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_Review_a_merge_proposal_v1_convai_agents__agent_id__merge_proposals__merge_proposal_id__reviews_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentMergeProposalResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_Review_a_merge_proposal_v1_convai_agents__agent_id__merge_proposals__merge_proposal_id__reviews_post:
      properties:
        state:
          $ref: '#/components/schemas/MergeProposalReviewState'
          description: The review verdict.
        comment:
          type: string
          maxLength: 4096
          title: Comment
          description: Optional comment to leave with the review.
          default: ''
      type: object
      required:
        - state
      title: >-
        Body_Review_a_merge_proposal_v1_convai_agents__agent_id__merge_proposals__merge_proposal_id__reviews_post
    AgentMergeProposalResponse:
      properties:
        id:
          type: string
          title: Id
        agent_id:
          type: string
          title: Agent Id
        source_branch_id:
          type: string
          title: Source Branch Id
        target_branch_id:
          type: string
          title: Target Branch Id
        source_tip_version_id_at_creation:
          type: string
          title: Source Tip Version Id At Creation
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
          default: ''
        requested_reviewer_user_ids:
          items:
            type: string
          type: array
          title: Requested Reviewer User Ids
        reviews:
          items:
            $ref: '#/components/schemas/MergeProposalReview'
          type: array
          title: Reviews
        comments:
          items:
            $ref: '#/components/schemas/MergeProposalComment'
          type: array
          title: Comments
        outcome:
          oneOf:
            - $ref: '#/components/schemas/OpenOutcome'
            - $ref: '#/components/schemas/MergedOutcome'
            - $ref: '#/components/schemas/ClosedOutcome'
          title: Outcome
          discriminator:
            propertyName: status
            mapping:
              closed: '#/components/schemas/ClosedOutcome'
              merged: '#/components/schemas/MergedOutcome'
              open: '#/components/schemas/OpenOutcome'
        created_at:
          type: integer
          title: Created At
        updated_at:
          type: integer
          title: Updated At
        author_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Author User Id
          description: User ID of the merge_proposal's author.
        access_info:
          anyOf:
            - $ref: '#/components/schemas/ResourceAccessInfo'
            - type: 'null'
          description: Access information for the merge_proposal, including creator.
      type: object
      required:
        - id
        - agent_id
        - source_branch_id
        - target_branch_id
        - source_tip_version_id_at_creation
        - title
        - created_at
        - updated_at
      title: AgentMergeProposalResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MergeProposalReviewState:
      type: string
      enum:
        - approved
        - changes_requested
      title: MergeProposalReviewState
    MergeProposalReview:
      properties:
        user_id:
          type: string
          title: User Id
        state:
          $ref: '#/components/schemas/MergeProposalReviewState'
        submitted_at:
          type: integer
          title: Submitted At
        comment:
          type: string
          title: Comment
          default: ''
        reviewer_role:
          anyOf:
            - type: string
              enum:
                - admin
                - editor
                - commenter
                - viewer
            - type: 'null'
          title: Reviewer Role
      type: object
      required:
        - user_id
        - state
        - submitted_at
      title: MergeProposalReview
    MergeProposalComment:
      properties:
        id:
          type: string
          title: Id
        user_id:
          type: string
          title: User Id
        body:
          type: string
          title: Body
        created_at:
          type: integer
          title: Created At
      type: object
      required:
        - id
        - user_id
        - body
        - created_at
      title: MergeProposalComment
    OpenOutcome:
      properties:
        status:
          type: string
          const: open
          title: Status
          default: open
      additionalProperties: false
      type: object
      title: OpenOutcome
    MergedOutcome:
      properties:
        status:
          type: string
          const: merged
          title: Status
          default: merged
        version_id:
          type: string
          title: Version Id
        at:
          type: integer
          title: At
        by_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: By User Id
      additionalProperties: false
      type: object
      required:
        - version_id
        - at
        - by_user_id
      title: MergedOutcome
    ClosedOutcome:
      properties:
        status:
          type: string
          const: closed
          title: Status
          default: closed
        reason:
          $ref: '#/components/schemas/MergeProposalCloseReason'
        at:
          type: integer
          title: At
        by_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: By User Id
      additionalProperties: false
      type: object
      required:
        - reason
        - at
        - by_user_id
      title: ClosedOutcome
    ResourceAccessInfo:
      properties:
        is_creator:
          type: boolean
          title: Is Creator
          description: Whether the user making the request is the creator of the agent
        creator_name:
          type: string
          title: Creator Name
          description: Name of the agent's creator
        creator_email:
          type: string
          title: Creator Email
          description: Email of the agent's creator
        role:
          type: string
          enum:
            - admin
            - editor
            - commenter
            - viewer
          title: Role
          description: The role of the user making the request
        anonymous_access_level_override:
          anyOf:
            - type: string
              enum:
                - admin
                - editor
                - commenter
                - viewer
            - type: 'null'
          title: Anonymous Access Level Override
          description: >-
            The access level for anonymous users. If None, the resource is not
            shared publicly.
        access_source:
          anyOf:
            - type: string
              enum:
                - creator
                - explicit
                - workspace_admin
                - workspace_default
            - type: 'null'
          title: Access Source
          description: >-
            Why the requesting user has access to this resource. 'creator' =
            caller is the owner. 'explicit' = caller (or one of their workspace
            groups) is listed in role_to_group_ids beyond the workspace-wide
            everyone group. 'workspace_default' = the workspace-wide everyone
            group is listed in role_to_group_ids (every non-anon workspace
            member, including admins, sees this resource). 'workspace_admin' =
            caller is a workspace admin and the admin seat is the *only* path to
            access; reserved for docs nobody else can see. Lets the UI disclose
            why an admin-bypass viewer sees a doc that wasn't explicitly shared
            with them.
      type: object
      required:
        - is_creator
        - creator_name
        - creator_email
        - role
      title: ResourceAccessInfo
      example:
        access_source: creator
        creator_email: john.doe@example.com
        creator_name: John Doe
        is_creator: true
        role: admin
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MergeProposalCloseReason:
      type: string
      enum:
        - withdrawn
        - rejected
        - branch_archived
      title: MergeProposalCloseReason

````

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