Skip to content
SoulFire LogoSoulFire

Interact with block

POST
/v1/instances/{instance_id}/bots/{bot_id}/actions/interact-block

Activates a specific block face without assigning placement semantics to the operation. This covers doors, buttons, beds, redstone controls, and modded interactive blocks.

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string
Formatuuid
bot_id*string
Formatuuid

Request Body

application/json
  1. body
position*

Block to activate. Must be loaded and within interaction reach.

face*string

Face to click.

Value in"BLOCK_FACE_UNSPECIFIED""BLOCK_FACE_DOWN""BLOCK_FACE_UP""BLOCK_FACE_NORTH""BLOCK_FACE_SOUTH""BLOCK_FACE_WEST""BLOCK_FACE_EAST"
hand*soulfire.v1.Hand

Which hand to use for an action. Mirrors Minecraft's main-hand / off-hand distinction.

Value in"HAND_UNSPECIFIED""HAND_MAIN""HAND_OFF"
sneaking?boolean

Temporarily sneaks for this interaction. Useful when activating a block while holding an item whose normal use would take precedence.

Response Body

Successful response.

application/json
  1. response
result*
Example Request
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/actions/interact-block' \
  -H 'Content-Type: application/json' \
  -d '{
  "position": {
    "x": 0,
    "y": 0,
    "z": 0
  },
  "face": "BLOCK_FACE_UNSPECIFIED",
  "hand": "HAND_UNSPECIFIED"
}'
Example Response
{
  "result": {
    "actionId": "4a2794ff-94cb-4bac-8d36-d5fb36c563a0",
    "status": "BOT_ACTION_STATUS_UNSPECIFIED",
    "error": "string"
  }
}

Was this page helpful?