From 40ec6b4154926fc5467ab8cbeede22d593822297 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Wed, 31 Dec 2025 18:03:13 -0400 Subject: [PATCH] Fix Lusha API request format for bulk company enrichment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v2 bulk API requires: - Each company object must have an `id` string field - The `requestId` field should not be sent 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- server/src/services/lusha.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/services/lusha.ts b/server/src/services/lusha.ts index 768ed75e2c..ab2180d619 100644 --- a/server/src/services/lusha.ts +++ b/server/src/services/lusha.ts @@ -185,6 +185,7 @@ export class LushaClient { async enrichCompanyByDomain(domain: string): Promise { try { // Use the v2 bulk API with a single company + // Each company needs a unique `id` string to correlate request/response const response = await fetch(`${LUSHA_API_BASE}/bulk/company/v2`, { method: 'POST', headers: { @@ -192,8 +193,7 @@ export class LushaClient { 'Content-Type': 'application/json', }, body: JSON.stringify({ - requestId: `enrich-${domain}-${Date.now()}`, - companies: [{ domain }], + companies: [{ id: '1', domain }], }), });