> ## 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.

# Create a merge proposal

> Record a request to merge a source branch into a target branch. Anyone with edit access can open one; merging it later is gated on write access to the target branch, so this is how a change reaches a protected branch the author cannot merge into themselves.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/agents/{agent_id}/merge-proposals
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:
    post:
      tags:
        - Agents Platform
      summary: Create a merge proposal
      description: >-
        Record a request to merge a source branch into a target branch. Anyone
        with edit access can open one; merging it later is gated on write access
        to the target branch, so this is how a change reaches a protected branch
        the author cannot merge into themselves.
      operationId: create_merge_proposal_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: 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_Create_a_merge_proposal_v1_convai_agents__agent_id__merge_proposals_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAgentMergeProposalResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_Create_a_merge_proposal_v1_convai_agents__agent_id__merge_proposals_post:
      properties:
        source_branch_id:
          type: string
          title: Source Branch Id
          description: Branch whose changes should be merged.
        target_branch_id:
          type: string
          title: Target Branch Id
          description: Branch that should receive the changes.
        title:
          type: string
          maxLength: 140
          minLength: 1
          title: Title
          description: Short title for the merge_proposal.
        description:
          type: string
          maxLength: 4096
          title: Description
          description: Optional longer description for reviewers.
          default: ''
        requested_reviewer_user_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 100
            - type: 'null'
          title: Requested Reviewer User Ids
          description: User IDs to request a review from.
        triage_ticket_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Triage Ticket Id
          description: >-
            Triage ticket of this agent that the merge_proposal resolves.
            Merging it resolves the ticket if still open.
      type: object
      required:
        - source_branch_id
        - target_branch_id
        - title
      title: >-
        Body_Create_a_merge_proposal_v1_convai_agents__agent_id__merge_proposals_post
    CreateAgentMergeProposalResponseModel:
      properties:
        created_merge_proposal_id:
          type: string
          title: Created Merge Proposal Id
          description: ID of the created merge_proposal
      type: object
      required:
        - created_merge_proposal_id
      title: CreateAgentMergeProposalResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````

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