API reference: chat and console
Send messages and commands as your accounts, and follow chat and console output with a long poll.
Send a message or command
POST /chat/send sends one message from one or many accounts. A message that starts with / is a command.
| Field | Type | Detail |
|---|---|---|
accountId | string | One account. Use this or accountIds. |
accountIds | array | Up to 200 account IDs. |
message | string | Required. Up to 256 characters. |
delayMs | number | Optional. Gap between accounts when you send to several, 0 to 60000. Default 100. |
curl -X POST https://dashboard.consoleclient.com/api/v1/chat/send \
-H "Authorization: Bearer $CC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accountIds": ["[email protected]", "[email protected]"], "message": "/home farm", "delayMs": 500}'{ "ok": true }Offline accounts are skipped without an error. Errors: invalid_request when the message or the accounts are missing, message_too_long and too_many_accounts.
Read chat
GET /chat returns chat lines received by your online accounts, oldest first.
| Query | Detail |
|---|---|
since | The cursor from your previous response. Leave it out on the first call. |
wait | Optional long poll in milliseconds, up to 25000. With no new lines the request stays open until a line arrives or the time runs out. |
limit | Optional. The most lines to return, default 200, maximum 1000. When more lines are waiting, only the newest are returned and the cursor moves past the rest. |
{
"messages": [
{
"id": 5012,
"accountId": "[email protected]",
"text": "[Shop] You sold 64 bones for $1,280",
"formatted": "§a[Shop] §fYou sold 64 bones for $1,280",
"timestamp": 1790000451234
}
],
"actionBars": [],
"cursor": 5012
}| Field | Meaning |
|---|---|
text | The line as plain text. |
formatted | The same line with Minecraft § colour codes. |
actionBars | The action bar text each account showed in the last 10 seconds, in the same shape with id 0. A snapshot, not a history. |
cursor | Pass this back as since on your next call. |
Follow chat without missing lines
Start without a cursor
Call
GET /chat?limit=1once and keep thecursor. This skips the backlog, so you only react to new lines.Long poll
Call
GET /chat?since=CURSOR&wait=25000&limit=1000. It answers the moment a line arrives, at two or three requests a minute while chat is quiet, and a busy chat cannot outrun it.Always take the new cursor
Replace your cursor with the one in every response, even when it is smaller than the one you sent. The feed lives in memory and starts counting from zero again after Console Client maintenance.
The feed holds the most recent 10,000 lines across all your accounts. When nothing has read it for 10 minutes, only the newest 500 are kept. One long poll covers all of them: filter by accountId in your code. The feed stays empty while Chat Logging is off in Settings → Behavior, or while Console Client staff have paused it during an incident.
Read the console
GET /console returns the same lines as Chat → Console in the dashboard: connection events, kicks and feature logs. It takes the same since, wait and limit parameters and works with the same cursor loop.
{
"lines": [
{
"id": 880,
"accountId": "[email protected]",
"username": "ConsoleClient",
"level": "info",
"message": "Connected to donutsmp.net",
"timestamp": 1790000400000
}
],
"cursor": 880
}Chat and console have separate cursors. Keep one for each. The console feed holds the most recent 20,000 lines, or the newest 500 when nothing has read it for 10 minutes.
Check the troubleshooting guide or return to all guides.