---
updatedAt: 2026-07-17T11:50:39.000Z
agentTools:
  projectIndex: https://developers.kommo.com/llms.txt
---

# Connect chat channel

# Description

<Callout icon="🚧" theme="warn">
  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.
</Callout>

To link a chat channel to an account, you should send a POST request with the `channel_id` and the account ID in the request body.

As a response, you will obtain a unique `scope_id` for this channel, which will be used later for sending messages. Once the chat channel is linked to the Kommo account, you will be able to manage messages and receive web hooks about outgoing messages.

<Image align="center" border={false} width="300px" src="https://files.readme.io/9d4549fe5970e1eb5825717984245a1a9cbfd18960f0c5e7423de8cfddab69ca-image_18.jpg" />

<Callout icon="🚧" theme="warn">
  **The connection must be established after each installation of the integration in the account, as the channel is automatically disabled when the integration is disabled.**
</Callout>

The request body will be included in the request twice: once as its body and another time as the body’s MD5, which will be included in the signature.

<Callout icon="📘" theme="info">
  You should write the body in your request the same way you did when calculating the headers.
</Callout>

## Headers & Authorization type

The authorization process for the Chat API differs from other Kommo API methods. Unlike other methods, the Chat API does not require an Access Token for authorization; instead, you need to include specific headers in all requests.

<Recipe slug="calculate-headers-for-chats-api-requests" title="Calculate headers for Chats API requests" />

# General requirements for Chat API requests

* All requests to the Chat API must be sent to the domain **amojo.kommo.com** and include the following headers: Date, Content-Type, Content-MD5, X-Signature.
* The parameters should be included in the request body in JSON format.
* The chat API has strict typing, so **ensure** that the expected argument type matches the parameter description.

<Callout icon="🚧" theme="warn">
  It's important **not** to use a `secret key` in the frontend of the widget. Any requests using the secret key should only be made from the backend part of your application.
</Callout>

**Data type header when the request is successful/in case of error**

Content-Type: application/json

# Response parameters

| Parameter                  | Data Type | Description                                                                                              |
| :------------------------- | :-------- | :------------------------------------------------------------------------------------------------------- |
| account\_id                | string    | Chats API account ID i.e. account [amojo\_id](https://developers.kommo.com/reference/chat-api-accountid) |
| scope\_id                  | string    | UUID of the connected chat channel to the particular account. Unique for each account                    |
| title                      | string    | Bot name                                                                                                 |
| hook\_api\_version         | string    | The Chat API version                                                                                     |
| is\_time\_window\_disabled | bool      | Parameter indicating whether the response time window is disabled                                        |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "chats-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://amojo.kommo.com/v2/origin/custom/"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/{channel_id}/connect": {
      "post": {
        "summary": "Connect chat channel",
        "description": "",
        "operationId": "connect-channel",
        "parameters": [
          {
            "name": "channel_id",
            "in": "path",
            "description": "You get the ID when registering a chat channel",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "Chats API account ID i.e. account: https://developers.kommo.com/reference/chat-api-accountid"
                  },
                  "title": {
                    "type": "string",
                    "description": "Chat channel name"
                  },
                  "hook_api_version": {
                    "type": "string",
                    "description": "The Chat API version",
                    "enum": [
                      "v2"
                    ]
                  },
                  "is_time_window_disabled": {
                    "type": "boolean",
                    "description": "Optional. False by default. If you have enabled the channel time window, you can use this parameter to disable it for your account."
                  }
                },
                "required": [
                  "account_id",
                  "title",
                  "hook_api_version"
                ]
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "amojo_id that you get in Step 1"
                  },
                  "title": {
                    "type": "string",
                    "description": "Bot name"
                  },
                  "hook_api_version": {
                    "type": "string",
                    "description": "The Chat API version",
                    "enum": [
                      "v2"
                    ]
                  }
                }
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "amojo_id that you get in Step 1"
                  },
                  "title": {
                    "type": "string",
                    "description": "Bot name"
                  },
                  "hook_api_version": {
                    "type": "string",
                    "description": "The Chat API version",
                    "enum": [
                      "v2"
                    ]
                  }
                }
              }
            },
            "application/hal+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "account_id": {
                    "type": "string",
                    "description": "amojo_id that you get in Step 1"
                  },
                  "title": {
                    "type": "string",
                    "description": "Bot name"
                  },
                  "hook_api_version": {
                    "type": "string",
                    "description": "The Chat API version",
                    "enum": [
                      "v2"
                    ]
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "account_id": "52fd2a28-d2eb-4bd8-b862-a67934927b38",
                    "title": "MyKommo",
                    "hook_api_version": "v2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "examples": {
                  "Chat channel is successfully connected": {
                    "value": {
                      "account_id": "52fd2a28-d2eb-4bd8-b862-b57934927b38",
                      "scope_id": "f62a0162-46a7-430e-b06c-0ef798d56b21_52fd2a28-d2eb-4bd8-b862-b57934927b38",
                      "title": "MyKommo",
                      "hook_api_version": "v2",
                      "is_time_window_disabled": false
                    },
                    "summary": "Chat channel is successfully connected"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "account_id": {
                      "type": "string",
                      "example": "52fd2a28-d2eb-4bd8-b862-b57934927b38"
                    },
                    "scope_id": {
                      "type": "string",
                      "example": "f62a0162-46a7-430e-b06c-0ef798d56b21_52fd2a28-d2eb-4bd8-b862-b57934927b38"
                    },
                    "title": {
                      "type": "string",
                      "example": "MyKommo"
                    },
                    "hook_api_version": {
                      "type": "string",
                      "example": "v2"
                    },
                    "is_time_window_disabled": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "examples": {
                  "Incorrect data was transmitted. Details are available in the response body": {
                    "value": {
                      "status": 0,
                      "error_code": 400,
                      "error_type": "VALIDATION_ERROR",
                      "error_description": "Validation error: Key: AccountId.Required., Message: AccountId Can not be empty"
                    },
                    "summary": "Incorrect data was transmitted. Details are available in the response body"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "Incorrect request signature": {
                    "summary": "Incorrect request signature",
                    "value": {
                      "status": 0,
                      "error_code": 403,
                      "error_type": "ORIGIN_INVALID_SIGNATURE",
                      "error_description": "invalid signature"
                    }
                  }
                }
              }
            },
            "description": "Forbidden"
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```