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

# Set Thread Handoff

> Hand the conversation to your agent (`external`), or give it back to AGO's AI (`ai`).

While `external`, the customer's messages are recorded and reported as events, but AGO's AI does not answer
them. `ai` only ends your agent's turn: a conversation the AGO team handles keeps its state.



## OpenAPI

````yaml /openapi-v1.json put /api/v1/conversations/{thread_id}/handoff
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/conversations/{thread_id}/handoff:
    put:
      tags:
        - Conversations
      summary: Set Thread Handoff
      description: >-
        Hand the conversation to your agent (`external`), or give it back to
        AGO's AI (`ai`).


        While `external`, the customer's messages are recorded and reported as
        events, but AGO's AI does not answer

        them. `ai` only ends your agent's turn: a conversation the AGO team
        handles keeps its state.
      operationId: v1_set_conversation_handoff
      parameters:
        - in: path
          name: thread_id
          schema:
            format: uuid
            title: Thread Id
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThreadHandoffIn'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadOut'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    ThreadHandoffIn:
      additionalProperties: false
      properties:
        handoff_state:
          description: >-
            external: your agent answers through the API and AGO's AI stays
            silent. ai: give it back to AGO's AI.
          enum:
            - external
            - ai
          title: Handoff State
          type: string
      required:
        - handoff_state
      title: ThreadHandoffIn
      type: object
    ThreadOut:
      properties:
        provenance:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Provenance
        topics:
          default: []
          items:
            additionalProperties: true
            type: object
          title: Topics
          type: array
        object:
          default: thread
          title: Object
          type: string
        id:
          title: Id
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        ticket:
          anyOf:
            - $ref: '#/components/schemas/ThreadTicketSummaryOut'
            - type: 'null'
        user_email:
          anyOf:
            - type: string
            - type: 'null'
          title: User Email
        evaluation:
          anyOf:
            - type: string
            - type: 'null'
          title: Evaluation
        evaluation_comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Evaluation Comment
        reviewed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviewed At
        admin_status:
          anyOf:
            - $ref: '#/components/schemas/ThreadAdminStatusOut'
            - type: 'null'
        admin_tags:
          default: []
          items:
            $ref: '#/components/schemas/ThreadAdminTagOut'
          title: Admin Tags
          type: array
        llm_judge_evaluated:
          default: false
          title: Llm Judge Evaluated
          type: boolean
        llm_judge_need_review:
          default: false
          title: Llm Judge Need Review
          type: boolean
        cx_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Cx Score
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
        message_count:
          default: 0
          title: Message Count
          type: integer
        handoff_state:
          default: ai
          enum:
            - ai
            - waiting
            - human
            - external
          title: Handoff State
          type: string
      required:
        - id
      title: ThreadOut
      type: object
    ThreadTicketSummaryOut:
      properties:
        object:
          default: ticket
          title: Object
          type: string
        id:
          title: Id
          type: string
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        ticketing_system:
          title: Ticketing System
          type: string
      required:
        - id
        - ticketing_system
      title: ThreadTicketSummaryOut
      type: object
    ThreadAdminStatusOut:
      properties:
        object:
          default: thread_admin_status
          title: Object
          type: string
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
      required:
        - id
        - name
      title: ThreadAdminStatusOut
      type: object
    ThreadAdminTagOut:
      properties:
        object:
          default: admin_tag
          title: Object
          type: string
        id:
          title: Id
          type: string
        name:
          title: Name
          type: string
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
      required:
        - id
        - name
      title: ThreadAdminTagOut
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

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