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

# Stop Bot

> Stop a running bot and trigger the full exit pipeline. The bot will save the transcript, process insights (if enabled), send results via email/webhook, and leave the video meeting room. The bot typically exits within 5 seconds of the request.



## OpenAPI

````yaml /pailflow/api-reference/openapi.json post /v1/bots/leave/{bot_id}
openapi: 3.0.1
info:
  title: PailFlow API
  description: API for adding AI bots to video meetings
  version: 0.1.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/bots/leave/{bot_id}:
    post:
      summary: Stop Bot
      description: >-
        Stop a running bot and trigger the full exit pipeline. The bot will save
        the transcript, process insights (if enabled), send results via
        email/webhook, and leave the video meeting room. The bot typically exits
        within 5 seconds of the request.
      operationId: stopBot
      parameters:
        - name: bot_id
          in: path
          required: true
          description: The bot ID returned from POST /api/bot/join
          schema:
            type: string
            format: uuid
          example: 258b06fc-6bc9-4261-9f29-bc8a4474af0a
      responses:
        '200':
          description: Bot stop request sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: leave_requested
                    description: Status indicating the leave request was sent
                  bot_id:
                    type: string
                    format: uuid
                    example: 258b06fc-6bc9-4261-9f29-bc8a4474af0a
                    description: The bot ID for which leave was requested
                  message:
                    type: string
                    example: Bot stop request sent. Bot will exit within 5 seconds.
                    description: Informational message about the stop request
              example:
                status: leave_requested
                bot_id: 258b06fc-6bc9-4261-9f29-bc8a4474af0a
                message: Bot stop request sent. Bot will exit within 5 seconds.
        '401':
          description: Authentication error or user not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: authentication_error
                detail: API key authentication failed.
                message: Please verify your API key or contact support.
        '404':
          description: Bot session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: not_found
                detail: Bot session 258b06fc-6bc9-4261-9f29-bc8a4474af0a not found
                message: The specified bot session does not exist.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: server_error
                detail: Failed to stop bot. Please try again.
                message: An error occurred while processing your request.
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error type
        detail:
          type: string
          description: Error detail message
        message:
          type: string
          description: User-friendly error message
        balance:
          type: number
          description: Current account balance (for insufficient_credits errors)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key from pailflow.com

````