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

# saveProfile

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

[Source: node-sdk/src/session.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/session.ts)

Save the session's current browser state (cookies, localStorage, sessionStorage) into a
profile, without stopping the session.

Pass `profile_id` to overwrite an existing profile or `name` to create a new one. With
neither, the state is saved into the profile the session was started with. The session's
start-time profile settings are not changed, so a session started with `persist: true`
still saves again when it stops.

```typescript theme={null}
Session.saveProfile(options?: SaveProfileOptions): Promise<ProfileResponse>;
```

## Parameters

<ParamField body="options" type={"SaveProfileOptions"}>
  Default:

  ```typescript theme={null}
  {}
  ```
</ParamField>

## Returns

```typescript theme={null}
Promise<ProfileResponse>
```

## Example

```typescript theme={null}
const profile = await session.saveProfile({ name: 'github' });
// later: client.Session({ profile: { id: profile.profile_id } })
```

## Related types

* [ProfileResponse](/typescript-sdk-reference/types/profileresponse)
* [SaveProfileOptions](/typescript-sdk-reference/types/saveprofileoptions)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.