Engagement API | Version: 1
Pypestream's Engagement API (v1) empowers developers to build interfaces enabling end-users to engage with a business and connect common messaging channels (e.g., Slack, Facebook Messenger, etc.) with the Pypestream platform. The Engagement API currently supports communication between end-users and microapps.
Functions
The Pypestream Engagement API provides the following key features:
- Create a user: Create an ID for the end-user that will engage with the business.
- Start an engagement: Initiate an engagement between an end-user and a microapp.
- Send messages: Enable end-users to communicate with a microapp.
- End an engagement: Terminate the engagement between an end-user and a microapp.
Integrating with the Engagement API
At a high level, integrating with the Engagement API involves:
- Creating a User
- Opening a WebSocket connection
- Joining the chat channel
chat:{CHAT_ID}
in the WebSocket - Starting an Engagement
- Waiting until you receive the
chat:ready
event through the WebSocket - Sending a message
- Handle the
incoming:msg
events received in the WebSocket - Ending the engagement