Skip to content

Create or update a command

POST
/api/v1/commands
curl --request POST \
--url http://localhost:11044/api/v1/commands \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "actionName": "example", "command": "example", "description": "example" }'

Saves a command configuration that maps a slash command to a world action.

The command to save: command is the slash command’s name without the leading slash, actionName the world action it runs, and description optional help text (empty when omitted). Saved as config/commands/<command>.yml in the user’s world, replacing any command of the same name, after which the world’s GOAP specs are redeployed; the action name is not checked against the world here

Media typeapplication/json

A slash command that runs a world action when a chat message starts with it. Listed by GET /commands and saved by POST /commands

object
actionName
required

Name of the world action the command runs. Text typed after the command word becomes the action’s input; with none, the action runs directly if it takes no input and otherwise asks for it with a form

string
command
required

The command word without its leading slash, matched case-insensitively. Also the file name it is saved under, so saving one that exists replaces it

string
description
required

The message shown with that input form. Empty when not set

string

Example generated

{
"actionName": "example",
"command": "example",
"description": "example"
}

Command created/updated

Media type*/*
object
key
additional properties
string