Developer
WebSocket API
Messages

Messages

Every message, in both directions, is a JSON object with these fields:

FieldTypeDescription
senderstringSet by XSOverlay to your client name. Any value you send is replaced.
targetstringWho receives the message. See Targets.
commandstringThe command to run.
jsonDatastringCommand payload, serialized to a JSON string.
rawDatastringSingle-value payload for commands that take one, such as "true" or a layout slot number.
⚠️

jsonData is a string containing JSON, not a nested object. Serialize the payload before you put it in the message, and parse it again when reading responses.

Message
{
  "sender": "MyApp",
  "target": "xsoverlay",
  "command": "SendNotification",
  "jsonData": "{\"title\":\"Hello\",\"content\":\"From MyApp\",\"timeout\":5}",
  "rawData": null
}

Responses

Commands that return data reply with an Update… command sent to your client name. RequestDateTime, for example, is answered with UpdateDateTime. Each command page lists its response under Response.

Most responses carry their data in jsonData. A few, such as UpdateLayoutModeState and UpdateSteamAvatar, use rawData instead.

Targets

targetDelivered to
"xsoverlay"XSOverlay. Use this for every command.
Another client's nameThat app, letting apps message each other.
"all"Every connected app.
"systemui"XSOverlay's own UI panels.