API Reference

Profiles

Browser profiles persist cookies and localStorage across sessions. Use profiles to maintain authenticated state, preferences, and browsing context between separate browser sessions.

What Profiles Store

DataFileDescription
Cookiescookies.jsonAll cookies from the browser session
localStoragelocalStorage.jsonAll localStorage key-value pairs
Metadatameta.jsonProfile ID, name, timestamps

Create Profile

POST/v1/profiles

Create a new browser profile.

Parameters

NameTypeRequiredDefaultDescription
namestringYesHuman-readable name for the profile.

Request Body

{ "name": "My Shopping Account" }

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "My Shopping Account",
  "createdAt": "2026-04-02T12:00:00.000Z",
  "updatedAt": "2026-04-02T12:00:00.000Z"
}
curl -X POST https://api.browsefleet.com/v1/profiles \
  -H "Content-Type: application/json" \
  -H "x-api-key: bf_your_api_key" \
  -d '{ "name": "My Shopping Account" }'

List Profiles

GET/v1/profiles

List all browser profiles.

Response

{
  "profiles": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "My Shopping Account",
      "createdAt": "2026-04-02T12:00:00.000Z",
      "updatedAt": "2026-04-02T12:30:00.000Z"
    }
  ]
}
curl https://api.browsefleet.com/v1/profiles \
  -H "x-api-key: bf_your_api_key"

Get Profile

GET/v1/profiles/:id

Get a single profile by ID.

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "My Shopping Account",
  "createdAt": "2026-04-02T12:00:00.000Z",
  "updatedAt": "2026-04-02T12:30:00.000Z"
}

Delete Profile

DELETE/v1/profiles/:id

Delete a profile and all its stored data (cookies, localStorage).

Response

{ "deleted": true }
curl -X DELETE https://api.browsefleet.com/v1/profiles/PROFILE_ID \
  -H "x-api-key: bf_your_api_key"

Using Profiles with Sessions

Pass the profileId when creating a session. The session loads the profile's saved cookies and localStorage. When the session is released, cookies are automatically saved back to the profile.

// Create a profile
const profile = await bf.profiles.create({ name: 'GitHub Account' });

// First session: log in and let cookies save
const session1 = await bf.sessions.create({
  profileId: profile.id,
  stealth: 'full',
});
// ... log in to GitHub ...
await bf.sessions.release(session1.id);

// Future sessions: already logged in
const session2 = await bf.sessions.create({
  profileId: profile.id,
  stealth: 'full',
});
// session2 has the saved cookies — you're already authenticated