Skip to content

Latest commit

 

History

History
101 lines (79 loc) · 2.41 KB

File metadata and controls

101 lines (79 loc) · 2.41 KB
title description openapi
Send Session Message
Send a message to a conversation session with automatic renewal tracking
post /api/messaging/sessions/{sessionId}/messages
Sending a message automatically updates the session's last activity timestamp. If auto-renewal is enabled, the session will be renewed, extending its expiration time.

Path Parameters

The unique identifier of the session

Request Body

The message content (maximum 4000 characters) Optional metadata to attach to the message Optional array of attachments

Response

Unique identifier of the created message The message content UUID of the message author (user or agent) ISO timestamp of message creation Any metadata attached to the message Current session status after sending the message Updated expiration timestamp
<ResponseField name="renewalCount" type="number">
  Total number of times the session has been renewed
</ResponseField>

<ResponseField name="wasRenewed" type="boolean">
  Whether the session was renewed by this message
</ResponseField>

<ResponseField name="isNearExpiration" type="boolean">
  Whether the session is within the warning threshold
</ResponseField>

Error Responses

```json // 404 - Session not found { "error": "Session not found", "details": { "sessionId": "abc-123" } }

// 410 - Session expired { "error": "Session has expired", "details": { "sessionId": "abc-123", "expiresAt": "2024-01-15T10:30:00Z" } }

// 400 - Invalid content { "error": "Content exceeds maximum length of 4000 characters" }

</ResponseExample>