Bot Commands
Commands are how you change cosmetics, run emotes, and trigger bot behavior over HTTP. They use the same names as in-game bot commands, without a category prefix.
Run a command
POST /bots/{botId}/commands/run accepts:
| Field | Required | Description |
|---|---|---|
command | yes | Command name, 1–255 characters. |
args | no | One string or an array of up to 25 strings. |
locale | no | Reply language. See the route schema for allowed values. |
OAuth2 tokens need the commands.run scope. API tokens and sessions are accepted when the route lists them.
curl -X POST "https://api.fnlb.net/v1/bots/BOT_ID/commands/run" \
-H "Authorization: Bearer FNLB_YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"command":"outfit","args":"Renegade Raider","locale":"en"}'Response
A successful call returns HTTP 200 with a reply object, not the updated party:
{
"nonce": "…",
"botName": "Alpha",
"content": "Set outfit to Renegade Raider.",
"format": 1
}format | Meaning |
|---|---|
0 | Neutral |
1 | Success |
2 | Info |
3 | Warning |
4 | Error |
The bot can answer with format: 4 while HTTP stays 200. Treat content and format as the command outcome. Read party state from the gateway if you need cosmetics on members.
Chat messages
POST /bots/{botId}/chat/messages sends text the bot delivers in party chat. It also requires commands.run. The body has content and optional locale. The same reply shape as command run is returned. Use commands for bot actions. Use chat when you need a custom message string.
Rate limit
This route allows about 250 requests per 10 minutes per IP with an API token, and 1000 with an OAuth2 access token. See Rate limits.
Related
- Bot ids come from GET /bots. See Bots and categories.
- Presets store cosmetic setups you apply through commands, not a separate HTTP action.