Client messaging API
Sign-up
Creates a new conversation between the specified Team and Client and returns a Client Token which will be used to send messages in the currently created conversation and the conversation_id which helpful for to identify the conversation of an incoming message using the Receive Message webhook.
This endpoint requires the App Token which provided when creating the application.
Expected Request
POST /api/client/signup
Authorization: Bearer <TOKEN> # App Token
{
"team_id": 123,
"client": {
"name": "Foo bar",
"phone_number": "+21698765432", //optional
"email": "test@test.com" //optional
}
}
Response
201 Created
{
"conversation_id": 123,
"token": "", // Client Token
}
Send message
Sends a message in the previously created conversation using Sign-up endpoint, returning the message Id and the server timestamps.
This endpoint requires the Client Token provided as a response of the Sign-up endpoint.
Expected Request
POST /api/client/message
Authorization: Bearer <TOKEN> # Client Token
{
"content": {
"text": "my message content"
}
}
Response
201 Created
{
"message_id": 543210,
"timestamp": 1589895861640,
"bot_is_active": true
}
Receive messages
There is two paradigms allows you to receive messages from Quicktext: