Skip to main content

GET /api/v1/chat/poll

Returns new messages since a given message ID. Use this endpoint for polling to keep the chat UI updated.

Authentication​

Optional. Works for both authenticated and anonymous sessions (identified by chat_session_id cookie).

Request​

ParameterTypeInDescription
since_idintegerqueryOnly return messages with ID greater than this value

Example​

curl -X GET "https://intotes.com/api/v1/chat/poll?since_id=3"

Response​

200 OK​

{
"messages": [
{
"id": 4,
"sender": "support",
"text": "Your withdrawal has been processed and should arrive within 24 hours.",
"created_at": 1712238300000
}
]
}

Returns {"messages": []} if no new messages are available.

Note: created_at is returned as Unix milliseconds.

Errors​

StatusCodeDescription
400β€”Invalid since_id parameter
401β€”No chat_session_id cookie found
500β€”Server failed to poll messages