Cmdr bridge

Register a server

Register a game server with the Cmdr bridge, report what it can do and publish its Cmdr command catalogue.

POSThttps://api.bloxlytics.app/v1/bridge/hello
Request
curl -X POST https://api.bloxlytics.app/v1/bridge/hello \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer bxb_…" \
  -H "X-Bloxlytics-Project: <universe id>" \
  -H "X-Bloxlytics-Timestamp: $(date +%s)" \
  -H "X-Bloxlytics-Nonce: $(uuidgen)" \
  -d '{
    "protocol": 1,
    "version": "1.0.0",
    "jobId": "<job id>",
    "placeId": 1234567890,
    "capabilities": ["cmdr", "presence", "executor", "kick"],
    "commands": [
      {
        "name": "give",
        "aliases": ["g"],
        "description": "Give a player coins.",
        "group": "Admin",
        "args": [
          { "name": "player", "type": "player" },
          { "name": "amount", "type": "integer", "optional": true, "default": 100 }
        ],
        "allowed": true
      }
    ],
    "types": [],
    "allowSystemCommands": true,
    "studio": false,
    "tags": { "map": "Forest" }
  }'
Response
{
  "ok": true,
  "enabled": true,
  "pollHoldSeconds": 20,
  "groups": { "developer": ["Moderation"] }
}

The first call a game server makes to the Cmdr bridge. It tells Bloxlytics that the server is online, which bridge features it supports, and which Cmdr commands are registered in it. The response says whether the bridge is turned on for the project and how long polls are held.

After a successful hello, the server starts polling for commands. The Luau bridge waits 3 seconds after starting (so your game can register its Cmdr commands first), then sends hello, and sends it again every 300 seconds while it runs so the command catalogue stays current. If hello fails, it retries after 5 seconds, doubling the wait up to 120 seconds.

All bridge endpoints use the project's bridge key and replay protection. The protocol is described end to end in Cmdr bridge.

#Headers

Content-Typestringheaderrequired

application/json.

Authorizationstringheaderrequired

Bearer followed by the project's bridge key, bxb_…. A write key is refused.

X-Bloxlytics-Projectstringheaderrequired

The experience's Universe ID (game.GameId). Legacy UUID project IDs are also accepted.

X-Bloxlytics-Timestampstringheaderrequired

The current Unix time in seconds. Must be within 120 seconds of Bloxlytics' clock.

X-Bloxlytics-Noncestringheaderrequired

A new random value for this request: 16 to 64 characters from A–Z a–z 0–9 - { }. Never reuse one.

#Body

At most 2 MB.

protocolnumberbodyrequired

The bridge protocol version. Must be 1.

versionstringbodyrequired

The bridge client's version, up to 20 characters, for example 1.0.0.

jobIdstringbodyrequired

The server's id, up to 64 characters: game.JobId, or the studio-… key the analytics SDK uses in Studio. Use the same value as server.jobId in ingest so analytics, presence and commands refer to the same server.

placeIdintegerbodyrequired

game.PlaceId. A whole number, 0 or more.

cmdrVersionstringbody

The Cmdr version, up to 20 characters. Accepted but not currently used.

capabilitiesstring[]bodyrequired

What this server's bridge can do. Up to 10 values from the list below; any other value is refused. A server counts as running the bridge (and can be sent commands) when the list includes cmdr or kick.

Value Meaning
cmdr Runs registered Cmdr commands
kick Can kick a player
warn Can show a player a warning (the game supplied an OnWarn handler)
announce Can show a server-wide announcement (the game supplied an OnAnnounce handler)
presence Reports the players in the server on each poll
executor Can run a command as the issuing team member's own player when they're in the server

The Luau bridge always sends cmdr, presence and executor, adds kick unless AllowKick = false, and adds warn and announce when their handlers are set.

commandsCommand[]bodyrequired

The Cmdr commands registered in this server, up to 500. Send [] if there are none.

Each command is saved for the project by name. A command that's already known has its aliases, description, group, arguments and allowed replaced with what you send. Commands you leave out aren't deleted.

Show Command
namestringbodyrequired

The command name, 1 to 64 characters.

aliasesstring[]bodydefault: []

Other names for the command, up to 20, each up to 64 characters.

descriptionstringbody

Up to 512 characters.

groupstringbody

The command's Cmdr group, up to 64 characters, for example DefaultAdmin. Used for per-role group restrictions.

argsArgument[]bodydefault: []

The command's arguments in order, up to 32. Bloxlytics uses them to check the structure of a command line before queuing it; Cmdr checks the types in the game.

Show Argument
namestringbodyrequired

Up to 64 characters.

typestringbodyrequired

The Cmdr type name, up to 64 characters, for example player, number, integers or string.

descriptionstringbody

Up to 256 characters.

optionalbooleanbody

true when the argument can be left out.

defaultstring | number | booleanbody

The default value, if the argument has one.

dynamicbooleanbody

true when Cmdr defines the argument with a function, so its shape is only known at run time. Dynamic arguments are never treated as required.

allowedbooleanbodydefault: true

Whether this server lets Bloxlytics run the command. The Luau bridge sends false for commands whose group isn't in AllowedGroups. Bloxlytics refuses to queue a command marked false.

typesstring[]bodydefault: []

Custom Cmdr type names, up to 200, each up to 64 characters. Accepted but not currently used.

allowSystemCommandsbooleanbodydefault: true

false when the server only runs Cmdr commands as a verified team member's player who is in this server, never in the system context. Bloxlytics then won't send a Cmdr command to this server unless the issuer is in it. See Cmdr bridge security.

studiobooleanbodydefault: false

true for a Studio session. Studio servers are only sent commands when someone picks them explicitly.

tagsobjectbodydefault: {}

Server tags, such as { "map": "Forest" }: up to 16, names starting with a letter then letters, digits, spaces, _ . - (up to 32 characters), values up to 64 characters. Invalid tags fail the request with 400.

#Response

200 OK. The server is now shown as online (as a bridge server, if capabilities includes cmdr or kick), and its player list is empty until its next poll.

okbooleanrequired

Always true.

enabledbooleanrequired

Whether the bridge is turned on in the project's SDK configuration. When false, don't poll: Bloxlytics won't queue commands for the project. The Luau bridge stops after a hello that returns false.

pollHoldSecondsintegerrequired

How long a poll is held open when there are no commands. Currently 20. Set your HTTP timeout above this.

groupsobjectrequired

The Cmdr groups each Bloxlytics role may run, from the project's SDK configuration: optional keys owner, admin and developer, each a list of group names. {} when no restriction is set. Bloxlytics enforces this itself when someone queues a command; it's returned for information.