20% offevery plan

Black Friday Sale. New purchases, extensions and upgrades all qualify.

Ends in
00days
00hrs
00min
00sec
See plans
API

API reference: movement, tasks, and inventory

Walk an account, aim its head, run pathing and mining tasks, read or click its inventory and open menus, and answer dialogs, signs and books.

Before you start

Every endpoint here works on one online account: /accounts/{id}/.... An account that has not been started answers 404 not_assigned, so connect it first. These are the controls of Control → Movement and Control → Inventory, described in Move accounts and run tasks and Use Chat, Control, and Point of View.

EndpointsPlan
Inventory: read, click, drop, hold, close, drop all, dialogs, signs, books and menu buttonsTier 2
Aim the head: POST /accounts/{id}/lookTier 2
Walk, stop walking, tasks, and reading the head angle: GET /accounts/{id}/lookTier 3

On a lower plan the answer is 403 tier2_required or tier3_required.

Walk

POST /accounts/{id}/move walks the account in a straight line, relative to where it faces. Tier 3.

FieldTypeDetail
directionstringforward, backward, left or right.
blocksnumberDistance, 1 to 1000. A bigger number walks 1000. Use this or seconds.
secondsnumberDuration, 1 to 300. A bigger number walks 300. Wins over blocks when both are sent.
curl -X POST https://dashboard.consoleclient.com/api/v1/accounts/[email protected]/move \
  -H "Authorization: Bearer $CC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"direction": "forward", "blocks": 5}'

POST /accounts/{id}/stop-moving stops the walk early. No body.

Both answer { "ok": true }. A missing or invalid field answers 400 invalid_request.

Aim the head

POST /accounts/{id}/look turns the head to an exact angle. Tier 2.

FieldTypeDetail
yawnumber-180 to 180, the value the F3 screen shows: 0 is south, 90 is west, 180 or -180 is north, -90 is east.
pitchnumber-90 to 90. -90 looks straight up, 0 at the horizon, 90 straight down.

A value outside the range is set to the nearest end.

{ "ok": true, "queued": 1 }

GET /accounts/{id}/look reads the current angle from the account. Tier 3, like the Head Position card in Control → Movement.

{ "connected": true, "yaw": -90, "pitch": 12.5 }

Reading waits for the account. Without an answer within four seconds the result is 504 command_timeout.

Pathing and mining tasks

POST /accounts/{id}/task starts a task that runs until it finishes or you stop it. One task runs per account, and a task ends when the account disconnects. Every task endpoint needs Tier 3.

{
  "type": "goto",
  "params": { "x": 120, "y": 64, "z": -300, "sprint": true, "allowBreak": false },
  "humanize": true
}
TypeParams
gotox, y, z required. sprint (default true), allowBreak (default false, lets it break blocks in the way).
followusername required. distance 1 to 20 blocks, default 3. safe true only takes drops of 3 blocks or less.
wanderradius 4 to 96, default 20. blocks 1 to 64 waypoints, default 8.
circleradius 2 to 40, default 5. direction cw (default) or ccw. Optional centerX, centerY, centerZ. Without them it circles where it stands.
axisaxis north (default), south, east or west. blocks 1 to 2000, default 16.
mineblockName such as iron_ore, or mineAll true. count 1 to 2000, default 16. radius 8 to 96, default 32. noMovement true mines only what is in reach.
stayduration 5 to 3600 seconds, default 60.

humanize defaults to true and makes movement look less mechanical. An unknown type or a missing required param answers 400 invalid_request.

GET /accounts/{id}/task reports the running task.

{
  "active": true,
  "type": "goto",
  "desc": "goto",
  "startedAt": 1790000470000,
  "elapsedMs": 8200,
  "params": { "x": 120, "y": 64, "z": -300, "sprint": true, "allowBreak": false }
}

With no task running the answer is { "active": false }.

POST /accounts/{id}/task/stop stops the task. No body.

Read the inventory

GET /accounts/{id}/inventory reads the inventory live from the account, plus any chest, shop or menu it has open. Every inventory endpoint needs Tier 2.

{
  "inventory": {
    "accountId": "[email protected]",
    "username": "ConsoleClient",
    "edition": "java",
    "selectedHotbarSlot": 0,
    "player": {
      "id": 0,
      "type": "minecraft:inventory",
      "title": "",
      "slotCount": 46,
      "inventoryStart": 9,
      "inventoryEnd": 45,
      "items": [
        {
          "slot": 36,
          "type": 841,
          "name": "diamond_pickaxe",
          "displayName": "Diamond Pickaxe",
          "count": 1,
          "metadata": 0,
          "stackSize": 1,
          "customName": "",
          "lore": [],
          "enchantments": [{ "id": "efficiency", "level": 5 }]
        }
      ],
      "cursor": null
    },
    "container": null,
    "dialog": null
  }
}
FieldMeaning
playerThe account’s own inventory. items lists only filled slots. cursor is the item held on the mouse cursor, if any.
containerThe open chest, shop or server menu in the same shape, with its title, or null. While a container is open, its slots come first and the player’s slots start at inventoryStart.
dialogAn open server dialog (Minecraft 1.21.6 and newer), or null.
selectedHotbarSlotThe held hotbar position, 0 to 8.
signThe sign the server opened for editing: its position (x, y, z), the side (front), its lines and seq. Otherwise null. See POST /accounts/{id}/inventory/text below.

Errors: 409 not_connected when the account is offline, 504 timeout when it did not answer in time, 404 not_assigned or account_missing when it has not been started.

Click, drop, hold, and close

Each of these answers with the fresh inventory in the shape above, so you read the result of your click straight from the response.

EndpointBodyWhat it does
POST /accounts/{id}/inventory/clickslot, mouseButton, mode, optional playerOnlyClicks a slot in the open container, or in the player inventory when nothing is open. playerOnly true always targets the player inventory.
POST /accounts/{id}/inventory/dropslot, optional dropAllDrops one item from the slot, or the whole stack with dropAll true.
POST /accounts/{id}/inventory/holdslotSelects a hotbar slot: 0 to 8, or the inventory numbering 36 to 44.
POST /accounts/{id}/inventory/closenoneCloses the open container or menu.
POST /accounts/{id}/inventory/drop-alloptional includeArmor, dropDelay, itemIdCloses any open menu and drops the whole inventory, or only the stacks of itemId such as cobblestone. includeArmor true drops armor and the off hand too. dropDelay waits 0 to 1000 milliseconds between drops. The call waits up to 15 seconds: past that you get 504 timeout while the drops go on.
Click fieldValues
slotThe slot number from items, 0 to 500, or -999 for a click outside the window, which drops what the cursor holds.
mouseButton0 left, 1 right. With mode 2 the hotbar key, 0 to 8, or 40 for the off hand.
modeMinecraft’s click mode: 0 normal click, 1 shift click, 2 number key swap, 3 middle click, 4 drop, 5 drag, 6 double click. For a shop or menu button use 0.
slotsMode 5 only: up to 128 slot numbers to drag over. mouseButton 0 spreads the cursor stack evenly, 1 puts one item in each slot.
alltrue with mode 1, right after a shift click: moves every matching stack from the same part of the window, like a shift double click in the game.
curl -X POST https://dashboard.consoleclient.com/api/v1/accounts/[email protected]/inventory/click \
  -H "Authorization: Bearer $CC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slot": 13, "mouseButton": 0, "mode": 0}'
ErrorHTTPMeaning
invalid_request400A field is missing or out of range.
The account’s reason400A slot, button or mode the account refuses answers with its reason as the code, for example Invalid inventory slot or Hotbar slot must be 0-8 or 36-44.
container_open409The click needs the player inventory, but a menu is open. Close it first.
unsupported_click500A Bedrock account cannot do that drag or double click.
not_connected, timeout, not_assigned409, 504, 404As for reading the inventory.

Answer server dialogs

POST /accounts/{id}/inventory/dialog clicks a button of the open server dialog (Java 1.21.6 and newer) or Bedrock form, fills one of its fields, or closes it. Read it first: it is dialog in the inventory answer, with its buttons and its fields in inputs.

BodyWhat it does
{ "op": "click", "button": 2 }Clicks the second button in buttons, counting from 1.
{ "op": "click", "label": "Accept" }Clicks the first button whose text contains this, ignoring case. Up to 120 characters.
{ "op": "input", "key": "amount", "value": "64" }Fills the field with that key. Name it by label instead (the first field whose label contains the text), or by its position in input, counting from 1.
{ "op": "close" }Closes the dialog. Without one open it does nothing.

Filling a field sends nothing yet: click the dialog’s button afterwards, as a player would. value is always a string of up to 1024 characters: the text for a text field (cut to the field’s length), on or off for a switch, an option’s id or text for a choice, a number for a slider. Every call answers with the fresh inventory, so you see the next dialog at once.

ErrorHTTPMeaning
no_dialog_open409No dialog is open.
dialog_button_missing, dialog_input_missing409The dialog has no such button or field.
dialog_input_invalid409The field does not take that value, such as a choice it does not have.
invalid_request400An unknown op, or no button or field named.

Write signs, rename items and write books

POST /accounts/{id}/inventory/text types text where the game asks for it. Java accounts only.

BodyWhat it does
{ "op": "sign", "lines": ["", "Shop", "", ""] }Writes the sign the server opened for editing, up to 4 lines. Add seq from the inventory’s sign to be sure it is still that sign. Answers { "ok": true, "sent": true } once it is written.
{ "op": "rename", "name": "Farm Sword" }Types the new name in the open anvil, up to 50 characters, fewer before Minecraft 1.20.2. Answers with the fresh inventory: then take the item out with a click.
{ "op": "book-read" }Opens the book and quill the account holds and answers book: its hand, slot, pages, and the limits for the account’s version in maxPages, maxChars and maxTitle.
{ "op": "book", "pages": ["Page one"], "title": "Notes" }Writes the held book and quill, up to 100 pages of 1024 characters. A title of up to 15 characters signs it, which cannot be undone. "hand": "off" writes the book in the off hand. Answers { "ok": true, "sent": true }.
ErrorHTTPMeaning
no_sign_open, sign_changed409No sign is open for editing, or it is a different one now.
no_anvil_open, no_book409No anvil is open, or the account holds no book and quill.
unsupported_version, unsupported_edition409Books need Java 1.13 or newer. Bedrock accounts cannot use this endpoint.
text_too_long, invalid_text, invalid_title400The text is too long for this Minecraft version, or not valid.
invalid_request400An unknown op, or text over the limits above.

Press menu buttons and pick trades

POST /accounts/{id}/inventory/screen presses what a slot click cannot reach in the open menu, and answers with the fresh inventory.

BodyWhat it does
{ "op": "trade", "index": 0 }Picks a villager trade, counting from 0.
{ "op": "button", "button": 3 }Presses a button of an enchanting table, stonecutter, loom or lectern, 0 to 127.
{ "op": "beacon", "primary": 1, "secondary": 10 }Picks the beacon’s effects.
{ "op": "slot", "slot": 4, "enabled": false }Switches a crafter slot off or on, 0 to 8.
ErrorHTTPMeaning
no_window_open409No menu is open.
screen_mismatch, screen_unsupported409The open menu is a different kind, or this version or edition cannot do it.
invalid_button, invalid_trade, invalid_effect, invalid_slot400The number does not fit the open menu.
invalid_request400An unknown op, or a number out of range: index, primary and secondary go from 0 to 255.
Need a hand?

Check the troubleshooting guide or return to all guides.