MASAKA / SDK & API / Session API
API reference

Session and
command endpoints.

Base URL: https://masaka-backend.vercel.app/api. JSON is used except for direct preview frames and binary downloads.

Sessions

POST/api/sessionsCreate
GET/api/sessionsList, page, filter, search
GET/api/sessions/:idRead state
POST/api/sessions/:id/stopStop and settle

Control and preview

POST/api/sessions/:id/controlAcquire agent or human capability
DELETE/api/sessions/:id/controlRelease human control
POST/api/sessions/:id/ticketShort-lived direct preview

Commands

POST/api/sessions/:id/commandsQueue exactly once
GET/api/commands/:idPoll receipt
KindFieldsResult
snapshot—Page snapshot, tabs, active_tab
tabs—Real window list and active handle
tab_switchhandleUpdated active tab
tab_new—New real tab
tab_closehandleRemaining real tabs
navigateurlNavigation receipt
dragx, y, to_x, to_yBounded pointer sequence
click/type/key/scrollBounded action dataAction receipt

Errors

400Invalid payload or unsafe destination
401 / 403Missing, expired, or insufficient credential
409State, control, or capacity conflict
429Rate limit; retry safe reads with backoff
500Opaque server failure