SoulFire LogoSoulFire

Execute command

Executes a command string within the specified scope. The command is parsed and executed using the Brigadier command dispatcher. Permission requirements depend on the scope: - Global scope: Requires GLOBAL_COMMAND_EXECUTION permission - Instance scope: Requires INSTANCE_COMMAND_EXECUTION for the instance - Bot scope: Requires INSTANCE_COMMAND_EXECUTION for the parent instance

POST
/v1/commands:execute

Executes a command string within the specified scope. The command is parsed and executed using the Brigadier command dispatcher.

Permission requirements depend on the scope:

  • Global scope: Requires GLOBAL_COMMAND_EXECUTION permission
  • Instance scope: Requires INSTANCE_COMMAND_EXECUTION for the instance
  • Bot scope: Requires INSTANCE_COMMAND_EXECUTION for the parent instance

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

scope.instance.instance_id*string

The unique identifier (UUID) of the instance to scope commands to. Must be a valid UUID string.

Formatuuid
scope.bot.instance_id*string

The unique identifier (UUID) of the instance containing the bot. Must be a valid UUID string.

Formatuuid
scope.bot.bot_id*string

The unique identifier (UUID) of the bot (profile ID) to scope commands to. Must be a valid UUID string matching the bot's account profile ID.

Formatuuid
command*string

The command string to execute. This follows the Brigadier command format, e.g., "help", "move 100 64 200", "say Hello world". Leading/trailing whitespace will be stripped before execution.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://127.0.0.1:38765/v1/commands:execute" \  -H "Content-Type: application/json" \  -d '{    "command": ""  }'
{  "code": 0}

How is this page?