> ## Documentation Index
> Fetch the complete documentation index at: https://daily-hush-pcc-session-recordings-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop an Agent Session

> Stop a running agent session and clean up its resources.



## OpenAPI

````yaml DELETE /agents/{agentName}/sessions/{sessionId}
openapi: 3.0.0
info:
  title: Pipecat Cloud
  version: 1.0.0
  description: >-
    REST API for Pipecat Cloud. The public API (`/v1/public`, authenticated with
    a public API key) starts agent sessions and proxies requests to them. The
    private API (`/v1`, authenticated with a private API key) manages agents,
    secrets, builds, regions, and organization settings.
servers:
  - url: https://api.pipecat.daily.co/v1
    description: Private API server
security: []
paths:
  /agents/{agentName}/sessions/{sessionId}:
    delete:
      summary: Stop an agent session
      description: Stops an active session of a deployed agent and cleans up its resources.
      operationId: stopSession
      parameters:
        - name: agentName
          in: path
          required: true
          description: Name of the agent
          schema:
            type: string
        - name: sessionId
          in: path
          required: true
          description: UUID of the session to stop
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Session stopped successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StopResponse'
        '400':
          description: Invalid request (e.g., invalid session ID format)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Service or session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - PrivateKeyAuth: []
components:
  schemas:
    StopResponse:
      type: object
      properties:
        status:
          type: string
          description: Status of the stop operation
          example: terminated
        session_id:
          type: string
          format: uuid
          description: Session ID of the stopped session
          example: 639f91d8-d511-4677-a83b-bd7564d5d92f
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        code:
          type: string
          description: >-
            Error code for programmatic handling. Deployment-related codes
            (PCC-*) are documented at
            https://docs.pipecat.ai/pipecat-cloud/fundamentals/error-codes
      required:
        - error
        - code
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized / token expired
            code: '401'
  securitySchemes:
    PrivateKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication requires a Pipecat Cloud Private API token.


        Generate a Private API key from your Dashboard (Settings > API Keys >
        Private > Create key) and include it as a Bearer token in the
        Authorization header.

````