# List a tool router session config history

**Documentation:** /reference/api-reference/tool-router/getToolRouterSessionBySessionIdConfigHistory

Returns the session config history ordered by version DESC (newest first). The live (current) config appears once, on the first page only, with `is_current: true`; archived versions have `is_current: false`.

---

## GET `/api/v3.1/tool_router/session/{session_id}/config_history`

**Endpoint:** `https://backend.composio.dev/api/v3.1/tool_router/session/{session_id}/config_history`

**Summary:** List a tool router session config history

Returns the session config history ordered by version DESC (newest first). The live (current) config appears once, on the first page only, with `is_current: true`; archived versions have `is_current: false`.

### Authentication

**ApiKeyAuth** - API Key in `header` header `x-api-key` OR **UserApiKeyAuth** - API Key in `header` header `x-user-api-key`

### Path Parameters

- `session_id` (string (toolRouterSessionId)) *(required)*: The unique identifier of the tool router session

### Query Parameters

- `limit` (integer): Number of items per page, max allowed is 100
- `cursor` (string): Cursor for pagination. The cursor is a base64 encoded string of the page and limit. The page is the page number and the limit is the number of items per page. The cursor is used to paginate through the items. The cursor is not required for the first page.

### Responses

#### 200 - Config history successfully retrieved.

**Response Schema:**

- `items` (array<object>) *(required)*
  - Array items:
    - `version` (integer) *(required)*: The config version this entry represents
    - `created_at` (string (date-time)) *(required)*: ISO timestamp. For history rows, when the entry was archived (i.e. the moment the version was superseded by a PATCH).
    - `config` (object) *(required)*: The session configuration at this version
      - `user_id` (string) *(required)*: User identifier for this session
      - `toolkits` (any): Toolkit configuration - either enabled list or disabled list
      - `auth_configs` (object): Auth config overrides per toolkit
        - `[key: string]` (string (authConfigId))
      - `manage_connections` (object): Manage connections configuration
        - `enabled` (boolean): Whether to enable the connection manager for automatic connection handling
        - `callback_url` (string (uri)): Custom callback URL for connected account auth flows
        - `enable_wait_for_connections` (boolean): Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status. Default false. May not work reliably with GPT models.
        - `enable_connection_removal` (boolean): Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
      - `tools` (object): Tool-level configuration per toolkit
        - `[key: string]` (any)
      - `tags` (object): MCP tool annotation hints for filtering tools with enabled/disabled support. enabled: tags that the tool must have at least one of. disabled: tags that the tool must NOT have any of. Both conditions must be satisfied.
        - `enabled` (array<enum: "readOnlyHint" | "destructiveHint" | "idempotentHint" | ...>): Tags that the tool must have at least one of
        - `disabled` (array<enum: "readOnlyHint" | "destructiveHint" | "idempotentHint" | ...>): Tags that the tool must NOT have any of
      - `workbench` (object): Workbench configuration
        - `enable` (boolean): Whether the workbench (code execution sandbox) is enabled. When false, COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
        - `proxy_execution_enabled` (boolean): Whether proxy execution is enabled in the workbench
        - `auto_offload_threshold` (number): Character threshold after which tool execution response are saved to a file in workbench. Default is 20k.
        - `sandbox_size` (enum: "standard" | "medium" | "large" | ...): Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4 vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
      - `multi_account` (object): Multi-account configuration for this session.
        - `enable` (boolean): When true, enables multi-account mode for this session. When not set, falls back to org/project-level configuration.
        - `max_accounts_per_toolkit` (integer): Maximum number of connected accounts allowed per toolkit. Defaults to 5 when multi-account is enabled.
        - `require_explicit_selection` (boolean): When true, require explicit account selection when multiple accounts are connected. When false (default), use the first/default account.
      - `preload` (object) *(required)*: Preload configuration. Explicit slugs are returned as an array; dynamic preload is returned as "all".
        - `tools` (any) *(required)*: Explicit preloaded tool slugs, or "all" when the session dynamically exposes all app tools allowed by its filters.
      - `connected_accounts` (object): Per-toolkit connected account overrides (array of nano-IDs). Multi-account sessions can pin more than one account per toolkit; otherwise length is 1.
        - `[key: string]` (array<string (connectedAccountId)>)
      - `search` (object) *(required)*: Search helper configuration
        - `enable` (boolean)
      - `execute` (object) *(required)*: Execute helper configuration
        - `enable_multi_execute` (boolean)
    - `is_current` (boolean) *(required)*: True only for the live (current) session config, present on the first page. False for archived history rows.
- `next_cursor` (string,null)
- `total_pages` (number) *(required)*
- `current_page` (number) *(required)*
- `total_items` (number) *(required)*

**Example Response:**

```json
{
  "items": [
    {
      "version": 1,
      "created_at": "2024-01-15T10:30:00Z",
      "config": {
        "user_id": "...",
        "toolkits": "...",
        "auth_configs": "...",
        "manage_connections": "...",
        "tools": "...",
        "tags": "...",
        "workbench": "...",
        "multi_account": "...",
        "preload": "...",
        "connected_accounts": "...",
        "search": "...",
        "execute": "..."
      },
      "is_current": true
    }
  ],
  "next_cursor": null,
  "total_pages": 1,
  "current_page": 1,
  "total_items": 1
}
```

#### 400 - Bad request. Invalid pagination cursor or session_id format.

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 401 - Unauthorized.

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 404 - Session not found or has been deleted.

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 500 - Internal server error.

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

### Example cURL Request

```bash
curl -X GET "https://backend.composio.dev/api/v3.1/tool_router/session/string/config_history" \
  -H "x-api-key: YOUR_API_KEY"
```