Skip to content

Webhooks API ​

Connect any external chat or messaging system to your AI sales assistant. If your platform can send and receive HTTP requests, your AI assistant can talk to its users — custom apps, support systems, mobile chat, IoT devices, or any third-party platform MyChatBot doesn't support natively.

Unlike the built-in channels (Telegram, WhatsApp, Website Widget), the Webhooks API is a do-it-yourself channel: you connect it in the app, then your own platform posts user messages in and receives the assistant's replies at a URL you control.

At a glance ​

Field you fill inWhereWhat it does
API tokenYou generate itSent back to your Reply webhook URL as access_token with every reply, so your endpoint can verify the request came from MyChatBot
Unique page_idYou choose itIdentifies this specific integration channel
Reply webhook URLYour endpointWhere MyChatBot sends the assistant's replies back
DirectionHow it flows
Your platform → MyChatBotYour app posts each user message to the MyChatBot inbound webhook
MyChatBot → Your platformThe assistant's reply is posted back to your Reply webhook URL

Connect it in the app ​

The Webhooks API channel is set up entirely from the Channels page — you only need the fields above.

In the app

  1. Open Channels → https://app.mychatbot.app/channels
  2. Select the agent you want to connect.
  3. Choose Webhooks API from the channel list.
  4. Fill in API token, Unique page_id, and Reply webhook URL.
  5. Click Connect Webhooks API.
  6. Turn on Connect agent to this channel — the toggle and Reply Delay (s) stay locked until the channel is connected.
  7. Set Reply Delay (s) — how long the assistant waits before answering (a small delay feels more natural).

To disconnect later, open the same screen and click Revoke.

Your page_id must match

The page_id in every message you send must exactly match the Unique page_id you entered here, and platform must be "MCBWebhooks". Otherwise the message is rejected. While the channel is off, messages are saved to the conversation but the assistant doesn't reply.

Channel options ​

Once connected, a few extra toggles appear on the same channel screen:

OptionWhat it doesWhen to use
Reply Delay (s)Waits this many seconds before the assistant repliesMake replies feel more human, or batch rapid-fire messages
Ignore ReactionsSkips reactions your users add to messages/storiesTurn on if reaction events would otherwise trigger unwanted replies
Quick comment replyOptional short public reply text; leave empty to skip a public reply while still sending the real answer privatelyPublic comment threads where you reply in DM
Voice reply settingsLets the assistant answer with a voice message and pick a voiceYou want spoken replies (see Voice messages)

Sending messages to MyChatBot ​

When a user writes on your platform, POST their message as JSON to the inbound webhook URL. It is the same for every account and isn't shown in the app:

https://api.mychatbot.app/webhook/mychatbot

The inbound webhook doesn't check the API token — the channel is found by platform and page_id, so keep your Unique page_id hard to guess.

Send a JSON body. Only four fields are required:

FieldRequiredWhat it is
client_idYesA unique ID for the end user (keep it stable so their conversation continues)
page_idYesThe Unique page_id you set when connecting the channel
platformYesAlways the literal value "MCBWebhooks" — any other value doesn't match the channel
textYesThe user's message text
client_nameNoThe user's display name
client_avatarNoURL to the user's avatar image
audioNoURL to an audio file for a voice message
attachmentsNoArray of URLs to attached files or images
json
{
  "client_id": "UNIQUE_CLIENT_IDENTIFIER",
  "page_id": "YOUR_PAGE_ID",
  "client_name": "User Name",
  "client_avatar": "https://example.com/avatar.jpg",
  "platform": "MCBWebhooks",
  "text": "Hello, I have a question",
  "attachments": ["https://example.com/image.jpg"]
}

Receiving the assistant's replies ​

MyChatBot posts each reply to the Reply webhook URL you configured, as a form-encoded (application/x-www-form-urlencoded) request. Every request carries:

FieldWhat it contains
client_idThe end user the reply is for — the client_id you sent in
access_tokenThe API token you set on the channel — check it to confirm the request came from MyChatBot
textThe reply message text
imagesURL of an image in the reply
fileURL of a file attachment
audioURL to a voice reply (when voice replies are enabled), sent instead of text

Each image and each file arrives as its own request (with images or file set and no text), before the text. Text longer than 700 characters arrives as several parts sent one after another — append them in order.

Voice messages ​

The Webhooks API supports voice in both directions.

  • User voice in — include an audio URL in your message. MyChatBot transcribes it automatically and the assistant treats it as a normal message.
  • Assistant voice out — turn on Voice reply settings on the channel screen and pick a voice. When the user's message was a voice message, the reply then comes as an audio URL instead of text. Replies to text messages stay text.
json
{
  "client_id": "UNIQUE_CLIENT_IDENTIFIER",
  "page_id": "YOUR_PAGE_ID",
  "client_name": "User Name",
  "platform": "MCBWebhooks",
  "audio": "https://example.com/audio.mp3"
}

What happens to a message ​

From your side, the flow is simple: you send a message, and one or more replies come back to your Reply webhook URL. Behind that:

  1. MyChatBot finds the channel for your page_id. If the channel is off, the message is saved to the conversation but the assistant doesn't reply.
  2. The message is added to that user's conversation history (matched by client_id).
  3. If you sent audio, it's transcribed to text first.
  4. The assistant reads the conversation and writes a reply.
  5. The reply is delivered to your Reply webhook URL — with images and files first, text split into parts if it's long, and as audio when answering a voice message with voice replies on.

Troubleshooting ​

The inbound webhook returns standard HTTP status codes:

CodeMeaningWhat to check
200 OKMessage accepted—
400 Bad RequestMalformed JSON, or no channel matches platform + page_idplatform is "MCBWebhooks" and page_id matches the Unique page_id
500 Internal Server ErrorSomething went wrong processing the requestRetry; contact support if it persists

No replies coming through?

The most common cause is a page_id mismatch or the channel being switched off. Confirm the Unique page_id on the Channels screen matches what you send, and that Connect agent to this channel is on.

Use cases ​

The Webhooks API is a fit for:

  • Custom chat applications.
  • Integrating with an existing customer support system.
  • In-app chat for a mobile app.
  • IoT devices with messaging.
  • Any third-party platform MyChatBot doesn't support natively.

See also ​