Restart a browser profile
After validating the current user and team ownership, gracefully close the active browser and start it again. url, window_state, and headless behave as they do in the start endpoint. window_state=last restores the window dimensions from the previous session. Inactive profiles return 40903. In a successful response, reused is always false.
Request parameters
Authorization Bearer Token
Include your API Key as a Bearer token in the Authorization request header.
Authorization: Bearer <api-key>Body parameters
requiredapplication/jsonBrowserRestartRequest"env_01JABCDEF1234567890"minLength: 1format: "uri"normal uses the profile window dimensions; last restores the dimensions from the previous session; minimized means minimized; maximized means maximized. Ignored in headless mode.Generated from the schema; not a live response.
{
"env_id": "env_01JABCDEF1234567890"
}Request code examples
JavaScript / TypeScript: Node.js 18+ with fetch; PHP: cURL extension; Go: 1.16+; Java: JDK 11+. Replace the token and example parameter values before running.
curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' -d '{
"env_id": "env_01JABCDEF1234567890"
}' 'http://local.zhongyibrowser.com:39025/api/v1/browsers/restart'Responses
Success: code = 0. Failure: code > 0. Select a status to view its fields and example. Expand objects to inspect nested fields. Optional fields may be omitted.
Browser restart result
Body
application/jsonBrowserRestartSuccessResponseobjectrequiredEndpoint business dataAdditional fields are not allowed.
Additional fields are not allowed.
Generated from the schema; not a live response.
{
"code": 0,
"message": "success",
"data": {
"env_id": "env_01JABCDEF1234567890",
"group": {
"id": "string",
"name": "string"
},
"status": "active",
"headless": true,
"ws_endpoint": "string",
"reused": false
}
}