> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browsepilot.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Browser Profiles

> Retrieve all browser profiles in your workspace

## GET /api/profiles

Retrieve all browser profiles associated with your workspace. Browser profiles allow you to maintain separate browser identities with unique cookies, settings, and configurations.

### Headers

<ParamField header="x-api-key" type="string" required>
  Your workspace ID from Browsepilot Settings → Advanced
</ParamField>

### Response

Returns an array of browser profile objects.

<ResponseField name="[]" type="array">
  Array of browser profile objects

  <Expandable title="Profile Object">
    <ResponseField name="id" type="string">
      Unique identifier for the browser profile
    </ResponseField>

    <ResponseField name="name" type="string">
      Human-readable name of the profile
    </ResponseField>

    <ResponseField name="workspaceId" type="string">
      ID of the workspace this profile belongs to
    </ResponseField>

    <ResponseField name="description" type="string">
      Optional description of the profile's purpose
    </ResponseField>

    <ResponseField name="settings" type="object">
      Browser configuration settings

      <Expandable title="Settings Object">
        <ResponseField name="userAgent" type="string">
          Custom user agent string
        </ResponseField>

        <ResponseField name="viewport" type="object">
          Browser viewport configuration

          <Expandable title="Viewport Object">
            <ResponseField name="width" type="number">
              Viewport width in pixels
            </ResponseField>

            <ResponseField name="height" type="number">
              Viewport height in pixels
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="proxy" type="string">
          Proxy server configuration (if any)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO timestamp when the profile was created
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ISO timestamp when the profile was last modified
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://browsepilot.ai/api/profiles" \
    -H "x-api-key: your-workspace-id"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://browsepilot.ai/api/profiles", {
    method: "GET",
    headers: {
      "x-api-key": process.env.BROWSEPILOT_API_KEY,
    },
  });

  const profiles = await response.json();
  console.log("Available profiles:", profiles.length);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://browsepilot.ai/api/profiles',
      headers={
          'x-api-key': 'your-workspace-id'
      }
  )

  profiles = response.json()
  print(f"Found {len(profiles)} profiles")
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  [
    {
      "id": "profile_abc123xyz",
      "name": "Personal Browser",
      "workspaceId": "workspace_456def",
      "description": "Profile for personal browsing and social media",
      "settings": {
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
        "viewport": {
          "width": 1920,
          "height": 1080
        },
        "proxy": null
      },
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-20T14:45:00.000Z"
    },
    {
      "id": "profile_def456abc",
      "name": "Work Account",
      "workspaceId": "workspace_456def",
      "description": "Profile for work-related automation",
      "settings": {
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
        "viewport": {
          "width": 1440,
          "height": 900
        },
        "proxy": "http://corporate-proxy:8080"
      },
      "createdAt": "2024-01-10T08:15:00.000Z",
      "updatedAt": "2024-01-18T12:30:00.000Z"
    }
  ]
  ```

  ```json Empty Response theme={null}
  []
  ```

  ```json Error Response theme={null}
  {
    "error": "Unauthorized"
  }
  ```
</ResponseExample>

## Using Profiles in Conversations

Once you have profile IDs, use them when starting conversations:

```javascript theme={null}
// First, get available profiles
const profilesResponse = await fetch("https://browsepilot.ai/api/profiles", {
  headers: { "x-api-key": apiKey },
});
const profiles = await profilesResponse.json();

// Use a specific profile for automation
const workProfile = profiles.find((p) => p.name === "Work Account");

// Start conversation with that profile
const chatResponse = await fetch("https://browsepilot.ai/api/chat", {
  method: "POST",
  headers: {
    "x-api-key": apiKey,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "Check my LinkedIn messages",
    profileId: workProfile.id,
  }),
});
```

<Tip>
  **Profile Benefits:** - **Isolation**: Keep different accounts and cookies
  separate - **Consistency**: Maintain same fingerprint across sessions -
  **Efficiency**: Pre-configured settings reduce setup time - **Organization**:
  Easily manage multiple use cases
</Tip>

## Error Handling

| Status Code | Error                 | Description                              |
| ----------- | --------------------- | ---------------------------------------- |
| `401`       | Unauthorized          | Missing or invalid `x-api-key` header    |
| `404`       | Unauthorized          | Workspace not found for provided API key |
| `500`       | Internal server error | Unexpected server error occurred         |

## Profile Management

Currently, browser profiles must be created through the Browsepilot dashboard. API endpoints for creating and managing profiles programmatically are coming soon.

To create profiles:

1. Open [Browsepilot Dashboard](https://browsepilot.ai)
2. Click the **Manage** button
3. Click **New Profile**
4. Configure settings and save
