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 }Accounts that are offline 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, newest kept. Default 200, maximum 1000. |
{
"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, if you want to render colours. |
actionBars | The latest action bar text per account, in the same shape. It is 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. It answers the moment a line arrives, so you get chat in real time with about two or three requests a minute when chat is quiet.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, so after Console Client maintenance it starts counting from zero again, and taking the returned cursor keeps you in step.
The feed holds the most recent 10,000 lines across all your accounts. One long poll is enough for all of them: filter by accountId in your own code instead of opening a request per account. If you turned off chat logging in Settings → Behavior, or Console Client staff paused it during an incident, the feed stays empty.
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": "Steve",
"level": "info",
"message": "Connected to play.example.net",
"timestamp": 1790000400000
}
],
"cursor": 880
}Chat and console have separate cursors. Keep one for each.
Check the troubleshooting guide or return to all guides.