---
title: "Renew a session"
method: POST
path: "/api/messaging/sessions/{sessionId}/renew"
tags: ["messaging"]
---

# Renew a session

`POST /api/messaging/sessions/{sessionId}/renew`

Manually renew a session to extend its expiration time. This is useful even if auto-renewal is disabled.

## Path parameters

- `sessionId` string, required

## Response `200`

Session renewed 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

- `404` — Session not found
- `410` — Session has expired
- `422` — Cannot renew - maximum duration reached

---

[API](https://skmtc.net/elizaos/apis/eliza-os-api.md) · [All operations](https://skmtc.net/elizaos/apis/eliza-os-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elizaos/eliza-os-api/revisions/f43280bfdb0c/schema)
