Appearance
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 in | Where | What it does |
|---|---|---|
| API token | You generate it | Sent back to your Reply webhook URL as access_token with every reply, so your endpoint can verify the request came from MyChatBot |
| Unique page_id | You choose it | Identifies this specific integration channel |
| Reply webhook URL | Your endpoint | Where MyChatBot sends the assistant's replies back |
| Direction | How it flows |
|---|---|
| Your platform → MyChatBot | Your app posts each user message to the MyChatBot inbound webhook |
| MyChatBot → Your platform | The 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
- Open Channels → https://app.mychatbot.app/channels
- Select the agent you want to connect.
- Choose Webhooks API from the channel list.
- Fill in API token, Unique page_id, and Reply webhook URL.
- Click Connect Webhooks API.
- Turn on Connect agent to this channel — the toggle and Reply Delay (s) stay locked until the channel is connected.
- 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:
| Option | What it does | When to use |
|---|---|---|
| Reply Delay (s) | Waits this many seconds before the assistant replies | Make replies feel more human, or batch rapid-fire messages |
| Ignore Reactions | Skips reactions your users add to messages/stories | Turn on if reaction events would otherwise trigger unwanted replies |
| Quick comment reply | Optional short public reply text; leave empty to skip a public reply while still sending the real answer privately | Public comment threads where you reply in DM |
| Voice reply settings | Lets the assistant answer with a voice message and pick a voice | You 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/mychatbotThe 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:
| Field | Required | What it is |
|---|---|---|
client_id | Yes | A unique ID for the end user (keep it stable so their conversation continues) |
page_id | Yes | The Unique page_id you set when connecting the channel |
platform | Yes | Always the literal value "MCBWebhooks" — any other value doesn't match the channel |
text | Yes | The user's message text |
client_name | No | The user's display name |
client_avatar | No | URL to the user's avatar image |
audio | No | URL to an audio file for a voice message |
attachments | No | Array 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:
| Field | What it contains |
|---|---|
client_id | The end user the reply is for — the client_id you sent in |
access_token | The API token you set on the channel — check it to confirm the request came from MyChatBot |
text | The reply message text |
images | URL of an image in the reply |
file | URL of a file attachment |
audio | URL 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
audioURL 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
audioURL instead oftext. 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:
- 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. - The message is added to that user's conversation history (matched by
client_id). - If you sent audio, it's transcribed to text first.
- The assistant reads the conversation and writes a reply.
- 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:
| Code | Meaning | What to check |
|---|---|---|
200 OK | Message accepted | — |
400 Bad Request | Malformed JSON, or no channel matches platform + page_id | platform is "MCBWebhooks" and page_id matches the Unique page_id |
500 Internal Server Error | Something went wrong processing the request | Retry; 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.
