Skip to content

AIGetActions

GET ai/chat/actions

The catalogue of interface actions: which types exist, how each one is meant to be applied, and what its payload looks like. Filtered by session type, so a client never sees an action that is only meaningful for staff.

Call it once when the chat starts. It saves the interface from keeping the list of action types in two places — and offered tells you which handlers are worth writing now.

Access Control

Allowed: client, manager, admin.

Request

GET request
GET https://{broker_domain}/ai/chat/actions
Authorization: <JWT_TOKEN>
{
  "command": "AIGetActions",
  "extID": "1",
  "data": {}
}
const catalogue = await platform.AIGetActions({});

Parameters

Parameter Type Description
accountLogin int Account context. Required for a client session of an account owner

Response Data

{
  "protocol": 1,
  "enabled": true,
  "maxActions": 3,
  "rows": [
    {
      "type": "platform.theme.change",
      "version": 1,
      "mode": "auto",
      "risk": "none",
      "offered": true,
      "stage": 1,
      "intents": [],
      "requiredContext": [],
      "requiredPayload": ["theme"],
      "userConfirmationRequired": false,
      "label": null,
      "labelKey": null,
      "description": "Switch the interface theme…",
      "payloadSchema": {
        "type": "object",
        "properties": { "theme": { "type": "string", "enum": ["light", "dark", "system"] } },
        "required": ["theme"],
        "additionalProperties": false
      }
    }
  ],
  "count": 26,
  "offered": 12
}
Field Meaning
protocol version of the action envelope itself, not of the catalogue. It grows when the meaning of a field in an action changes, not when a type is added
enabled false means the service does not produce actions at all for this installation
maxActions how many actions one answer can carry
offered (row) whether the assistant can produce this type today. false means the type is part of the protocol but is not being generated yet
stage (row) rollout stage, ordered by risk. Stage 1 changes what the screen looks like; trading arrives in later stages
intents (row) the user intents this action answers — useful when mapping your own analytics
requiredContext (row) what must be known about the session for the action to make sense, e.g. accountLogin
requiredPayload (row) the payload fields the service will insist on
userConfirmationRequired (row) true for everything except auto
payloadSchema JSON Schema of payload, the same one the service validates against

An action type is never renamed after release, so it is safe to use type as a key in a handler map.

Errors

Code Error Description
400 AI_INVALID_DATA A client session of an account owner did not pass accountLogin
403 AI_ACCESS_DENIED The session type may not use the assistant