Configure Instantly local development with hot reload and testing.
Use when setting up a development environment, configuring test workflows,
or establishing a fast iteration cycle with Instantly.
Trigger with phrases like "instantly dev setup", "instantly local development",
"instantly dev environment", "develop with instantly".
Set up a local development workflow for Instantly integrations. Instantly provides a mock server at `` for testing without sending real emails or consuming API limits. This skill covers mock server usage, integration testing, and local webhook development.
Prerequisites
Completed instantly-install-auth setup
Node.js 18+ with TypeScript
A separate Instantly API key for dev/test (recommended)
set -euo pipefail
# Start your webhook server locally
# In terminal 1:
npx tsx src/webhook-server.ts # listens on port 3000
# In terminal 2 — expose with ngrok:
ngrok http 3000
# Register the ngrok URL as a webhook
curl -X POST https://api.instantly.ai/api/v2/webhooks \
-H "Authorization: Bearer $INSTANTLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Local Dev Webhook",
"target_hook_url": "https://abc123.ngrok.io/webhooks/instantly",
"event_type": "all_events"
}'
// src/webhook-server.ts — minimal local webhook receiver
import express from "express";
const app = express();
app.use(express.json());
app.post("/webhooks/instantly", (req, res) => {
console.log("Webhook received:", JSON.stringify(req.body, null, 2));
res.status(200).json({ received: true });
});
app.listen(3000, () => console.log("Webhook server on http://localhost:3000"));
Step 5: Test Webhook Delivery
// After registering the webhook, test it via API
async function testWebhook(webhookId: string) {
await instantly(`/webhooks/${webhookId}/test`, { method: "POST" });
console.log("Test webhook fired — check your local server logs");
}