Init Chat Webhook

When you expand the chat widget, edna sends an INIT_CHAT request using the related webhook.

ParameterTypeDescription
actionboolean (required) INIT_CHAT
threadsClientIdlong (required)edna client ID: internal ID of the client in edna
channelInfoobject (required)Information about the channel
channelTypestringChannel type
authorizedbooleantrue – authorized, false – unauthorized
platformstring (optional)Only for the MOBILE channelType:
iOS
Android
senderstring (required)Information about the sender, always ThreadsAPI
clientDatadictionary (optional)Client data (see the Customize clienData in Webhook Content article)

HTTP Request

POST <url for webhook init chat> HTTP/1.1
Content-Type: application/json
{
    "action": "INIT_CHAT",
    "threadsClientId": 1,
    "channelInfo": {
        "channelType": "MOBILE",
        "authorized": true
    },
    "platform": "iOS",
    "deviceAddress": "w19k86lcaqrk8zckbuvp3s466dchtl1u9",
    "clientData": {
        "phone": "79000000000"
    }
}

Example of a Successful HTTP Response

It is expected that a response with the HTTP code 200 will be returned.