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

# Test webhooks locally

> Forward your organization's webhooks to localhost with the Tolt CLI. No tunnel, no deploy.

`tolt listen` connects to Tolt and forwards your webhooks to a local URL, re-signed with a local secret.

Toltyour orgCLItolt listenYour applocalhost:3000*1*tolt trigger*2*commission.created*3*sign whsec\_Mz9k…*4*POST /api/webhooks/tolt*5*200 OK

**1. Install and log in**

Log in with an API key from **Settings → Integrations → Tolt API**. Pass the platform host with `--api-url`: the CLI still defaults to the older `api.tolt.com` host, and `login` saves the host only when it's passed this way.

```bash theme={"system"}
npm install -g @tolt/cli
tolt --api-url https://platform.tolt.com login
```

**2. Start listening**

```bash theme={"system"}
tolt listen --forward-to http://localhost:3000/api/webhooks/tolt
```

It prints a signing secret. Set it as `TOLT_WEBHOOK_SECRET` locally; your [verify code](/webhooks/verify) stays the same as in production.

**3. Trigger an event**

In a second terminal:

```bash theme={"system"}
tolt trigger commission.created
```

The `listen` terminal shows the delivery and your handler's response status.

Only want some events? Add `--events`:

```bash theme={"system"}
tolt listen \
  --forward-to http://localhost:3000/api/webhooks/tolt \
  --events commission.created,customer.created
```

> [!NOTE]
>
> Forwarding only runs while `tolt listen` is open. Production deliveries still go to the endpoints in your dashboard.


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