JavaScript SDK: swarmhit.lists.leads.add(listId, params)
Upserts the workspace leads from the { profileUrl, ... } objects
you pass and attaches them to this list in one call — you don't
need to create leads separately first. Existing leads are matched
on their LinkedIn identifier and updated with any new fields. With
the email channel, an item with only an email is matched on that
address instead, and with the WhatsApp channel one with only a phone
on that number (see LeadInput).
Max 1000 leads per request.
If the list is a campaign's own list (the campaign's listId), the
leads are also enrolled in that campaign, subject to its exclusion
rules; leads already in the campaign are skipped. enrolled in the
response is how many were enrolled (0 for any other list).
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/lists/string/leads" \ -H "Content-Type: application/json" \ -d '{ "leads": [ { "profileUrl": "https://www.linkedin.com/in/jane-doe", "firstName": "Jane", "lastName": "Doe", "company": "Acme" }, { "profileUrl": "https://www.linkedin.com/in/john-roe", "email": "john@roe.dev" } ] }'{ "data": { "inserted": 0, "skipped": 0, "enrolled": 0 }}Stop a lead in a campaign for good POST
**JavaScript SDK:** [`swarmhit.campaigns.leads.stop(campaignId, leadId)`](/smart-api/sdk/methods#campaigns.leads) Terminally stops the lead's sequence (status becomes `stopped`) so the executor never contacts it again. The lead stays in the campaign with its history intact; use `DELETE /campaigns/{id}/leads/{leadId}` to remove it entirely. Not resumable. No-op on a lead that is already done, failed or replied.
Create a lead list POST
**JavaScript SDK:** [`swarmhit.lists.create(params?)`](/smart-api/sdk/methods#lists)