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

# Move WhatsApp conversation between responders

> Pass a conversation to another role (such as Meta's AI agent), take it, or release it. Only the current owner can pass or release; only the escalation partner can take.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/thread-control
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/thread-control:
    post:
      tags:
        - WhatsApp
      summary: Move WhatsApp conversation between responders
      description: >-
        Pass a conversation to another role (such as Meta's AI agent), take it,
        or release it. Only the current owner can pass or release; only the
        escalation partner can take.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the connection
          name: connection_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the WhatsApp phone number
          name: phone_number_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsAppThreadControlSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/WhatsAppThreadControlSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppThreadControlResultSchema'
components:
  schemas:
    WhatsAppThreadControlSchema:
      type: object
      properties:
        to:
          type: string
          maxLength: 32
          description: The customer phone number or WhatsApp ID.
        recipient:
          type: string
          maxLength: 128
          description: The customer business-scoped user ID, instead of to.
        action:
          $ref: '#/components/schemas/WhatsAppThreadControlActionSchema'
        control_pass:
          type: object
          properties:
            target_role:
              $ref: '#/components/schemas/WhatsAppThreadControlRoleSchema'
          required:
            - target_role
          description: >-
            Where a pass goes. Without it the conversation goes to the
            escalation partner.
        metadata:
          type: string
          maxLength: 2000
          description: Free text Meta forwards to the new owner in the handover.
      required:
        - action
    WhatsAppThreadControlResultSchema:
      type: object
      properties:
        messaging_product:
          type: string
        request_id:
          type: string
      required:
        - messaging_product
        - request_id
    WhatsAppThreadControlActionSchema:
      type: string
      enum:
        - pass
        - take
        - release
      description: >-
        pass hands the conversation to another role, take claims it (escalation
        partner only), release hands it back to the entry point owner.
    WhatsAppThreadControlRoleSchema:
      type: string
      enum:
        - ai_agent
        - customer_service
        - ctwa
        - escalation
        - marketing
        - utility
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````