DeBox Developer OpenAPI
Endpoint Index (Ordered)
POST /openapi/bot/sendMessagePOST /openapi/bot/sendMessageToFansPOST /openapi/bot/editMessagePOST /openapi/bot/getMePOST /openapi/bot/getUpdatesGET /openapi/group/infoGET /openapi/group/is_joinPOST /openapi/group/admin/dao_memberPOST /openapi/group/admin/kick_memberPOST /openapi/group/admin/message/recallGET /openapi/user/infoGET /openapi/user/is_followGET /openapi/token/infoGET /openapi/box/info
Capability Overview
| Capability | Endpoints and uses |
|---|---|
| Bot and messaging | Get the current bot, send or edit messages, broadcast to followers, and receive messages and interaction events. |
| Groups and moderation | Query groups and membership, list members, remove members, and recall group messages. |
| Users and relationships | Query public user information and check follow relationships. |
| Web3 data | Query token metadata and overall BOX information. |
OpenAPI request address (Base URL)
https://open.debox.pro
Authentication
A DApp that needs authenticated DeBox OpenAPI endpoints must first create a bot through BotMother. The bot's App Key is the API Key used in X-API-KEY. Keep it on the backend and never expose it in H5 or browser code.
All endpoints except GET /openapi/box/info require:
X-API-KEY: <your_api_key>
Response Envelopes
Standard envelope
{
"code": 1,
"success": true,
"data": {}
}
Bot envelope
{
"ok": true,
"success": true,
"result": {}
}
Global Parameter Ranges
chat_type:group|privatechat_id:- when
chat_type=group: groupgid - when
chat_type=private: target user'suser_id; this value is the same as that user'suidandinvite_code, but the request field remainschat_id
- when
contentis the primary field- max length for text-like modes (
text/richtext/Markdown/MarkdownV2/HTML): 5000 chars - default
parse_mode:richtext parse_modeenum:richtext(default)textMarkdownMarkdownV2HTMLimagevideofile
How to fill content (critical)
parse_mode=richtext: normal text/rich text string (default), e.g.Hello, welcome to DeBox Bot.parse_mode=text: plain text only (no Markdown/HTML parsing), e.g.plain text only.parse_mode=Markdown: Markdown content, e.g.**bold**.parse_mode=MarkdownV2: MarkdownV2 content (escape special chars as required), e.g.\\*bold\\*.parse_mode=HTML: HTML fragment (e.g.<b>Hello</b>).parse_mode=image: setcontentto a public image URL (e.g.https://cdn.example.com/a.png).parse_mode=video: setcontentto a public video URL (e.g.https://cdn.example.com/a.mp4).parse_mode=file: setcontentto a public file URL (e.g.https://cdn.example.com/a.pdf).
Image sending is subject to bot-level and target-group administrator rules. See Bot level and image sending for the complete requirements, administrator exception, level check, and upgrade steps.
Minimal reply_markup / user_action_markup sample
{
"inline_keyboard": [
[
{ "text": "View detail", "url": "https://docs.debox.pro/en/ApiOnePage" },
{ "text": "Callback button", "callback_data": "detail" }
]
]
}
mention_type / mention_ids practical guidance
- Recommended mainly when
parse_mode=text. - For rich text modes (
richtext/Markdown/MarkdownV2/HTML), prefer writing@directly incontentand avoidmention_*. - If no mention behavior is needed, omit both fields.
1. POST /openapi/bot/sendMessage
At a glance
- Requires: an App Key,
chat_id,chat_type, and messagecontent. - Useful for: replying to a user or sending a notification to a specified private chat or group.
- Limits: each request sends to one specified private chat or group; it is not a fan broadcast.
Curl Example
curl -X POST "https://open.debox.pro/openapi/bot/sendMessage" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_APP_KEY" \
-d '{"chat_id":"cc0onr82","chat_type":"group","content":"hello","parse_mode":"richtext"}'
Request params (Body, JSON)
chat_idstring, requiredchat_typestring, required, enum:group|privatecontentstring, requiredparse_modestring, optional, defaultrichtextmessage_idstring, optionalmention_typeint, optionalmention_idsstring[], optionalreply_markupobject, optionaluser_action_markupobject, optional
Success response example
{
"ok": true,
"success": true,
"result": {
"message_id": "01JYXXXX",
"text": "Hello from DeBox",
"parse_mode": "richtext"
}
}
Error response example
{
"ok": false,
"success": false,
"message": "message can't be empty"
}
2. POST /openapi/bot/sendMessageToFans
At a glance
- Requires: an App Key, approved subscription-account permission, and the message fields listed below.
- Useful for: broadcasting product updates, service notices, or announcements to the bot's followers.
- Limits: content is limited to 2000 bytes; follower scope and delivery rules follow the bot's current platform permissions.
Curl Example
curl -X POST "https://open.debox.pro/openapi/bot/sendMessageToFans" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_APP_KEY" \
-d '{"chat_id":"cc0onr82","chat_type":"group","content":"broadcast","parse_mode":"richtext"}'
Request params (Body, JSON)
chat_idstring, requiredchat_typestring, required, enum:group|privatecontentstring, requiredparse_modestring, optional, defaultrichtext
Constraint: content max 2000 bytes.
Success response example
{
"ok": true,
"success": true,
"result": true
}
Error response example
{
"ok": false,
"success": false,
"message": "message must be less than 2000 bytes"
}
3. POST /openapi/bot/editMessage
At a glance
- Requires: an App Key, the target chat, the exact
message_id, and the replacement content. - Useful for: correcting or updating a message previously sent by the bot.
- Limits: it does not allow the bot to edit arbitrary messages sent by other users.
Curl Example
curl -X POST "https://open.debox.pro/openapi/bot/editMessage" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_APP_KEY" \
-d '{"chat_id":"cc0onr82","chat_type":"group","message_id":"01JYXXXX","content":"edited","parse_mode":"richtext"}'
Request params (Body, JSON)
chat_idstring, requiredchat_typestring, required, enum:group|privatemessage_idstring, requiredcontentstring, requiredparse_modestring, optional, defaultrichtext
Success response example
{
"ok": true,
"success": true,
"result": true
}
Error response example
{
"ok": false,
"success": false,
"message": "EditMessageText param Group Id is error"
}
4. POST /openapi/bot/getMe
At a glance
- Requires: an App Key; no request body is required.
- Useful for: checking the current bot's ID, profile, address, and level.
- Limits: it returns the bot bound to the current App Key, not an ordinary user's profile.
Curl Example
curl -X POST "https://open.debox.pro/openapi/bot/getMe" \
-H "X-API-KEY: YOUR_APP_KEY"
Request params
None.
Success response example
{
"ok": true,
"success": true,
"result": {
"name": "DeBox Bot",
"address": "0x...",
"pic": "https://...",
"user_id": "u1",
"level": 3,
"level_icon": "https://.../icon/level/v3.png"
}
}
Error response example
{
"ok": false,
"success": false,
"message": "invalid param"
}
5. POST /openapi/bot/getUpdates
At a glance
- Requires: an App Key and Long Polling as the active receiving mode.
- Useful for: receiving new messages and interaction events sent to the bot.
- Limits: Webhook and Long Polling are mutually exclusive, and this endpoint is not a general chat-history query.
Curl Example
curl -X POST "https://open.debox.pro/openapi/bot/getUpdates" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_APP_KEY" \
-d '{"timeout":30}'
Request params (Body, JSON)
timeoutint, optional, range1~60, default30
If a Webhook URL is configured in BotMother, Webhook is the only effective receiving path and this endpoint cannot be used to receive messages. Clear the Webhook settings before using getUpdates for Long Polling.
Success response example (with updates)
{
"ok": true,
"success": true,
"result": [
{
"id": 123,
"message": {
"message_id": "01JYXXXX",
"from": {
"user_id": "u1",
"name": "Alice",
"address": "0x..."
},
"chat": {
"id": "cc0onr82",
"type": "group"
},
"text": "Ping",
"parse_mode": "richtext"
}
}
]
}
Success response example (timeout, no updates)
{
"ok": true,
"success": true,
"result": []
}
Error response example
{
"ok": false,
"success": false,
"message": "Invalid timeout value"
}
6. GET /openapi/group/info
At a glance
- Requires: an App Key and the group
gid. - Useful for: validating a group ID and displaying basic group information before sending notifications or performing group operations.
- Limits: it returns group metadata, not the complete member list; use
dao_memberwhen a member list is required.
Curl Example
curl "https://open.debox.pro/openapi/group/info?gid=cc0onr82" \
-H "X-API-KEY: YOUR_APP_KEY"
Query params
gidstring, required
Success response example
{
"code": 1,
"success": true,
"data": {
"is_charge": false,
"subchannel_number": 2,
"group_name": "DeBox Dev",
"gid": "cc0onr82",
"group_number": 345,
"group_pic": "https://...",
"create_time": "2026-05-14 14:00:00",
"maximum": "Unlimited",
"mod": ["Alice", "Bob"],
"mod_info": [
{
"name": "Alice",
"address": "0x...",
"pic": "https://...",
"user_id": "u1"
}
]
}
}
Error response example
{
"code": -3001,
"success": false,
"message": "No such group"
}
7. GET /openapi/group/is_join
At a glance
- Requires: an App Key, the group
gid, and an EVMwalletAddress. - Useful for: checking membership before opening member-only features or issuing rewards.
- Limits: it only returns a Boolean membership result; it does not join the user to the group or return the member list.
Curl Example
curl "https://open.debox.pro/openapi/group/is_join?gid=cc0onr82&walletAddress=0x1234567890abcdef1234567890abcdef12345678" \
-H "X-API-KEY: YOUR_APP_KEY"
Query params
gidstring, requiredwalletAddressstring, required (EVM address)
Success response example
{
"code": 1,
"data": true
}
Error response example
{
"error": "Bad Request",
"code": 401,
"message": "Param error"
}
8. POST /openapi/group/admin/dao_member
At a glance
- Requires: an App Key, signed request headers, the group
gid, and the required management permission in that group. - Useful for: reading the current member list and public member profiles page by page.
- Limits: each page contains at most 50 members; the endpoint does not return historical chat messages or private conversations.
Curl Example
curl -X POST "https://open.debox.pro/openapi/group/admin/dao_member" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_APP_KEY" \
-H "nonce: RANDOM_NONCE" \
-H "timestamp: 1715500000" \
-H "signature: SHA1(app_secret+nonce+timestamp)" \
-d '{"gid":"cc0onr82","page":1,"size":20}'
Extra headers (required)
noncestringtimestampstringsignaturestring
Signature algorithm: sha1(app_secret + nonce + timestamp).
Request params (Body, JSON)
gidstring, required, length1~8pageint, optional, if<=0then treated as1sizeint, optional, default50, max50
Success response example
{
"code": 1,
"success": true,
"data": [
{
"user_id": "u1",
"name": "Alice",
"pic": "https://...",
"address": "0x...",
"signature": "builder"
}
]
}
Error response example
{
"code": -4017,
"success": false,
"message": "permission denied"
}
9. POST /openapi/group/admin/kick_member
At a glance
- Requires: an App Key, signed request headers, the target
gid, memberuser_idvalues, and moderator or builder permission. - Useful for: removing spam accounts, invalid members, or users who no longer meet a group's access rules.
- Limits: this operation changes group state and accepts at most 20 users per request; verify it with test accounts first.
Purpose
Remove one or more members from a DeBox group.
The bot account bound to the current X-API-KEY must already be in the target group and must have moderator or builder permission in that group.
Curl Example
curl -X POST "https://open.debox.pro/openapi/group/admin/kick_member" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_APP_KEY" \
-H "nonce: RANDOM_NONCE" \
-H "timestamp: 1715500000" \
-H "signature: SHA1(app_secret+nonce+timestamp)" \
-d '{
"gid":"cc0onr82",
"user_ids":["u1","u2"]
}'
Extra headers (required)
noncestringtimestampstringsignaturestring
Signature algorithm: sha1(app_secret + nonce + timestamp).
Permission requirements
X-API-KEYmust be valid.- The API key must be bound to an existing DeBox bot account.
- The bound bot must be a moderator or builder of the target group.
Request params (Body, JSON)
gidstring, required, target group ID, length1~8user_idsstring array, required, list of DeBoxuser_idvalues to removeuser_idsmaximum size:20per request
Validation and execution rules
- Empty
user_idsis rejected. - Empty string items inside
user_idsare rejected. - Duplicate
user_idvalues are de-duplicated before execution. - If any provided
user_idcannot be resolved to a valid user, the request fails.
Success response example
{
"code": 1,
"success": true,
"message": "success",
"data": true
}
Error response examples
{
"code": -2004,
"success": false,
"message": "uid size must be less than or equal to 20",
"data": null
}
{
"code": -4017,
"success": false,
"message": "permission denied",
"data": null
}
10. POST /openapi/group/admin/message/recall
At a glance
- Requires: an App Key, signed request headers, moderator or builder permission, the group
gid, the original sender'suser_id, and the exactmessage_id. - Useful for: recalling a specific spam, policy-violating, or incorrectly sent group message.
- Limits: the message and sender must match the target group; this is not a general history search or arbitrary message deletion API.
Purpose
Recall a group message through an administrator action.
After a successful recall, the group displays a system notification similar to:
MOD {operator_name} recalled {sender_name}'s message.
The exact wording follows the language selected in the DeBox App.
Curl Example
curl -X POST "https://open.debox.pro/openapi/group/admin/message/recall" \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_APP_KEY" \
-H "nonce: RANDOM_NONCE" \
-H "timestamp: 1715500000" \
-H "signature: SHA1(app_secret+nonce+timestamp)" \
-d '{
"gid":"cc0onr82",
"user_id":"u1",
"message_id":"01HXYZABCDEF1234567890"
}'
Extra headers (required)
noncestringtimestampstringsignaturestring
Signature algorithm: sha1(app_secret + nonce + timestamp).
Permission requirements
X-API-KEYmust be valid.- The API key must be bound to an existing DeBox bot account.
- The bound bot must be a moderator or builder of the target group.
Request params (Body, JSON)
gidstring, required, target group ID, length1~8user_idstring, required, DeBoxuser_idof the original sendermessage_idstring, required, message ID to recall
Important notes
user_idmust resolve to an existing DeBox user.message_idmust identify a message in the target group that can be modified by the platform.- The operator name in the recall notice prefers the bot display name and falls back to the bot
user_id. - The original sender name follows the same fallback rule.
Success response example
{
"code": 1,
"success": true,
"message": "success",
"data": true
}
Error response examples
{
"code": -2004,
"success": false,
"message": "message_id is required",
"data": null
}
{
"code": -2000,
"success": false,
"message": "recall message failed",
"data": null
}
11. GET /openapi/user/info
At a glance
- Requires: an App Key and either a DeBox
user_idor an EVM wallet address. - Useful for: displaying a user's public name and avatar or matching a wallet address to a DeBox profile.
- Limits: it returns public profile fields, not private chats, message history, or private keys.
Curl Example
curl "https://open.debox.pro/openapi/user/info?user_id=u1" \
-H "X-API-KEY: YOUR_APP_KEY"
Query params
user_idstring, optionaladdressstring, optional (EVM address)- at least one is required
Success response example
{
"code": 1,
"success": true,
"data": {
"user_id": "u1",
"name": "Alice",
"address": "0x...",
"pic": "https://...",
"signature": "gm builder"
}
}
Error response example
{
"code": -2004,
"success": false,
"message": "invalid param"
}
12. GET /openapi/user/is_follow
At a glance
- Requires: an App Key,
walletAddress, andfollowAddress. - Useful for: checking whether one account follows another before enabling follower-only features or rewards.
- Limits: the result is directional and Boolean; the endpoint does not perform a follow action for the user.
Curl Example
curl "https://open.debox.pro/openapi/user/is_follow?walletAddress=0x1234567890abcdef1234567890abcdef12345678&followAddress=0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" \
-H "X-API-KEY: YOUR_APP_KEY"
Query params
walletAddressstring, required (EVM address)followAddressstring, required (EVM address)
Success response example
{
"code": 1,
"data": true
}
Error response example
{
"error": "Bad Request",
"code": 401,
"message": "Please input the wallet address correctly"
}
13. GET /openapi/token/info
At a glance
- Requires: an App Key and
contract_address;chain_idis optional and is treated as0when omitted or negative. - Useful for: displaying a token's name, symbol, decimals, and logo after a contract address is entered.
- Limits: it returns token metadata, not market price or the token balance of a wallet.
Curl Example
curl "https://open.debox.pro/openapi/token/info?contract_address=0x55d398326f99059fF775485246999027B3197955&chain_id=56" \
-H "X-API-KEY: YOUR_APP_KEY"
Query params
contract_addressstring, requiredchain_idint, optional; missing/negative is treated as0
Success response example
{
"code": 1,
"success": true,
"data": {
"chain_id": 56,
"token": "0x55d398326f99059fF775485246999027B3197955",
"decimal": 18,
"name": "Tether USD",
"symbol": "USDT",
"logo_url": "https://..."
}
}
Error response example
{
"code": -2004,
"success": false,
"message": "contract_address must be a valid contract address"
}
14. GET /openapi/box/info
At a glance
- Requires: no parameters and no App Key.
- Useful for: displaying overall BOX information in dashboards or statistics pages.
- Limits: it returns overall BOX data, not the BOX balance held by a specific user.
Curl Example
curl "https://open.debox.pro/openapi/box/info"
Public endpoint, no API key required.
Query params
None.
Success response example
{
"code": 1,
"success": true,
"data": {
"max_supply": "1000000000",
"burned": "...",
"supply": "...",
"locked": "...",
"address": "0x...",
"symbol": "BOX",
"chainId": 1,
"icon": "https://...",
"stake": "..."
}
}