Authentication
All endpoints require organization admin authentication viaAuthorization: Bearer <token> header.
List Gateway Sessions
GET /api/v1/gateways/sessions List all active sessions for gateways associated with a board.Query Parameters
Filter sessions by board ID
Response
Array of session objects from the gateway runtime
The gateway’s main agent session (if present)
Example Request
Example Response
Get Gateway Session
GET /api/v1/gateways/sessions/ Fetch details of a specific gateway session.Path Parameters
Session identifier (e.g.,
agent:mc-{uuid}:main)Query Parameters
Board context for session lookup
Response
Session details from the gateway runtime
Example Request
Get Session History
GET /api/v1/gateways/sessions//history Fetch the conversation history for a gateway session.Path Parameters
Session identifier
Query Parameters
Board context for session lookup
Response
Array of conversation messages from the sessionEach message typically includes:
role- “user”, “assistant”, or “system”content- Message texttimestamp- When the message was created
Example Request
Example Response
Send Session Message
POST /api/v1/gateways/sessions//message Send a message into a specific gateway session.Path Parameters
Session identifier
Query Parameters
Board context for session lookup
Request Body
Message text to send to the agent
Response
Returns a success indicator:Example Request
Gateway Status
GET /api/v1/gateways/status Check gateway connectivity and session health.Query Parameters
Board ID to resolve gateway
Direct gateway URL to check
Gateway authentication token
Device pairing mode
TLS validation mode
Response
Whether the gateway is reachable
Gateway WebSocket URL
Number of active sessions
Array of active session objects
Gateway main session details
Error message if main session lookup failed
Connection error message if gateway is unreachable
Example Request
Example Response (Success)
Example Response (Error)
Gateway Commands
GET /api/v1/gateways/commands Returns the supported gateway protocol methods and events.Response
Gateway RPC protocol version
Array of supported RPC method names
Array of supported event types
Example Response
Use Cases
Monitoring Active Agents
List all sessions to see which agents are currently active:Debugging Agent Behavior
Review session history to understand agent decisions:Direct Agent Communication
Send urgent messages directly to agent sessions:Health Checks
Verify gateway connectivity before operations:Session ID Format
Gateway sessions follow this naming convention:- Agent sessions:
agent:{agent-key}:main - Main agent:
agent:main:main - MC agents:
agent:mc-{uuid}:main
agent:mc-c91361ef-6d85-439c-82e1-8f388a302e6a:mainagent:main:mainagent:cfo:main(manually configured agent)