> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.flashid.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.flashid.app/_mcp/server.

# Open browser

POST http://127.0.0.1:58931/api/browsers/open
Content-Type: application/json

Launch a profile. The request resolves **once the browser has finished launching**; a failed launch returns an error.

**Errors:** `2003 MISSING_PARAM`, `3004 BROWSER_IN_USE`, `3001 BROWSER_OPEN_FAILED`.

**Body parameters**

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | `string` | Yes | Profile UUID to open. |

Reference: https://docs.flashid.app/flash-id-local-api/browsers/open-browser

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/browsers/open:
    post:
      operationId: open-browser
      summary: Open browser
      description: >-
        Launch a profile. The request resolves **once the browser has finished
        launching**; a failed launch returns an error.


        **Errors:** `2003 MISSING_PARAM`, `3004 BROWSER_IN_USE`, `3001
        BROWSER_OPEN_FAILED`.


        **Body parameters**


        | Field | Type | Required | Description |

        |---|---|---|---|

        | `id` | `string` | Yes | Profile UUID to open. |
      tags:
        - subpackage_browsers
      parameters:
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Browsers_Open browser_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
servers:
  - url: http://127.0.0.1:58931
    description: http://127.0.0.1:58931
components:
  schemas:
    ApiBrowsersOpenPostResponsesContentApplicationJsonSchemaDataWs:
      type: object
      properties:
        selenium:
          type: string
        puppeteer:
          type: string
      required:
        - selenium
        - puppeteer
      title: ApiBrowsersOpenPostResponsesContentApplicationJsonSchemaDataWs
    ApiBrowsersOpenPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: string
        ws:
          $ref: >-
            #/components/schemas/ApiBrowsersOpenPostResponsesContentApplicationJsonSchemaDataWs
        debug_port:
          type: integer
      required:
        - id
        - ws
        - debug_port
      title: ApiBrowsersOpenPostResponsesContentApplicationJsonSchemaData
    Browsers_Open browser_Response_200:
      type: object
      properties:
        code:
          type: integer
        data:
          $ref: >-
            #/components/schemas/ApiBrowsersOpenPostResponsesContentApplicationJsonSchemaData
        success:
          type: boolean
      required:
        - code
        - data
        - success
      title: Browsers_Open browser_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

```

## Examples



**Request**

```json
{
  "id": "{{profileId}}"
}
```

**Response**

```json
{
  "code": 0,
  "data": {
    "id": "{{profileId}}",
    "ws": {
      "selenium": "127.0.0.1:9222",
      "puppeteer": "ws://127.0.0.1:9222/devtools/browser/xxxxxxxx"
    },
    "debug_port": 9222
  },
  "success": true
}
```

**SDK Code**

```python Browsers_Open browser_example
import requests

url = "http://127.0.0.1:58931/api/browsers/open"

payload = { "id": "{{profileId}}" }
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Browsers_Open browser_example
const url = 'http://127.0.0.1:58931/api/browsers/open';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"id":"{{profileId}}"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Browsers_Open browser_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:58931/api/browsers/open"

	payload := strings.NewReader("{\n  \"id\": \"{{profileId}}\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Browsers_Open browser_example
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:58931/api/browsers/open")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"id\": \"{{profileId}}\"\n}"

response = http.request(request)
puts response.read_body
```

```java Browsers_Open browser_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://127.0.0.1:58931/api/browsers/open")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"{{profileId}}\"\n}")
  .asString();
```

```php Browsers_Open browser_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://127.0.0.1:58931/api/browsers/open', [
  'body' => '{
  "id": "{{profileId}}"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Browsers_Open browser_example
using RestSharp;

var client = new RestClient("http://127.0.0.1:58931/api/browsers/open");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"{{profileId}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Browsers_Open browser_example
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["id": "{{profileId}}"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:58931/api/browsers/open")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```