Execute a slash command
Execute a slash command in the specified room.
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/commands.run | yes | POST |
Argument | Example | Required | Description |
---|---|---|---|
command | unmute | Required | The name of the command to be executed. |
roomId | ByehQjC44FwMeiLbX | Required | The ID of the room. |
params | @user123 | Optional Default: undefined | Parameters of the command if required. |
tmid | Hsj2435g4bvrj4bjh | Optional | The ID of the thread to run the command. |
triggerId | awovufbukuefzuper | Optional | The triggerId generated by the client that allows the command to interact with the UI |
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type: application/json" \
http://localhost:3000/api/v1/commands.run \
-d '{"command":"unmute","roomId":"ByehQjC44FwMeiLbX","params":"@user123", "tmid": "Hsj2435g4bvrj4bjh", "triggerId": "awovufbukuefzuper"}'
{
"success": true
}
Version | Description |
---|---|
3.0.0 | Added triggerId property |
2.0.0 | Added tmid property |
0.60.2 | Added |
Last modified 1yr ago