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

# Merge tickets

> Merge other open tickets of the same agent into this pending, in-progress, or resolved one. Their conversations move onto this ticket, its priority is raised to the highest among them, and they are kept with status 'merged'. Requires viewer access to the ticket's agent.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/triage-tickets/{agentqa_ticket_id}/merge
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/triage-tickets/{agentqa_ticket_id}/merge:
    post:
      summary: Merge tickets
      description: >-
        Merge other open tickets of the same agent into this pending,
        in-progress, or resolved one. Their conversations move onto this ticket,
        its priority is raised to the highest among them, and they are kept with
        status 'merged'. Requires viewer access to the ticket's agent.
      operationId: merge_agent_conversation_tickets_route
      parameters:
        - name: agentqa_ticket_id
          in: path
          required: true
          schema:
            type: string
            title: Agentqa Ticket Id
        - 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/MergeAgentConversationTicketsRequestModel'
              description: Tickets to merge into this one.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentConversationTicketResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MergeAgentConversationTicketsRequestModel:
      properties:
        source_ticket_ids:
          items:
            type: string
          type: array
          maxItems: 50
          minItems: 1
          title: Source Ticket Ids
          description: >-
            Open tickets of the same agent to fold into this one. They are kept
            with status 'merged', pointing at this ticket.
      type: object
      required:
        - source_ticket_ids
      title: MergeAgentConversationTicketsRequestModel
    AgentConversationTicketResponseModel:
      properties:
        agentqa_ticket_id:
          type: string
          title: Agentqa Ticket Id
        workspace_id:
          type: string
          title: Workspace Id
        owner_user_id:
          type: string
          title: Owner User Id
        agent_id:
          type: string
          title: Agent Id
        needs_clustering:
          type: boolean
          title: Needs Clustering
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: >-
            One-line headline for the ticket. None only on tickets created
            before titles existed.
        issue_type:
          anyOf:
            - $ref: '#/components/schemas/AgentConversationTicketIssueType'
            - type: 'null'
        labels:
          items:
            type: string
          type: array
          title: Labels
        conversation_ids:
          items:
            type: string
          type: array
          title: Conversation Ids
        first_seen_unix_secs:
          anyOf:
            - type: integer
            - type: 'null'
          title: First Seen Unix Secs
        last_seen_unix_secs:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Seen Unix Secs
        qa_comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Qa Comment
        ticket_comments:
          items:
            $ref: '#/components/schemas/TicketCommentResponseModel'
          type: array
          title: Ticket Comments
        turn_comments:
          items:
            $ref: '#/components/schemas/TurnCommentResponseModel'
          type: array
          title: Turn Comments
        status:
          $ref: '#/components/schemas/AgentConversationTicketStatus'
        priority:
          anyOf:
            - $ref: '#/components/schemas/AgentConversationTicketPriority'
            - type: 'null'
        priority_changes:
          items:
            $ref: '#/components/schemas/TicketPriorityChangeResponseModel'
          type: array
          title: Priority Changes
        status_changes:
          items:
            $ref: '#/components/schemas/TicketStatusChangeResponseModel'
          type: array
          title: Status Changes
        merged_into_ticket_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Merged Into Ticket Id
          description: >-
            The ticket this one was merged into, set while its status is
            'merged'.
        source:
          $ref: '#/components/schemas/AgentConversationTicketSource'
        assignee_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee User Id
        created_at_unix_secs:
          type: integer
          title: Created At Unix Secs
        updated_at_unix_secs:
          type: integer
          title: Updated At Unix Secs
        search_match:
          anyOf:
            - $ref: '#/components/schemas/TicketSearchMatchResponseModel'
            - type: 'null'
          description: Where the list's `search` query matched. Set only on searched lists.
      type: object
      required:
        - agentqa_ticket_id
        - workspace_id
        - owner_user_id
        - agent_id
        - needs_clustering
        - title
        - issue_type
        - labels
        - conversation_ids
        - first_seen_unix_secs
        - last_seen_unix_secs
        - qa_comment
        - ticket_comments
        - turn_comments
        - status
        - priority
        - priority_changes
        - status_changes
        - source
        - assignee_user_id
        - created_at_unix_secs
        - updated_at_unix_secs
      title: AgentConversationTicketResponseModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentConversationTicketIssueType:
      type: string
      enum:
        - knowledge_gap
        - incorrect_information
        - documentation_gap
        - product_feedback
        - platform_bug
        - tool_issue
        - missing_tool
        - unnecessary_escalation
        - wrong_action
      title: AgentConversationTicketIssueType
    TicketCommentResponseModel:
      properties:
        comment:
          type: string
          title: Comment
        created_at_unix_secs:
          type: integer
          title: Created At Unix Secs
        owner_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner User Id
      type: object
      required:
        - comment
        - created_at_unix_secs
        - owner_user_id
      title: TicketCommentResponseModel
    TurnCommentResponseModel:
      properties:
        turn_index:
          type: integer
          title: Turn Index
        comment:
          type: string
          title: Comment
        created_at_unix_secs:
          type: integer
          title: Created At Unix Secs
        owner_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner User Id
      type: object
      required:
        - turn_index
        - comment
        - created_at_unix_secs
        - owner_user_id
      title: TurnCommentResponseModel
    AgentConversationTicketStatus:
      type: string
      enum:
        - open
        - in_progress
        - resolved
        - cancelled
        - merged
      title: AgentConversationTicketStatus
    AgentConversationTicketPriority:
      type: string
      enum:
        - low
        - medium
        - high
        - urgent
      title: AgentConversationTicketPriority
    TicketPriorityChangeResponseModel:
      properties:
        priority:
          anyOf:
            - $ref: '#/components/schemas/AgentConversationTicketPriority'
            - type: 'null'
        changed_by_user_id:
          type: string
          title: Changed By User Id
        changed_at_unix_secs:
          type: integer
          title: Changed At Unix Secs
      type: object
      required:
        - priority
        - changed_by_user_id
        - changed_at_unix_secs
      title: TicketPriorityChangeResponseModel
    TicketStatusChangeResponseModel:
      properties:
        status:
          $ref: '#/components/schemas/AgentConversationTicketStatus'
        changed_by_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Changed By User Id
        changed_at_unix_secs:
          type: integer
          title: Changed At Unix Secs
      type: object
      required:
        - status
        - changed_by_user_id
        - changed_at_unix_secs
      title: TicketStatusChangeResponseModel
    AgentConversationTicketSource:
      type: string
      enum:
        - qa
        - agent
        - manual
      title: AgentConversationTicketSource
    TicketSearchMatchResponseModel:
      properties:
        field:
          $ref: '#/components/schemas/TicketSearchMatchField'
          description: Which of the ticket's texts matched.
        snippet:
          type: string
          title: Snippet
          description: >-
            Whitespace-collapsed excerpt around the match, with an ellipsis
            where it was cut.
        highlight_start:
          type: integer
          title: Highlight Start
          description: Offset of the match in `snippet`.
        highlight_end:
          type: integer
          title: Highlight End
          description: Exclusive end offset of the match in `snippet`.
        turn_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Turn Index
          description: The commented turn, set when `field` is 'turn_comment'.
      type: object
      required:
        - field
        - snippet
        - highlight_start
        - highlight_end
      title: TicketSearchMatchResponseModel
    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
    TicketSearchMatchField:
      type: string
      enum:
        - title
        - description
        - comment
        - turn_comment
      title: TicketSearchMatchField

````

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