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

# Profiles

> Save a session's cookies and browser state under a name. Later sessions on that name start signed in.

A profile is a full browser profile stored under a name you choose. Create a session with `profile: { name, persist: true }`, sign in, stop it: the state is saved. The next session with that name opens signed in. A [browser pool](/docs/sessions/pools) can load a profile into every warm browser; keep `persist` off there, or the browsers overwrite one another.

<CodeGroup>
  ```json Request theme={"dark"}
  { "profile": { "name": "shop-account", "persist": true } }
  ```

  ```typescript TypeScript theme={"dark"}
  // First run: sign in and save.
  const first = await createSession({ profile: { name: "shop-account", persist: true } });
  // … sign in through the browser, then stop the session …

  // Later: the same name, already signed in.
  const next = await createSession({ profile: { name: "shop-account", persist: true } });
  ```

  ```python Python theme={"dark"}
  first = create_session(profile={"name": "shop-account", "persist": True})
  # ... sign in, stop ...
  next_session = create_session(profile={"name": "shop-account", "persist": True})
  ```
</CodeGroup>

| Field     | Type    | Meaning                                                                        |
| --------- | ------- | ------------------------------------------------------------------------------ |
| `name`    | string  | The profile to load. Created on first use.                                     |
| `persist` | boolean | Save when the session ends. Default `false`: read-only, changes are discarded. |

Profiles work on every browser type.

## Listing and deleting

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl https://api.driver.dev/v1/browser/profiles -H "Authorization: Bearer $DRIVER_API_KEY"
  # → { "profiles": [ { "profileId": "…", "name": "shop-account", "createdAt": "…" } ] }

  curl -X DELETE "https://api.driver.dev/v1/browser/profile?profileName=shop-account" \
    -H "Authorization: Bearer $DRIVER_API_KEY"
  ```

  ```typescript TypeScript theme={"dark"}
  const { profiles } = await fetch("https://api.driver.dev/v1/browser/profiles", { headers })
    .then((r) => r.json());
  await fetch("https://api.driver.dev/v1/browser/profile?profileName=shop-account", {
    method: "DELETE",
    headers,
  });
  ```

  ```python Python theme={"dark"}
  profiles = requests.get("https://api.driver.dev/v1/browser/profiles", headers=headers).json()
  requests.delete(
      "https://api.driver.dev/v1/browser/profile", headers=headers, params={"profileName": "shop-account"}
  )
  ```
</CodeGroup>

Delete is idempotent: an unknown name also answers `{ "success": true }`. The list isn't paginated and returns every profile in the workspace, so delete what you no longer need. The dashboard's **Profiles** page shows the same list and can launch a session on a profile so you sign in by hand through the live view.

## Practical notes

* One profile, one session at a time. Two concurrent sessions on the same persisted profile overwrite each other's state when they stop. Nothing refuses the second.
* The profile is written as the session ends. Wait for `GET /v1/browser/session` to report `completed` before starting the next session on the same name.
* Keep the same `country` across runs. A profile that signed in from Germany and comes back from Brazil looks like a stolen session.
* A profile holds everything Chrome's does: cookies, local storage, IndexedDB, service workers. Delete it when the account is no longer needed.
* As in desktop Chrome, cookies without an expiry (session cookies) are dropped when the browser closes. Sites that keep you signed in set persistent cookies, which carry over; a login that only sets a session cookie has to be repeated each run.
* The next session on a profile can run on a different machine. The state travels with the name.
