Skip to main content
Install the CLI, authenticate with an API v2 key, and list campaigns in your workspace.

Prerequisites

  • Node.js 18 or later.
  • An Instantly workspace with an API v2 key.
1

Install the CLI

Install the package globally with npm:
To run a command without installing the package globally, use npx:
2

Authenticate

Run the interactive login command:
Enter your API key when prompted. The CLI validates the key and stores it in ~/.instantly/config.json.
Keep your API key secure. Never share the CLI configuration file or commit it to source control.
3

Run your first command

List the campaigns in your workspace:
The CLI returns JSON. The --pretty flag formats it for terminal output.

Authenticate scripts and CI/CD workflows

Set INSTANTLY_API_KEY when you need non-interactive authentication:
The CLI resolves credentials in this order:
  1. The --api-key command flag.
  2. The INSTANTLY_API_KEY environment variable.
  3. The key saved by instantly login.

Format command output

Every command returns JSON by default. Use output flags to control what the CLI prints:

Try more commands

The CLI also includes a local MCP server. Run instantly mcp, or use the hosted Instantly MCP server without installing the CLI.

Next steps

API reference

Browse resources, request fields, and response schemas.

View on npm

Review package details and available commands.