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

# Session Lifecycle

> Pause, resume, and complete a session.

## State machine

```
active ──pause──▶ paused ──resume──▶ active
  │                                     │
  └──complete──▶ completed ◀────────────┘

active / paused ──idle 24h──▶ abandoned (TTL 30d, then deleted)
```

Each transition is its own endpoint and each rejects invalid transitions with `409 Conflict`.

## Pause

```http theme={null}
POST /v1/api/sessions/{id}/pause
```

Transitions `active → paused`. Paused sessions reject new turns.

## Resume

```http theme={null}
POST /v1/api/sessions/{id}/resume
```

Transitions `paused → active`.

## Complete

```http theme={null}
POST /v1/api/sessions/{id}/complete
```

Transitions `active|paused → completed`. Complete is terminal and idempotent — calling it on an already-completed session returns the session with no error.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.