Pypestream · AsyncAPI Specification
Pypestream Engagement API WebSocket
Version 1
Bidirectional event stream backing the Pypestream Engagement API. The client creates an anonymous user, opens a WebSocket, joins the chat channel `chat:{CHAT_ID}`, starts the engagement over REST, and waits for `chat:ready` before sending messages. A request sent before `chat:ready` is rejected with HTTP 428. A `new:ping` must be sent every 20 seconds or the connection is dropped.
View Spec
View on GitHub
CompanyConversational AIAgentic AIContact CenterCustomer ServiceCustomer EngagementChatbotsVoice AIMessagingAnalyticsEnterprise SoftwareAsyncAPIWebhooksEvents
Channels
chat
Phoenix Channels topic joined with the access token returned by the Create User (anonymous_session) request. Join before starting the engagement to avoid missing the microapp's initial messages.
Messages
chatStart
chat:start
Client. Starts the engagement. After sending this event the client must wait for chat:ready.
chatReady
chat:ready
Pypestream. Informs the client the chat is ready to receive send_message requests. A message sent before this event is rejected with a 428 status.
newPing
new:ping
Client. Resets the connection timeout counter. Must be sent every 20 seconds to prevent disconnection.
newPong
new:pong
Pypestream. Response to new:ping.
msgSend
msg:send
Client. A message transmitted from the end-user to the microapp.
incomingMsg
incoming:msg
Pypestream. A message transmitted from the microapp to the end-user.
incomingNotice
incoming:notice
Pypestream. Enables a microapp to send a notice to the end-user of the chat.
chatEnd
chat:end
Client. Terminates the chat established between the end-user and the microapp.
chatSnapshot
chat:snapshot
Client. A request for a snapshot of the engagement as it currently stands.
chatSnapshotResponse
chat:snapshot_response
Pypestream. An object with all the relevant information of the engagement at the moment the request was made.
Servers
wss
live
Live
wss
sandbox
Sandbox
AsyncAPI Specification
Work with this as data
Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.