Skip to main content

DeBox Developer OpenAPI

Endpoint Index (Ordered)

  1. POST /openapi/bot/sendMessage
  2. POST /openapi/bot/sendMessageToFans
  3. POST /openapi/bot/editMessage
  4. POST /openapi/bot/getMe
  5. POST /openapi/bot/getUpdates
  6. GET /openapi/group/info
  7. GET /openapi/group/is_join
  8. POST /openapi/group/admin/dao_member
  9. GET /openapi/user/info
  10. GET /openapi/user/is_follow
  11. GET /openapi/token/info
  12. GET /openapi/box/info

Base URL

https://open.debox.pro

Authentication

All endpoints except GET /openapi/box/info require:

X-API-KEY: <your_api_key>

Response Envelopes

Standard envelope

{
"code": 200,
"success": true,
"data": {}
}

Bot envelope

{
"ok": true,
"success": true,
"result": {}
}

Global Parameter Ranges

  • chat_type: group | private
  • chat_id:
    • when chat_type=group: group gid
    • when chat_type=private: user user_id (invite code)
  • content is the primary field
  • max length for text-like modes (text/richtext/Markdown/MarkdownV2/HTML): 5000 chars
  • default parse_mode: richtext
  • parse_mode enum:
    • richtext (default)
    • text
    • Markdown
    • MarkdownV2
    • HTML
    • image
    • video
    • file

How to fill content (critical)

  • parse_mode=richtext: normal text/rich text string (default).
  • parse_mode=text: plain text only (no Markdown/HTML parsing).
  • parse_mode=Markdown: Markdown content.
  • parse_mode=MarkdownV2: MarkdownV2 content (escape special chars as required).
  • parse_mode=HTML: HTML fragment (e.g. <b>Hello</b>).
  • parse_mode=image: set content to a public image URL (e.g. https://cdn.example.com/a.png).
  • parse_mode=video: set content to a public video URL (e.g. https://cdn.example.com/a.mp4).
  • parse_mode=file: set content to a public file URL (e.g. https://cdn.example.com/a.pdf).

Minimal reply_markup / user_action_markup sample

{
"inline_keyboard": [
[
{ "text": "View detail", "url": "https://docs.debox.pro/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 in content and avoid mention_*.
  • If no mention behavior is needed, omit both fields.

1. POST /openapi/bot/sendMessage

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_id string, required
  • chat_type string, required, enum: group | private
  • content string, required
  • parse_mode string, optional, default richtext
  • message_id string, optional
  • mention_type int, optional
  • mention_ids string[], optional
  • reply_markup object, optional
  • user_action_markup object, 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

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_id string, required
  • chat_type string, required, enum: group | private
  • content string, required
  • parse_mode string, optional, default richtext

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

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_id string, required
  • chat_type string, required, enum: group | private
  • message_id string, required
  • content string, required
  • parse_mode string, optional, default richtext

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

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

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)

  • timeout int, optional, range 1~60, default 30

Note: if webhook URL is configured in platform console, webhook becomes the only effective receive path. In that case this endpoint usually returns none or near-none updates.

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

Curl Example

curl "https://open.debox.pro/openapi/group/info?gid=cc0onr82" \
-H "X-API-KEY: YOUR_APP_KEY"

Query params

  • gid string, required

Success response example

{
"code": 200,
"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

Curl Example

curl "https://open.debox.pro/openapi/group/is_join?gid=cc0onr82&walletAddress=0x1234567890abcdef1234567890abcdef12345678" \
-H "X-API-KEY: YOUR_APP_KEY"

Query params

  • gid string, required
  • walletAddress string, required (EVM address)

Success response example

{
"code": 200,
"data": true
}

Error response example

{
"error": "Bad Request",
"code": 401,
"message": "Param error"
}

8. POST /openapi/group/admin/dao_member

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)

  • nonce string
  • timestamp string
  • signature string

Signature algorithm: sha1(app_secret + nonce + timestamp).

Request params (Body, JSON)

  • gid string, required, length 1~8
  • page int, optional, if <=0 then treated as 1
  • size int, optional, default 50, max 50

Success response example

{
"code": 200,
"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. GET /openapi/user/info

Curl Example

curl "https://open.debox.pro/openapi/user/info?user_id=u1" \
-H "X-API-KEY: YOUR_APP_KEY"

Query params

  • user_id string, optional
  • address string, optional (EVM address)
  • at least one is required

Success response example

{
"code": 200,
"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"
}

10. GET /openapi/user/is_follow

Curl Example

curl "https://open.debox.pro/openapi/user/is_follow?walletAddress=0x1234567890abcdef1234567890abcdef12345678&followAddress=0xabcdefabcdefabcdefabcdefabcdefabcdefabcd" \
-H "X-API-KEY: YOUR_APP_KEY"

Query params

  • walletAddress string, required (EVM address)
  • followAddress string, required (EVM address)

Success response example

{
"code": 200,
"data": true
}

Error response example

{
"error": "Bad Request",
"code": 401,
"message": "Please input the wallet address correctly"
}

11. GET /openapi/token/info

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_address string, required
  • chain_id int, optional; missing/negative is treated as 0

Success response example

{
"code": 200,
"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"
}

12. GET /openapi/box/info

Curl Example

curl "https://open.debox.pro/openapi/box/info"

Public endpoint, no API key required.

Query params

None.

Success response example

{
"code": 200,
"success": true,
"data": {
"max_supply": "1000000000",
"burned": "...",
"supply": "...",
"locked": "...",
"address": "0x...",
"symbol": "BOX",
"chainId": 1,
"icon": "https://...",
"stake": "..."
}
}