Skip to main content
GET
Returns the visitor’s messages and the agent’s replies, oldest first. Poll it after sending a message until pending is false. About once a second is right; the Chat SDK does this for you and slows down after errors. Same publishable key and origin rules as Send Chat Message.

Query Parameters

string (UUID)
required
The agent
string
required
The visitor id used when sending
string (date-time)
Only messages created after this time, up to 100. Without it, the newest 100 messages.

Response

array
id, role (user for the visitor, agent for the agent), text, created_at
boolean
true while the agent is still working on a reply
A reply’s created_at is when the agent started sending it, so it can be earlier than a message the visitor sent meanwhile. When polling with after, go back a couple of minutes from the newest message you have and skip ids you already showed. The SDK does this.

Errors

Same as Send Chat Message. Polling is limited to 120 requests per minute per visitor.