Save the current browser state to a profile
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.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Browser session ID or name
Body
- Option 1
- Option 2
Destination profile for a snapshot of the running browser. Provide either id or name. An id must identify an existing profile. A name overwrites the matching profile in the browser's project, or creates it when no matching profile exists.
Response
Existing profile updated successfully
Browser profile metadata.
Timestamp when the profile was created
Unique identifier for the profile
Timestamp when the profile was last used
Optional, easier-to-reference name for the profile
Timestamp when the profile was last updated