The configured webhook is called to notify the CTI about the start of a new chat.
Method:
HTTP POST
Authorization
Type | Mandatory |
---|---|
BEARER | YES |
Request Body:
Type: JSON
Name | Mandatory | Type | Description |
---|---|---|---|
cid | YES | STRING | Unique contact identifier |
media | YES | STRING | Identifies media channel. In this case set it to “chat” |
serv | YES | STRING | Unique service identifier |
event | YES | STRING | Identifies event: new |
serv_name | YES | STRING | Service name |
beginTime | YES | NUMBER / STRING | Chat start time |
endTime | YES | NUMBER / STRING | Chat end time. In this case set it to empty string |
title | YES | STRING | Chat title |
lang | YES | STRING | Chat language |
userID | YES | STRING | Unique user identifier |
users | YES | OBJECT | An object that contains the participants to the chat room. |
dataCollections | YES | OBJECT | An object that contains the chat data collections. |
widgetID | YES | STRING | Unique widget identifier |
Example:
Request Body
{ cid: contact.id, media: "chat", serv: contact.servid, event: "new", serv_name: contact.serv_name, beginTime: contact.beginTime, endTime: contact.endTime, title: contact.title, lang: contact.lang, userID: contact.userID, users: contact.users, dataCollections: contact.dataCollections, widgetid: contact.widgetid }