> ## 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/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.87.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/conversations/{conversation_id}/close:
    post:
      tags:
        - conversations
      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
        surface:
          type: string
          title: Surface
        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
            - pending_dispatch
            - 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_sync_state:
          type: string
          enum:
            - pending
            - synced
            - skipped
            - suppressed
          title: Memory Sync State
          default: pending
        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'
        test_features:
          anyOf:
            - $ref: '#/components/schemas/TestSessionFeatures'
            - type: 'null'
        revision_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Revision Id
        revision_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Revision Name
        revision_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Revision Version
        team_revision_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Team Revision Id
        team_revision_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Revision Name
        from_number:
          anyOf:
            - type: string
            - type: 'null'
          title: From Number
        to_number:
          anyOf:
            - type: string
            - type: 'null'
          title: To Number
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
      type: object
      required:
        - id
        - organization_id
        - end_user_id
        - channel
        - surface
        - status
        - priority
        - message_count
        - started_at
        - created_at
        - updated_at
      title: SessionResponse
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
        retryable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Retryable
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After
      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
        - config_rebound
        - 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
        - dispatch_interrupted
        - dispatch_unacknowledged
        - dispatch_quarantined
        - token_mint_failed
        - sip_dial_failed
        - dial_unknown_teardown_confirmed
        - call_ended
        - ambiguous_no_room_aged
        - delivery_max_tries_exceeded
        - missing_lease
        - missing_conversation
        - malformed_dispatch_metadata
        - participant_join_timeout
        - setup_error
        - stt_provider_error
        - tts_provider_error
        - stale_routing
        - superseded
        - duplicate_dispatch
        - orphaned
        - agent_absent_orphan
        - wedged_pipeline_timeout
        - capacity_rejected
        - requeued
        - org_concurrency_limit
        - global_pipeline_limit
        - stt_limit
        - tts_limit
        - carrier_cps_deferred
        - call_window_deferred
        - queue_ttl_expired
        - outbound_cancelled
        - inline_dispatch_abandoned
        - reservation_expired
        - dial_requeue_exhausted
      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).
    TestSessionFeatures:
      properties:
        version:
          type: integer
          const: 1
          title: Version
          default: 1
        identity_resolution:
          type: boolean
          title: Identity Resolution
        memory:
          type: boolean
          title: Memory
        summarization:
          type: boolean
          title: Summarization
        extraction:
          type: boolean
          title: Extraction
        evaluations:
          type: boolean
          title: Evaluations
        knowledge_gap_analysis:
          type: boolean
          title: Knowledge Gap Analysis
      additionalProperties: false
      type: object
      required:
        - identity_resolution
        - memory
        - summarization
        - extraction
        - evaluations
        - knowledge_gap_analysis
      title: TestSessionFeatures
      description: Resolved, immutable snapshot persisted on a test conversation.
    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

````