Editing Messages & Pinning Messages
Edit Message
Note: Only text messages can be modified.
Endpoint
| Item | Description |
|---|---|
| URL | https://api-tx.typex-test.cn/open/robot/message/edit |
| Method | POST |
| Content-Type | application/json |
Request Headers
Authorization: Bearer <bot_token>
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Conversation ID |
message_id | string | Yes | Message ID to edit |
content.text | string | Yes | Modified text content |
content.is_markdown | bool | No | Whether to use Markdown format |
Example: Edit as Plain Text
curl --location 'https://api-tx.typex-test.cn/open/robot/message/edit' \
--header 'Authorization: Bearer <bot_token>' \
--header 'Content-Type: application/json' \
--data '{
"chat_id": "7602566729281049630",
"content": {
"text": "<p>Modified text content</p>"
},
"message_id": "7626681351445415938"
}'
Example: Edit as Markdown
curl --location 'https://api-tx.typex-test.cn/open/robot/message/edit' \
--header 'Authorization: Bearer <bot_token>' \
--header 'Content-Type: application/json' \
--data '{
"chat_id": "7602566729281049630",
"content": {
"is_markdown": true,
"text": "**Bold text** normal text"
},
"message_id": "7626681351445415938"
}'
Pin Message
Pin important messages or unpin them in group chats.
Endpoint
| Item | Description |
|---|---|
| URL | https://api-coco.typex.im/open/robot/message/pin |
| Method | POST |
| Content-Type | application/json |
Request Headers
Authorization: Bearer <bot_token>
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Conversation ID |
is_pin | bool | Yes | true-pin, false-unpin |
msg_ids | string[] | Yes | Message ID array. Pin supports one at a time; unpin supports batch |
is_notify | bool | Yes | Whether to notify all group members |
Response Format
{
"code": 0,
"msg": "ok",
"data": null
}