AI Integration Quick Reference
AI Integration Quick Reference
Message categories and types:
- message →
text,image,video,audio,file - custom → Developer-defined types (e.g.,
location,poll) - interactive →
form,card,customInteractive - action →
groupMember(joined/left/kicked/banned),message(edited/deleted) - call →
audio,video
Message Hierarchy

Categories Overview
| Category | Types | Description |
|---|---|---|
message | text, image, video, audio, file | Standard user messages |
custom | Developer-defined | Custom data (location, polls, etc.) |
interactive | form, card, customInteractive | Messages with actionable UI elements |
action | groupMember, message | System-generated events |
call | audio, video | Call-related messages |
Checking Message Category and Type
UsegetCategory() and getType() to determine how to handle a received message:
- JavaScript
- TypeScript
Message Category
Messages with categorymessage are standard user-sent messages:
| Type | Description |
|---|---|
text | Plain text message |
image | Image attachment |
video | Video attachment |
audio | Audio attachment |
file | File attachment |
Custom Category
Custom messages allow you to send data that doesn’t fit the default categories. You define your own type to identify the message (e.g.,location, poll, sticker).
Interactive Category
Interactive messages contain actionable UI elements that users can interact with directly in the chat:| Type | Description |
|---|---|
form | Embedded form with input fields |
card | Card with buttons and actions |
customInteractive | Custom interactive elements |
Action Category
Action messages are system-generated events. They have atype and an action property:
Type: groupMember — Actions on group members:
joined— Member joined the groupleft— Member left the groupkicked— Member was kickedbanned— Member was bannedunbanned— Member was unbannedadded— Member was addedscopeChanged— Member’s scope was changed
message — Actions on messages:
edited— Message was editeddeleted— Message was deleted
Call Category
Call messages track call events with typesaudio or video. The status property indicates the call state:
| Status | Description |
|---|---|
initiated | Call started |
ongoing | Call accepted and in progress |
canceled | Caller canceled |
rejected | Receiver rejected |
unanswered | No answer |
busy | Receiver on another call |
ended | Call completed |
Next Steps
Send Messages
Send text, media, and custom messages
Receive Messages
Listen for incoming messages in real time
Interactive Messages
Send messages with embedded forms and buttons
Additional Filtering
Advanced message filtering with RequestBuilder