For AI agents: markdown of this page — /docs-content-en/chats/messages/keyboard.md documentation index — /llms.txt
Keyboard
Interactive buttons under a message. Passed in the keyboard field when sending — an array where each button is a separate object.
Button fields
| Field | Type | Default | Description |
|---|---|---|---|
FieldTEXT |
Typestring | Default— | DescriptionButton text. Required for all buttons except TYPE: "NEWLINE" |
FieldTYPE |
Typestring | Default— | DescriptionSpecial type: NEWLINE — wrap to a new line |
FieldLINK |
Typestring | Default— | DescriptionURL — the button becomes a link |
FieldACTION |
Typestring | Default— | DescriptionAction on click: PUT (insert into the input field), SEND (send text), COPY (copy), CALL (call), DIALOG (open chat) |
FieldACTION_VALUE |
Typestring | Default— | DescriptionValue for ACTION: text, phone number or chat ID |
FieldBG_COLOR_TOKEN |
Typestring | Defaultbase |
DescriptionPreset background color (see tokens below) |
FieldBG_COLOR |
Typestring | Default— | DescriptionBackground color in hexadecimal format (#ff6600) |
FieldTEXT_COLOR |
Typestring | Default— | DescriptionText color in hexadecimal format |
FieldDISPLAY |
Typestring | DefaultBLOCK |
DescriptionLayout: LINE (inline with others) or BLOCK (full width) |
FieldDISABLED |
Typestring | DefaultN |
DescriptionInactive button: Y or N |
FieldBLOCK |
Typestring | DefaultN |
DescriptionY — the button is disabled after a click |
FieldWIDTH |
Typeinteger | Default— | DescriptionButton width in pixels |
FieldCONTEXT |
Typestring | DefaultALL |
DescriptionWhere to show: MOBILE, DESKTOP, ALL |
Color tokens
| Token | Color | Purpose |
|---|---|---|
Tokenprimary |
ColorBlue | PurposePrimary action |
Tokensecondary |
ColorGray | PurposeSecondary action |
Tokenalert |
ColorRed | PurposeDangerous action |
Tokenbase |
ColorWhite | PurposeNeutral button (default) |
Example
{
"message": "Confirm the action:",
"keyboard": [
{ "TEXT": "Approve", "BG_COLOR_TOKEN": "primary", "ACTION": "SEND", "ACTION_VALUE": "/approve", "BLOCK": "Y" },
{ "TEXT": "Reject", "BG_COLOR_TOKEN": "alert", "ACTION": "SEND", "ACTION_VALUE": "/reject", "BLOCK": "Y" },
{ "TYPE": "NEWLINE" },
{ "TEXT": "Details", "LINK": "https://example.com/tasks/42", "BG_COLOR_TOKEN": "secondary", "DISPLAY": "LINE" }
]
}