Appearance
Webhooks API
Connect any external chat or messaging system to your MyChatBot agent. 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 agent's replies at a URL you control.
At a glance
| Field you fill in | Where | What it does |
|---|---|---|
| API token | You generate it | Authenticates the messages your platform sends in |
| Unique page_id | You choose it | Identifies this specific integration channel |
| Reply webhook URL | Your endpoint | Where MyChatBot sends the agent'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 agent'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.
- Turn on Connect agent to this channel.
- Set Reply Delay (s) — how long the agent waits before answering (a small delay feels more natural).
- Click Connect Webhooks API.
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 the channel must be turned on for that page_id. Otherwise the message is ignored.
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 agent 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 agent 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 MyChatBot shows you on the Channels page (https://app.mychatbot.app/channels) when you connect the Webhooks API channel.
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 | A name for your platform, e.g. "CustomApp" |
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": "CustomApp",
"text": "Hello, I have a question",
"attachments": ["https://example.com/image.jpg"]
}Receiving the agent's replies
MyChatBot posts each reply to the Reply webhook URL you configured, as a form-encoded request. Handle these fields:
| Field | What it contains |
|---|---|
text | The reply message text |
images | URLs to any images in the reply |
file | URL to any file attachment |
audio | URL to a voice reply (when voice replies are enabled) |
If a reply is long, it may arrive 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 agent treats it as a normal message. - Agent voice out — turn on Voice reply settings on the channel screen and pick a voice. Replies then include an
audioURL alongside the text.
json
{
"client_id": "UNIQUE_CLIENT_IDENTIFIER",
"page_id": "YOUR_PAGE_ID",
"client_name": "User Name",
"platform": "CustomApp",
"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 checks the channel is on for your
page_id. - 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 agent reads the conversation and writes a reply.
- The reply is delivered to your Reply webhook URL — split into parts if it's long, and with a voice version if voice replies are on.
Troubleshooting
The inbound webhook returns standard HTTP status codes:
| Code | Meaning | What to check |
|---|---|---|
200 OK | Message accepted | — |
400 Bad Request | Malformed request or a missing required field | You're sending client_id, page_id, platform, and text |
401 Unauthorized | The API token doesn't match | The token matches the API token on the channel screen |
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.
