JavaScript SDK: swarmhit.campaigns.leads.remove(campaignId, leadId)
Removes the lead from this campaign and from the campaign's own list. The underlying lead is kept.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
The lead's id.
Response Body
application/json
application/json
application/json
curl -X DELETE "https://example.com/campaigns/string/leads/string"{ "data": { "ok": true }}Pause a lead in a campaign POST
**JavaScript SDK:** [`swarmhit.campaigns.leads.pause(campaignId, leadId)`](/smart-api/sdk/methods#campaigns.leads) Freezes the lead's sequence so the executor stops contacting it (status becomes `paused`). It is resumable: step progress and timers are kept, so resuming continues from where it left off. Applies only to a `pending` or `running` lead; on any other it changes nothing and still returns 200. A manual message does not pause a lead by itself: to pause when replying from the inbox, send it with `sequenceAction: pause`.
Change when a lead out of office goes again POST
**JavaScript SDK:** [`swarmhit.campaigns.leads.reschedule(campaignId, leadId, params)`](/smart-api/sdk/methods#campaigns.leads) For a lead waiting on an out-of-office reply (`waitReason: out_of_office`, see the campaign's `outOfOffice`). A `waitUntil` date holds its next step until the campaign's first sending time from then on; `null` lets it go at the next sending time and ends the wait. Refused with `400` for a lead that isn't waiting out of office, and for a `paused` one: resume it first (it then keeps waiting until its return date), then change the wait.