Chat

List a conversation's events

GET
/api/v2/chat/{session_id}/events

The conversation's stored events as JSON, {id, event} each, oldest first — the same events its stream sends. start and end are event ids, inclusive; - and + mean the first and the last.

apiKey
headerAuthorizationBearer <token>

An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.

session_id*string

The conversation, from the turn's answer.

start?string

The first event id to return; - (the default) is the first event.

Lengthlength <= 64
Default"-"
end?string

The last event id to return; + (the default) is the last event.

Lengthlength <= 64
Default"+"

Response Body

The events.

application/json
  1. response
session_id?string
count?integer
events?array<>
curl -X GET "https://api.synapseorch.com/api/v2/chat/chat_01a1205c3e8f7a2b9d4c6e1f0a3b5d7c/events" \  -H "Authorization: Bearer sk-syn-..."
{  "session_id": "chat_01a1205c3e8f7a2b9d4c6e1f0a3b5d7c",  "count": 2,  "events": [    {      "id": "1790249607455-0",      "event": {        "type": "session",        "session_id": "chat_01a1205c3e8f7a2b9d4c6e1f0a3b5d7c",        "agent_id": "agent_01a10b7e2c4d6f8a0b1c3d5e7f9a2b4c",        "agent_name": "Order desk"      }    },    {      "id": "1790249609112-0",      "event": {        "type": "response",        "content": "New accounts pay net-30 after the first order, which is paid on invoice.",        "intent": "chat"      }    }  ]}