Member messaging API
Create conversation
Creates a new conversation between the specified Team and Client and returns a conversation_id which helpful for to identify the conversation of an incoming message using the Receive Message event. and a client_id .
This endpoint requires the User token provided on login.
Expected Request
POST /api/member/conversation/create
Authorization: Bearer <TOKEN> # User token
{
"team_id": 123,
"contact": {
"id": 123, // optional
"name": "Foo bar",
"phone_number": "+21698765432", //optional
"email": "test@test.com" //optional
}
}
Response
201 Created
{
"conversation_id": 123,
"contact_id": 543210
}
Send message
Sends a message in the previously created conversation, or one of the listed conversations, returning the message Id and the server timestamps.
This endpoint requires the User token provided on login.
Expected Request
POST /api/member/message
Authorization: Bearer <TOKEN> # User Token
{
"conversation_id": 543210,
"channel": {
"id": 50
},
"content": {
"text": "my message content"
}
}
Response
201 Created
{
"message_id": 543210,
"timestamp": 1589895861640
}
Available channels
| Channel | Id |
|---|---|
| TWILIO | 1 |
| MESSENGER | 2 |
| LIVE_CHAT | 3 |
| LINE | 4 |
| TELEGRAM | 6 |
| VIBER | 7 |
| KIK | 8 |
| 9 | |
| BOOKING | 10 |
| BOWO | 11 |
| RAINBOW | 12 |
| CUSTOM | 14 |
| 16 | |
| BOOKING_MAIL | 17 |
| 18 |
Receive messages
There is two paradigms allows you to receive messages from Quicktext:
Messaging history
Conversations actions
You can Archive, Restore (move back to inbox) and Delete conversations using this endpoint:
Expected Request
PATCH /api/member/conversations
Authorization: Bearer <TOKEN> # User token
{
"convIds": [ // Conversations IDs
123456,
654321
],
"action": "archive" // "archive" | "restore" | "delete"
}
Response
200 OK
{
"successfulIds": [
123456,
654321
],
"failedIds": [],
"action": "archive" // "archive" | "restore" | "delete"
}
Set bot status
You can set the bot status in a specified conversation using this endpoint:
Expected Request
PUT /api/member/bot/status
Authorization: Bearer <TOKEN> # User token
{
"team_id": 123,
"contact_id": 123,
"status": true // `true` to enable the bot and `false` to disable it
}
Response
200 OK
Download conversation link
You can request the link to download a conversation using this endpoint:
Expected Request
GET /api/member/conversations/{convId}/download
Authorization: Bearer <TOKEN> # User token
Response
200 OK
{
"link": "https://example.com/link/to/download/conversation.pdf"
}