---
search:
  tags:
    - Sessions
    - POST
seo:
  description: >-
    Canonical V0 session-end endpoint (Decision D1). Ends an active… Reference
    for the POST /v1/sessions/{session_id}/end endpoint in the AVTR Public API
    v1 API.
sidebar:
  badge: POST
  label: End session (canonical V0)
title: End session (canonical V0)
type: openapi-operation
---
Canonical V0 session-end endpoint (Decision D1). Ends an `active` session: signals the SessionOrchestratorDO to tear down Modal/SFU resources (with a 10s timeout), then advances the row to `ended` (or `ended_with_warnings` if cleanup timed out).

NOT idempotent: re-POSTing `/end` against an already-terminal session returns `409`. `ended` / `ended_with_warnings` map to `AVTR_SESSION_ENDED`; `created` / `ending` / `failed` map to `AVTR_SESSION_CONFLICT`. Cross-tenant access returns `404`.

Query parameter `?force=true` skips the graceful disconnect handshake inside the DO and terminates backend resources immediately.

The deployed Worker also exposes `DELETE /v1/sessions/{id}` as a bridge/internal alias; new integrations MUST use `POST /end`.

<Operation source="reference" id="post-v1-sessions-session-id-end" />
