webHook newContact
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 Collection Object |
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
}