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

# Profiles

## What are profiles?

Profiles are saved archives of the artifacts produced by a browsing session. Most importantly, they contain the cookies and local storage of a session, which can be used to hydrate future sessions and keep the same authenticated state. You will want to use profiles when your users need to authenticate to a site via a Live View, and you want to save the authenticated state for your agents to use.

## Creating/modifying a profile

You can either create a new profile manually via the UI, or programatically via the API. You can also mix these mechanisms and bootstrap your profile via the UI, but make subsequent changes programatically.

### Via the UI

1. Navigate to the [Profiles page](https://portal.airtop.ai/browser-profiles)
2. Click the "Create new profile" button
3. Enter a name for your profile and keep the "Connect to the profile after creation" checkbox selected
4. Click the "Create Profile" button
5. Once the profile is created, specify a URL and start the session. Once the page has loaded, log into a site and click "Finish"

You're all set! Now you can restore the profile from the API Playground or via the API (as long as you're using an API key in the same organization as the profile).

### Programmatically

First, create a new session. During the session lifetime, if you decide you want to save the profile, you can specify a profile name for the profile to be saved under.

**`NodeJS`**

```typescript NodeJS
const session = await client.sessions.create();
await client.sessions.saveProfileOnTermination(session.data.id, "MY_PROFILE_NAME");
await client.sessions.terminate(session.data.id);
```

**`Python`**

```python Python
session = client.sessions.create()
client.sessions.save_profile_on_termination(
    session_id=session.data.id,
    profile_name="MY_PROFILE_NAME",
)
client.sessions.terminate(session.data.id)
```

> **Note**
>
> Profiles are only saved when the sesssion is terminated. You must remember to call `sessions.terminate` on your session to ensure the profile is saved.

## Restoring an existing profile

You can restore an existing profile by specifying the profile name in the `sessions.create` method.

**`NodeJS`**

```typescript NodeJS
const session = await client.sessions.create({configuration: {profileName: "MY_PROFILE_NAME"}});
```

**`Python`**

```python Python
session = client.sessions.create(configuration=SessionConfig(profile_name="MY_PROFILE_NAME"))
```

## Deleting profiles

You can delete profiles by ID, if you no longer want to retain them.

**`NodeJS`**

```typescript NodeJS
await client.profiles.delete({profileNames: "PROFILE_NAME"});
await client.profiles.delete({profileNames: ["PROFILE_NAME", "ANOTHER_PROFILE_NAME"]});
```

**`Python`**

```python Python
client.profiles.delete(profile_names="PROFILE_NAME")
client.profiles.delete(profile_names=["PROFILE_NAME", "ANOTHER_PROFILE_NAME"])
```

## Security & Privacy

Airtop takes the security and privacy of your data seriously. We **never** share any customer data, including profile data, with any third parties, nor do we use that data for any purpose other than to provide the service to you. All profiles are encrypted at rest using AES-256 encryption. If you have any questions or concerns about data privacy and security, please reach out to us at [support@airtop.ai](mailto:support@airtop.ai).