Browsers

Save the current browser state to a profile

Changed on

Saves the running browser's current user-data state to an existing or new profile without ending the browser session.

Saving restarts the browser. Active CDP and WebDriver connections are closed and must reconnect, and WebDriver clients must create a new session. Open tabs are restored, but pages reload and in-memory page state is lost. The browser is stopped only while its user data is copied; this request returns once the restarted browser accepts CDP connections again and the profile has been uploaded. Caches, Service Worker storage and Google Drive IndexedDB data are left out of the saved profile but kept in the running browser.

This does not attach the destination profile to the browser or change its save_changes setting. Active browsers that already loaded the destination profile keep their in-memory state. Pools with refresh_on_profile_update enabled flush idle sessions and replenish them from the new snapshot; other browsers receive it the next time they load the profile. When saves made with this endpoint to the same profile overlap, the save that started most recently wins, even if an earlier one finishes later. The automatic save at the end of a session whose profile has save_changes enabled is ordered against these saves by when each finishes.

A successful save restarts the browser's inactivity timeout (timeout_seconds). A failed save leaves it unchanged.

Returns 409 when the browser is no longer active, when a pooled browser was released or reacquired after the request was made (browser_lease_changed), or when the browser is briefly unable to accept a save (browser_busy), in which case the request can be retried.

post/browsers/{id_or_name}/profiles

Request

  • Base URL
    https://api.onkernel.com
  • URL
    https://api.onkernel.com/browsers/{id_or_name}/profiles
  • Auth
    HTTP bearer

Path parameters

id_or_namestring required

Browser session ID or name

Request body

OR

Response

Existing profile updated successfully

created_atstring date-time required

Timestamp when the profile was created

idstring required

Unique identifier for the profile

last_used_atstring date-time

Timestamp when the profile was last used

namestring nullable

Optional, easier-to-reference name for the profile

updated_atstring date-time

Timestamp when the profile was last updated

Changes