Move, pause & resume
Move a live session to a fresh machine, or pause it to save state and stop billing.
A session does not have to live and die on one machine. You can move it while it runs, or pause it and pick it up later.
Move
POST/v1/sessions/:id/move
Moves a running session to a fresh machine in one API call. Open tabs, logins, storage, form values and the files in /workspace come along. Use it when you want the session to continue somewhere new, for example when the machine it is on is not behaving.
curl -X POST https://api.staging.boxline.dev/v1/sessions/$SESSION_ID/move \
-H "x-api-key: $BOXLINE_API_KEY"The response is { session, timings }, where timings breaks the move down into captureMs, acquireMs, restoreMs and totalMs. Connected clients are disconnected during the move; reconnect to the same connectUrl, which now points at the new machine. In the SDK, await session.move() returns the timings.
Pause
POST/v1/sessions/:id/pause
Pausing saves the session’s state, frees the machine and stops billing for running time. It returns the session with status PAUSED. Use it when an agent is waiting on something slow, such as a human approval, and you do not want to pay for an idle machine.
curl -X POST https://api.staging.boxline.dev/v1/sessions/$SESSION_ID/pause \
-H "x-api-key: $BOXLINE_API_KEY"What a pause keeps:
- Browser state: open tabs, cookies, storage and form values.
- Files: the contents of
/workspace, including browser downloads, for every session.
Saved state is free for the first 24 hours. After that it costs $0.05 per GB-month until you resume or release the session.
Resume
POST/v1/sessions/:id/resume
Resuming restores the saved state on a fresh machine, returns the session with status RUNNING and restarts per-second billing. The session gets a full timeout again from the moment it resumes. Resuming counts toward your plan’s concurrent sessions.
curl -X POST https://api.staging.boxline.dev/v1/sessions/$SESSION_ID/resume \
-H "x-api-key: $BOXLINE_API_KEY"You rarely need to call it yourself: connecting to a paused session’s connectUrl, or calling actions, exec or files on it, resumes it automatically.
Pause, release or keep running?
- Keep running while the agent is actively working.
- Pause when you will need this exact session again, with its tabs and files.
- Release when you are done. If you only need the login next time, a context is lighter than a paused session.
These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.