Channels

Connecting a new bot through the API is not possible, as each messenger has its own characteristics. To add a bot, please use your personal cabinet.

How to determine bot (channel) status

Each channel connected to the HighTouch platform has two statuses:

  1. Bot status

  2. Adapter status

Bot status is used to manually stop and start the bot. Possible options: 1 - Bot created 3 - Stopped manually 5 - Launched

The status of the bot can be obtained by querying /bot/bots/:id/ in the field status

Adapter status reflects the connection status of the HighTouch platform and messenger servers for running bots (which have bot status 1).

Adapter status reflects the real state of the channel (bot). You can find it out by running the query/bot/bot/:id/status/. The possible statuses are listed in the documentation for this request.

If the bot is stopped manually, the status of the adapter is meaningless, because the HighTouch platform closes all connections to messenger servers. The possible statuses are listed in the documentation for this request.

Bot list

GET https://app.hightouch.ai/api/bot/bots/

Query Parameters

NameTypeDescription

shop_id

integer

Store ID

{
  "status": "ok",
  "result": {
    "count": 6,
    "next": null,
    "previous": null,
    "results": [
      {
        "id": 503,
        "shop_id": 2,
        "bot_type": 1,
        "name": "Кофе Доставка",
        "avatar_url": "https://storage.yandexcloud.net/s2b-external/telegram/images/38/33989517433481129.jpeg",
        "status": 5,
        "wa_phone_number": null,
        "tg_bot_nickname": "dostavka_kmv_bot",
        "vk_group_id": null,
        "fb_group_id": null,
        "avito_user_id": null,
        "waba_phone_number": null
      },
      ...
    ]
  }
}

Information about the bot

GET https://app.hightouch.ai/api/bot/bots/:id/

Path Parameters

NameTypeDescription

id

integer

Bot ID

{
  "status": "ok",
  "result": {
    "id": 493,
    "shop_id": 2,
    "bot_type": 7,
    "name": "Чат на сайт",
    "avatar_url": null,
    "status": 5,
    "wa_phone_number": null,
    "tg_bot_nickname": null,
    "vk_group_id": null,
    "fb_group_id": null,
    "avito_user_id": null,
    "waba_phone_number": "79163066646",
    "livechat_jwt": "..."
  }
}

Bot status

GET https://app.hightouch.ai/api/bot/bot/:id/status/

Возможные статусы ботов: 0 - [all] Stopped 1 - [vk] Community callback is not installed 2 - [vk] sending required events is disabled for the community 3 - [vk] bot capabilities are disabled for the community 21 - [telegram] access_token out of date 22 - [telegram] access_token not valid (entered incorrectly) 5 - [all] Running 6 - [whatsapp] Phone is not connected 7 - [avito] Bot connected, waiting for the first message from subscribers 8 - [all] Webhook is installed, but the webhook URL is incorrect 10 - [all] Working

Path Parameters

NameTypeDescription

id

integer

ID бота

{
  "status": "ok",
  "result": {
    "bot_id": 387,
    "status_id": 10
  }
}

Reboot (reconnect) the bot

GET https://app.hightouch.ai/api/bot/bot/:id/restart/

This query performs several tasks at once: 1. Restarts stopped bots 2. Resets webhook (depending on the messenger) 3. Updates connections to messenger servers

Path Parameters

NameTypeDescription

id

integer

Bot ID

{
  "status": "ok",
  "result": {
    "bot_id": 387
  }
}

Stop the bot

GET https://app.hightouch.ai/api/bot/bot/:id/stop/

The bot will stop receiving and sending messages. In the future you will be able to restart the bot with the request /bot/bot/:id/restart/

Path Parameters

NameTypeDescription

id

integer

Bot ID

{
  "status": "ok",
  "result": {
    "bot_id": 387
  }
}

Delete the bot

DELETE https://app.hightouch.ai/api/bot/bots/:id/

Path Parameters

NameTypeDescription

id

integer

Bot ID

Last updated