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

# Close a v2 conversation



## OpenAPI

````yaml /api-reference/openapi.json post /v1/v2/conversations/{conversation_id}/close
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.21.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/v2/conversations/{conversation_id}/close:
    post:
      tags:
        - runtime v2
      summary: Close a v2 conversation
      operationId: closeV2Conversation
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Conversation Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/SessionClose'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/src__conversation__schemas__SessionResponse
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SessionClose:
      properties:
        reason:
          anyOf:
            - anyOf:
                - $ref: '#/components/schemas/SessionTerminationReason'
                - type: string
              maxLength: 64
            - type: 'null'
          title: Reason
      type: object
      title: SessionClose
    src__conversation__schemas__SessionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        end_user_id:
          type: string
          format: uuid
          title: End User Id
        channel:
          type: string
          title: Channel
        origin:
          anyOf:
            - type: string
              enum:
                - inbound
                - outbound
            - type: 'null'
          title: Origin
        external_session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Session Id
        status:
          type: string
          enum:
            - queued
            - ringing
            - active
            - paused
            - waiting_for_human
            - transferred
            - awaiting_approval
            - closed
            - expired
            - error
            - superseded
          title: Status
        session_type:
          type: string
          enum:
            - live
            - test
            - simulation
          title: Session Type
          default: live
        priority:
          type: string
          enum:
            - low
            - normal
            - high
            - urgent
          title: Priority
        subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Subject
        assigned_agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Assigned Agent Id
        retention_policy_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Retention Policy Id
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        context_variables:
          additionalProperties: true
          type: object
          title: Context Variables
        message_count:
          type: integer
          title: Message Count
        first_message_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: First Message At
        last_message_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Message At
        started_at:
          type: string
          format: date-time
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        closed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Closed At
        ttl_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ttl Expires At
        retention_expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Retention Expires At
        archived_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Archived At
        memory_synced:
          type: boolean
          title: Memory Synced
          default: false
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        summary_preview:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary Preview
        has_recording:
          type: boolean
          title: Has Recording
          default: false
        eval_summary:
          $ref: '#/components/schemas/SessionEvalSummary'
      type: object
      required:
        - id
        - organization_id
        - end_user_id
        - channel
        - status
        - priority
        - message_count
        - started_at
        - created_at
        - updated_at
      title: SessionResponse
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionTerminationReason:
      type: string
      enum:
        - voicemail_detected
        - silence_timeout
        - max_call_duration
        - participant_left
        - pipeline_exit
        - user_requested
        - agent_initiated
        - resolved
        - unresolved
        - abandoned
        - escalated
        - handoff_resolved
        - transferred
        - error
        - unknown
        - callee_busy
        - callee_no_answer
        - callee_unavailable
        - callee_declined
        - callee_not_found
        - sip_failed
        - unknown_reason
        - client_initiated
        - duplicate_identity
        - server_shutdown
        - participant_removed
        - room_deleted
        - state_mismatch
        - join_failure
        - migration
        - signal_close
        - room_closed
        - user_unavailable
        - user_rejected
        - sip_trunk_failure
        - connection_timeout
        - media_failure
        - agent_error
        - dispatch_failed
        - token_mint_failed
        - sip_dial_failed
        - participant_join_timeout
        - setup_error
        - stale_routing
        - superseded
        - duplicate_dispatch
      title: SessionTerminationReason
      description: |-
        Canonical reasons a voice/runtime session ended.

        Stored on ``ConversationSession.internal_termination_reason`` via the
        :class:`SessionTerminationReasonType` ``TypeDecorator`` — Python
        surfaces the enum, the DB column itself is plain VARCHAR(64) with no
        Postgres ENUM type and no CHECK constraint, so extending the enum is
        a Python-only change (no migration needed).

        ``AGENT_INITIATED`` covers every LLM-driven end (the agent decided the
        conversation is over). ``UNKNOWN`` is the defensive fallback any
        string that fails to coerce lands on — both at write time (via
        ``coerce_termination_reason`` in ``src/runtime/contracts.py``) and at
        read time (via :meth:`SessionTerminationReasonType.process_result_value`
        when a legacy / drifted value is loaded from the row).
    SessionEvalSummary:
      properties:
        total:
          type: integer
          title: Total
          default: 0
        succeeded:
          type: integer
          title: Succeeded
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
        pending:
          type: integer
          title: Pending
          default: 0
        critical_total:
          type: integer
          title: Critical Total
          default: 0
        critical_succeeded:
          type: integer
          title: Critical Succeeded
          default: 0
        critical_failed:
          type: integer
          title: Critical Failed
          default: 0
        critical_pending:
          type: integer
          title: Critical Pending
          default: 0
        eval_status:
          type: string
          enum:
            - success
            - partial
            - failure
            - pending
            - none
          title: Eval Status
          default: none
      type: object
      title: SessionEvalSummary
      description: >-
        Rollup of eval runs that targeted a session.


        `succeeded` = runs where status='completed' AND every score has
        passed=true.

        `failed` = total - succeeded - pending (failed-status runs +
        completed-but-not-all-passed).

        `pending` = runs still queued or running.


        The `critical_*` counterparts restrict the same aggregation to runs
        whose

        binding was marked `is_critical=True` (snapshotted onto the run). They
        drive

        the session headline pill — non-critical evals still run and display but

        don't move the verdict. `eval_status` collapses the critical counts to a

        single headline label (`none` when no criticals are configured).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````