SoulFire LogoSoulFire

Interact with entity

Right-clicks / interacts with a specific entity by network id. Used for trading with villagers, mounting mobs, etc.

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

Right-clicks / interacts with a specific entity by network id. Used for trading with villagers, mounting mobs, etc.

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

instance_id*string
Formatuuid
bot_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

entityId*integer

Network entity id from NearbyEntity.entity_id.

Formatint32
hand*string

Which hand to interact with.

Value in

  • "HAND_UNSPECIFIED"
  • "HAND_MAIN"
  • "HAND_OFF"
sneaking?boolean

True if the bot is sneaking during the interaction (affects e.g. whether a villager trade menu opens).

connectionEpoch?|

Observation epoch that produced entity_id. When present, the action fails if the bot has reconnected since that observation.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/actions/interact" \  -H "Content-Type: application/json" \  -d '{    "entityId": 0,    "hand": "HAND_UNSPECIFIED"  }'
{  "result": {    "actionId": "4a2794ff-94cb-4bac-8d36-d5fb36c563a0",    "status": "BOT_ACTION_STATUS_UNSPECIFIED",    "error": "string"  }}

How is this page?