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

# Stop conversation turn

> Stop the latest turn of a conversation, and wait until it ends. The turn then has the `interrupted` status, or its own status if it ended before the stop. If the turn does not end in time, the endpoint returns 202 and `in_progress`. This endpoint is in alpha and may change.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/convai/conversations/{conversation_id}/stop
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/conversations/{conversation_id}/stop:
    post:
      tags:
        - Agents Platform
      summary: Stop conversation turn
      description: >-
        Stop the latest turn of a conversation, and wait until it ends. The turn
        then has the `interrupted` status, or its own status if it ended before
        the stop. If the turn does not end in time, the endpoint returns 202 and
        `in_progress`. This endpoint is in alpha and may change.
      operationId: stop_conversation_turn_route
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            description: The Conversation ID
            title: Conversation Id
          description: The Conversation 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:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/StopConversationTurnRequest'
                - type: 'null'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationTurn'
        '202':
          description: The turn did not end in time.
          headers:
            Location:
              description: The path of the turn.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationTurn'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StopConversationTurnRequest:
      properties:
        turn_id:
          anyOf:
            - type: string
              maxLength: 20
              pattern: ^[1-9][0-9]*$
            - type: 'null'
          title: Turn Id
          description: >-
            The turn to stop. If you omit it, the endpoint stops the latest turn
            of the conversation. Send it so that a late stop cannot stop a newer
            turn.
      type: object
      title: StopConversationTurnRequest
    ConversationTurn:
      properties:
        turn_id:
          type: string
          title: Turn Id
        status:
          $ref: '#/components/schemas/AgentOutputStatus'
        output:
          items:
            $ref: '#/components/schemas/TextOutputItem'
          type: array
          title: Output
        error:
          anyOf:
            - $ref: '#/components/schemas/AgentOutputError'
            - type: 'null'
        required_actions:
          items:
            $ref: '#/components/schemas/ClientToolCallRequiredAction'
          type: array
          title: Required Actions
          description: >-
            The actions the agent waits on. Answer each `client_tool_call` with
            a `client_tool_result` item in `input` to continue.
        stream_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Stream Cursor
          description: >-
            Resume token for this turn's event stream. Present while the turn is
            in progress; pass it as Last-Event-ID to stream the turn's events.
      type: object
      required:
        - turn_id
        - status
      title: ConversationTurn
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentOutputStatus:
      type: string
      enum:
        - in_progress
        - completed
        - requires_action
        - failed
        - timed_out
        - interrupted
      title: AgentOutputStatus
    TextOutputItem:
      properties:
        type:
          type: string
          const: text
          title: Type
          default: text
        role:
          type: string
          const: agent
          title: Role
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        text:
          type: string
          title: Text
        created_at_unix_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At Unix Ms
      additionalProperties: false
      type: object
      required:
        - role
        - text
      title: TextOutputItem
    AgentOutputError:
      properties:
        type:
          type: string
          title: Type
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
        - type
        - code
        - message
      title: AgentOutputError
    ClientToolCallRequiredAction:
      properties:
        type:
          type: string
          const: client_tool_call
          title: Type
          default: client_tool_call
        tool_call_id:
          type: string
          title: Tool Call Id
        tool_name:
          type: string
          title: Tool Name
        parameters:
          additionalProperties: true
          type: object
          title: Parameters
      type: object
      required:
        - tool_call_id
        - tool_name
        - parameters
      title: ClientToolCallRequiredAction
    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.