---
title: "Update session timeout configuration"
method: PATCH
path: "/api/messaging/sessions/{sessionId}/timeout"
tags: ["messaging"]
---

# Update session timeout configuration

`PATCH /api/messaging/sessions/{sessionId}/timeout`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/messaging/sessions/{sessionId}/timeout`
- Auth: none declared

Update the timeout configuration for an active session

## Path parameters

- `sessionId` string, required

## Request body

- object
  - `timeoutMinutes` integer: New timeout in minutes
  - `autoRenew` boolean: Whether to enable auto-renewal
  - `maxDurationMinutes` integer: Maximum total session duration
  - `warningThresholdMinutes` integer: Minutes before expiration to trigger warning

## Response `200`

Timeout configuration updated successfully

- SessionInfo: Complete session information with status and timeout details
  - `sessionId` string: Unique session identifier
  - `agentId` string, uuid: UUID of the agent
  - `userId` string, uuid: UUID of the user
  - `createdAt` string, date-time: Session creation timestamp
  - `lastActivity` string, date-time: Last activity timestamp
  - `metadata` object: Session metadata
  - `expiresAt` string, date-time: When the session will expire
  - `timeoutConfig` object: Current timeout configuration
    - `timeoutMinutes` integer: Inactivity timeout in minutes
    - `autoRenew` boolean: Whether auto-renewal is enabled
    - `maxDurationMinutes` integer: Maximum total session duration
    - `warningThresholdMinutes` integer: Minutes before expiration to trigger warning
  - `renewalCount` integer: Number of times the session has been renewed
  - `timeRemaining` integer: Milliseconds until session expiration
  - `isNearExpiration` boolean: Whether the session is within the warning threshold

## Other responses

- `400`: Invalid timeout configuration
- `404`: Session not found
- `410`: Session has expired

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
