MASAKA / SDK & API / Session API
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/sessionsCreateGET
/api/sessionsList, page, filter, searchGET
/api/sessions/:idRead statePOST
/api/sessions/:id/stopStop and settleControl and preview
POST
/api/sessions/:id/controlAcquire agent or human capabilityDELETE
/api/sessions/:id/controlRelease human controlPOST
/api/sessions/:id/ticketShort-lived direct previewCommands
POST
/api/sessions/:id/commandsQueue exactly onceGET
/api/commands/:idPoll receipt| Kind | Fields | Result |
|---|---|---|
snapshot | — | Page snapshot, tabs, active_tab |
tabs | — | Real window list and active handle |
tab_switch | handle | Updated active tab |
tab_new | — | New real tab |
tab_close | handle | Remaining real tabs |
navigate | url | Navigation receipt |
drag | x, y, to_x, to_y | Bounded pointer sequence |
click/type/key/scroll | Bounded action data | Action receipt |
Errors
400 | Invalid payload or unsafe destination |
401 / 403 | Missing, expired, or insufficient credential |
409 | State, control, or capacity conflict |
429 | Rate limit; retry safe reads with backoff |
500 | Opaque server failure |