Events
Send an event
Sends a message or a file in a chat.
The chat's assignee writes (a bot: only its own chats); an admin may write in any chat they can see, and visibility: agents makes it a note the visitor never sees. event.custom_id makes a retry safe: the same custom_id answers the first event_id and sends nothing. A file event takes url: the URL upload_file answered (or its bare ID); other URLs are refused. A message may carry up to 10 quick_replies buttons. A closed chat answers chat_inactive. Unknown request fields are ignored. Rate limit 30 per 10 s per agent or bot, and 100 calls per 10 s across these methods.
POST/v1/agent/action/send_event
Specifics
| Method URL | POST https://app.staging.mlive.chat/v1/agent/action/send_event |
|---|---|
| Who can call it | Bots, with a bot token (mlcb_). |
| WebSocket action | send_event, the same call over an open socket |
| Rate limit | 30 per 10 s per agent or bot, and 100 calls per 10 s across these methods. |
Request body
application/json
chat_idstringrequiredeventobjectrequiredevent.typestringrequiredOne ofmessage,file.event.textstringMessage only. 1 to 4000 characters.event.visibilitystringOne ofall,agents. Default"all".event.custom_idstringUp to 200 characters.event.urlstringFile only: the url from upload_file.event.quick_repliesarray of QuickReplyButtons under a visible message. Up to 10 items.event.quick_replies[].titlestringrequiredThe button label; tapping sends it as the visitor's message. 1 to 40 characters.event.quick_replies[].postbackstringrequiredWhat the bot receives as the message's postback. 1 to 200 characters.
Response
200 · application/json
Sent.
event_idstringrequired
Errors
- default
Nothing found. Try a method name, such as send event.