Pypestream's Engagement API empowers developers to build interfaces enabling end-users to engage with a business, and connect common messaging channels such as Slack with the Pypestream Platform. The Engagement API currently supports communication between end-users and microapps.
Functions
The Pypestream Engagement API gives you access to Pypestream engagement capabilities. The API provides these key features:
- Create a user: Create 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