v1

latestOpenAPI 3.1.02026-07-241630614.2 KB

Import, send and edit messages

post/{scope_id}

Path parameters

scope_idstring required

You obtain it when connect a chat channel to the account (https://developers.kommo.com/reference/connect-channel)

Headers

Datestring required

Date and time when the request was generated. The signature will be valid for 15 minutes from this Date. The date should be in the format Thu, 01 Jan 2023 12:00:00 +0000 (RFC2822)

Content-typestring required

Request data type. Currently, only application/json is supported.

Content-MD5string

For the request body, it is necessary to calculate the MD5 hash and indicate it in the header in lowercase. At the same time, it is important to keep in mind that the request body is calculated as a stream of bytes without considering the end of JSON markup, and if there are “\n” or spaces at the end, they will also be taken into account

X-Signaturestring

Signature of the request as a string. It is formed from the name of the method (GET/POST) in uppercase, with the values of the headers concatenated by “\n”. Header values ​​come in a specific order. If there is no header, an empty string is specified instead. Next, add the requested path from the URL without the protocol and domain (without GET parameters) to the line. The resulting string is calculated using HMAC-SHA1, and as a secret, we use the channel secret obtained during registration. The resulting hash in lowercase is indicated in the X-Signature header.

Request body

Response

200

Example response

{
  "new_message": {
    "conversation_id": "1697efa3-0d19-4859-ac12-317c444fb5de",
    "sender_id": "7458347a-0012-4a16-a796-f670cea5f807",
    "receiver_id": "0dd5cbcf-e564-4e37-a56a-100997b2d471",
    "msgid": "184e1afd-af91-4774-b8d9-782dc459bc4b",
    "ref_id": "msgid1"
  }
}