This method allows you to create a chat before sending the first message.
Description
Please be aware that you won't be able to execute this step described above directly in the API Reference section due to tool limitations: it is not possible to calculate required headers and send a request simultaneously.
This method enables you to create a chat before sending the initial message. It can be beneficial when there is an existing lead with contact and there's no need to create an incoming lead. Chats without messages will not be visible in the account.
You can also specify the source of the chat, and when the first incoming chat message is received, an incoming lead will be created in the appropriate pipeline based on the specified source.
This method creates a chat for the passed ID. If the chat for the passed conversation_id
already exists, its ID will be returned.
Headers & Authorization type
The request headers are the same as the ones for all Chat API requests.
You can learn how to get Content-MD5 and X-Signature headers with the help of the recipe.
- The
user[id]
should be unique. If you enter an existinguser[id]
you will get the existing information related to this user.- The request body should be exactly the same when calculating the Content-MD5 and the X-Signature.
Response parameters
Parameter | Description |
---|---|
id | Chat ID in Kommo Chat API |
user[id] | Chat participant ID in Kommo Chat API |
user[client_id] | Chat participant ID on the integration side, the field is absent for users from Kommo (The field is passed in the request in the user[id] key) |
user[name] | Chat participant name |
user[avatar] | Avatar link if it was sent, or empty field |
user[phone] | Chat participant’s phone number, if it was sent. |
user[email] | Chat participant’s email address, if it was sent. |