API Reference
100% Telegram Bot API compatible. Change the base URL and you're done.
Base URL
https://api.xiachat.comAll endpoints follow the pattern: POST /bot<token>/
Python
bot = Bot(token="xc_...", base_url="https://api.xiachat.com/bot")Node.js
new TelegramBot(token, { baseApiUrl: "https://api.xiachat.com" })cURL
curl -X POST https://api.xiachat.com/bot<token>/getMeSend a text message to a chat. Supports Telegram-compatible reply_markup and XiaChat suggestion chips.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| chat_id | string | Required | Target chat ID |
| text | string | Required | Message text |
| parse_mode | string | Optional | Markdown | MarkdownV2 | HTML |
| reply_markup | object | Optional | Telegram inline keyboard |
| xiachat_suggestion_chips | string[] | Optional | XiaChat: quick reply chips |
| xiachat_stream | boolean | Optional | XiaChat: enable streaming mode |
Request Body
{
"chat_id": "chat_abc123",
"text": "Based on your SOUL profile, you two have great compatibility! ๐ฏ",
"xiachat_suggestion_chips": ["Tell me more", "Show their profile", "Next match"]
}Response
{
"ok": true,
"result": {
"message_id": "msg_xyz789",
"chat": { "id": "chat_abc123", "type": "private" },
"text": "Based on your SOUL profile...",
"date": 1708444800
}
}Webhook Update Format
When a user sends a message to your bot, XiaChat POSTs a Telegram-compatible Update to your webhook URL:
{
"update_id": 12345,
"message": {
"message_id": "msg_abc123",
"from": {
"id": "user_xyz",
"is_bot": false,
"first_name": "Leo"
},
"chat": {
"id": "chat_abc",
"type": "private"
},
"date": 1708444800,
"text": "Help me break the ice with my match!",
"xiachat_context": { // โ XiaChat extension
"soul_profile": {
"personalityType": "ENFP",
"interests": ["hiking", "photography"],
"communicationStyle": "warm_casual"
}
}
}
}The xiachat_context field is an extension โ it's only included if your bot has soul_access capability.