https://chatloka.net/api/v1/conversations/{conversation}/messages
Send an inline keyboard attached to a message. Buttons appear below the message. Supports reply (callback_data) and url types. Max 13 buttons.
conversations:write
1. Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
2. Get Your Conversation ID
Use the List Conversations endpoint to find the conversation ID. The response includes data.id which is the conversation ID you need.
3. Reply to a Message (Optional)
To reply/quote a specific message, include reply_to_id in your request body. This is the internal message ID (integer) from the messages list, not the platform's external ID.
{
"content": "Your reply",
"reply_to_id": 12345
}
To get message IDs, use the List Messages endpoint β each message has an id field.
| Field | Type | Required | Description |
|---|---|---|---|
channel_type |
string |
Required | Set to "telegram" |
interactive |
object |
Required | Interactive payload (see below) |
reply_to_id |
integer |
Optional | Internal message ID to reply/quote. Must belong to the same conversation. |
{
"channel_type": "telegram",
"interactive": {
"type": "buttons",
"body": "Choose an option:",
"buttons": [
{ "type": "reply", "id": "track_order", "title": "Track Order" },
{ "type": "url", "title": "Visit Site", "url": "https://example.com" }
]
}
}
curl -X POST 'https://chatloka.net/api/v1/conversations/{conversation}/messages' \
-H 'Authorization: Bearer $API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"channel_type": "telegram",
"interactive": {
"type": "buttons",
"body": "Choose an option:",
"buttons": [
{ "type": "reply", "id": "track_order", "title": "Track Order" },
{ "type": "url", "title": "Visit Site", "url": "https://example.com" }
]
}
}'
{
"success": true,
"data": {
"id": 5013,
"conversation_id": 123,
"direction": "outbound",
"type": "interactive",
"content": "Choose an option:",
"status": "sent",
"created_at": "2026-07-14T10:30:00+00:00"
},
"message": "Message queued for delivery"
}
UNAUTHORIZED
{ "success": false, "error": { "code": "UNAUTHORIZED", "message": "Invalid or revoked API key" } }
FORBIDDEN
{ "success": false, "error": { "code": "FORBIDDEN", "message": "You do not have permission to access this resource." } }
NOT_FOUND
{ "success": false, "error": { "code": "NOT_FOUND", "message": "The requested resource was not found." } }
VALIDATION_ERROR
{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "The given data was invalid.", "details": { "field": ["The field is required."] } } }
RATE_LIMIT_EXCEEDED
{ "success": false, "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Too many requests. Please slow down.", "retry_after": 60 } }
Every minute you wait is revenue walking out the door. Join hundreds of businesses who transformed their customer communication with ChatOn.
β 30-day money-back guarantee
We use cookies and similar technologies to improve your experience, analyze traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies. Privacy Policy & Cookie Policy.
Choose which cookies you want to allow. Essential cookies are always required for the website to function.
Essential Cookies
Required for the website to function. Cannot be disabled.
Analytics Cookies
Help us understand how visitors interact with our website by collecting anonymous data.
Marketing Cookies
Used to track visitors across websites to display relevant advertisements.