# Connect Your Instantly Workspace to Frevana

Connect your Instantly workspace to Frevana by creating a dedicated API key. This guide walks you through choosing the workspace, setting the requested permissions, and making the key available for setup.

## Before You Begin

You'll need an Instantly account, access to the workspace you want to connect, and permission to manage API access.

## Step 1: Choose Your Workspace

Sign in to [Instantly](https://app.instantly.ai/) and select the workspace you'd like to use with Frevana.

> **Note:** If you manage multiple workspaces, create the key in the same workspace you plan to connect.

## Step 2: Open API Settings

Go to **Settings → Integrations** and find the API key section for your workspace. You can also open the [Instantly integrations settings](https://app.instantly.ai/app/settings/integrations) directly.

## Step 3: Create an API Key

Select **Create API Key** and give it a recognizable name, such as `Frevana Integration`.

Under **Scopes**, select the permissions requested for the integration:

```text
leads:all campaigns:all emails:all accounts:all
```

These scopes provide broad access to leads, campaigns, emails, and accounts. Review them before continuing, and use only the permissions appropriate for your workflow. A dedicated key makes future access reviews and rotation easier.

Select **Create** to generate the key.

## Step 4: Copy and Secure the Key

Copy the full API key and store it in a secure password manager or secret store.

> **Warning:** Treat the key like a password. Don't share it in public messages, email, or screenshots.

## Step 5: Make the Key Available

To set the key as an environment variable, replace the placeholder below with the complete key you copied from Instantly. Avoid extra spaces or line breaks.

**macOS / Linux**

```bash
export INSTANTLY_API_KEY="your_instantly_api_key"
```

**Windows PowerShell**

```powershell
setx INSTANTLY_API_KEY "your_instantly_api_key"
```

The `export` command applies to the current shell and processes started from it. On Windows, `setx` applies to new processes, not the current PowerShell session. Make sure Frevana is launched with access to the variable; you may need to restart it.

## Troubleshooting

### `401 Unauthorized`

Check that you've copied the complete key, that it's still active, and that it was created in the intended workspace.

### Can't Find the API Key Section

Confirm that you're signed in to the right Instantly account, have opened **Settings → Integrations**, and have permission to manage integrations.

## Ready to Connect

Once the key is available to Frevana, continue the Instantly integration setup.
