POST
/
api
/
messaging
/
sessions
/
{sessionId}
/
renew
Renew a session
curl --request POST \
  --url http://localhost:3000/api/messaging/sessions/{sessionId}/renew
{
  "sessionId": "<string>",
  "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "lastActivity": "2023-11-07T05:31:56Z",
  "metadata": {},
  "expiresAt": "2023-11-07T05:31:56Z",
  "timeoutConfig": {
    "timeoutMinutes": 123,
    "autoRenew": true,
    "maxDurationMinutes": 123,
    "warningThresholdMinutes": 123
  },
  "renewalCount": 123,
  "timeRemaining": 123,
  "isNearExpiration": true
}

Path Parameters

sessionId
string
required

ID of the session to renew

Response

Session renewed successfully

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

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