# Unarchive Session

Source: https://agenta.ai/docs/reference/api/unarchive-session

`POST /sessions/unarchive`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Unarchive Session

## Parameters

- `session_id` (in query, string, required)

## Response schemas

### 200: Successful Response

- `count` (integer) Default: `0`.
- `session` (object, nullable)
  - `created_at` (string (date-time), nullable)
  - `updated_at` (string (date-time), nullable)
  - `deleted_at` (string (date-time), nullable)
  - `created_by_id` (string (uuid), nullable)
  - `updated_by_id` (string (uuid), nullable)
  - `deleted_by_id` (string (uuid), nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `id` (string (uuid), nullable)
  - `project_id` (string (uuid), required)
  - `session_id` (string, required)
  - `flags` (object): The nest as primitive bools (alive ⊇ running ⊇ attached). resumable (alive & !running) and reattachable (running & !attached) are derived client-side, never stored. Default: `{"is_alive":false,"is_running":false,"is_attached":false}`.
    - `is_alive` (boolean) Default: `false`.
    - `is_running` (boolean) Default: `false`.
    - `is_attached` (boolean) Default: `false`.
  - `capabilities` (object) Default: `{"shared_reader":false}`.
    - `shared_reader` (boolean): Deployment-wide shared-reader switch; version one has no project allowlist. Default: `false`.
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `turn_id` (string, nullable)
  - `turn_started_at` (string (date-time), nullable)
  - `stopping_turn_id` (string, nullable)
  - `references` (array of object, nullable)
    - `version` (string, nullable)
    - `slug` (string, nullable)
    - `id` (string (uuid), nullable)
    - `key` (string, nullable)
  - `archived_at` (string (date-time), nullable)
  - `origin` (string, one of: "manual", "trigger", "channel", "api", "calling_session", nullable)
  - `trigger` (object, nullable)
    - `id` (string (uuid), required)
    - `kind` (string, one of: "schedule", "subscription", required)
    - `name` (string, nullable)
  - `delivery` (object, nullable)
    - `id` (string (uuid), required)
  - `calling_session` (object, nullable)
    - `id` (string, required)
    - `turn_id` (string, required)
    - `agent_id` (string (uuid), required)
    - `revision_id` (string (uuid), nullable)
  - `visibility` (string, one of: "private", "project") Default: `"project"`.
  - `owner_user_id` (string (uuid), nullable)
  - `sharing` (object, nullable)
    - `policy` (object, required)
    - `owner_is_active` (boolean, required)
    - `grants` (array of object, required)
    - `my_role` (string, one of: "owner", "participant", "viewer", "none", required): What the caller is on an item. Computed, never stored.
    - `can_send` (boolean, required)
    - `shareable` (boolean, required)
    - `not_shareable_reason` (string, one of: "channel", "ownerless", "no_agent", nullable)
    - `agent_hidden` (boolean, nullable)
- … more fields: see the OpenAPI specification.

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
