The Travtus Messaging API allows clients and partners to interact with Travtus Teammates via their own phone number routing or web chat solutions. Follow the instructions below to set up and use the Messaging API.
Step 2: Source System Sends “Create Customer Session” Request
If the customer conversation does not yet have an existing session, the Source System creates a new session for the customer by sending a request to the Travtus Messaging API.
Upon receipt of the “create session” request, the Travtus Messaging API will create a new session, returning a 200 status with the sessionId and userId.
Step 3: Travtus API Sends “Message” Event with Reply Message
Travtus API replies are sent to the appropriate webhook:
Copy
Ask AI
POST 'https://api.example.org/v1/messages'-----{ "event": "message", "data": { "sessionId": "d6a2593eddd3457d8c31b8c04c8d84ef", "userId": "1ba95b86d8384caa98b2b9d1e0b0faca", "content": "Hi, I'm a Travtus Teammate, how can I help?", "participantType": "bot" }}
Webhook calls expect to receive an HTTP 200 status response.Participant types: