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

# stop session

> Force-terminates a running session. The engine hosting the session
disconnects the client and shuts the session down immediately.

Termination is asynchronous on the engine side: the session's
`endTime`, exit status and session report are delivered through the
normal end-of-session flow shortly after the stop, so the session may
briefly still appear active on `GET /v1/sessions/{id}`.

Sessions that never reached an engine, or that run over the LiveKit
or Agora integrations, have no engine host to terminate and return
`404`. If the engine rejects the stop (for example the session has
already ended), the engine's error status is passed through.




## OpenAPI

````yaml https://api.anam.ai/swagger.json post /v1/sessions/{id}/stop
openapi: 3.1.0
info:
  title: Anam AI API
  version: '1.0'
servers:
  - url: https://api.anam.ai
    description: Anam API
security:
  - BearerAuth: []
tags:
  - name: Sessions
  - name: Meetings
  - name: Personas
  - name: Avatars
  - name: Voices
  - name: LLMs
  - name: Knowledge
  - name: Tools
  - name: Share Links
  - name: Engine
paths:
  /v1/sessions/{id}/stop:
    post:
      tags:
        - Sessions
      summary: stop session
      description: |
        Force-terminates a running session. The engine hosting the session
        disconnects the client and shuts the session down immediately.

        Termination is asynchronous on the engine side: the session's
        `endTime`, exit status and session report are delivered through the
        normal end-of-session flow shortly after the stop, so the session may
        briefly still appear active on `GET /v1/sessions/{id}`.

        Sessions that never reached an engine, or that run over the LiveKit
        or Agora integrations, have no engine host to terminate and return
        `404`. If the engine rejects the stop (for example the session has
        already ended), the engine's error status is passed through.
      operationId: stopSession
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
          description: Session ID
      responses:
        '200':
          description: The engine accepted the stop request
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Bad request - Invalid session ID
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - API key lacks the required permission
        '404':
          description: >-
            Not Found - Session not found, or it has no engine to terminate (it
            never reached an engine, or is a LiveKit/Agora session)
        '500':
          description: Server error
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````