JavaScript SDK: swarmhit.campaigns.leads.reschedule(campaignId, leadId, params)
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.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
The lead's id.
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/campaigns/string/leads/string/reschedule" \ -H "Content-Type: application/json" \ -d '{ "waitUntil": "2019-08-24T14:15:22Z" }'{ "data": { "campaignId": "string", "leadId": "string", "linkedinAccountId": "string", "emailAccountId": "string", "emailProvider": "google", "whatsappAccountId": "string", "status": "pending", "stage": "pending", "firstName": "string", "lastName": "string", "headline": "string", "company": "string", "picture": "string", "profileUrl": "string", "publicIdentifier": "string", "email": "string", "openProfile": true, "customVariables": { "property1": "string", "property2": "string" }, "label": "interested", "labelBy": "manual", "labelAt": "2019-08-24T14:15:22Z", "interest": "interested", "interestBy": "manual", "currentStepId": "string", "waitUntil": "2019-08-24T14:15:22Z", "waitReason": "company_limit", "pausedReason": "user", "heldBy": { "campaignId": "string", "campaignName": "string", "senderName": "string" }, "invitationSentAt": "2019-08-24T14:15:22Z", "invitationAccepted": true, "invitationAcceptedAt": "2019-08-24T14:15:22Z", "invitationWithdrawnAt": "2019-08-24T14:15:22Z", "invitationSentWithoutNote": true, "messageSentAt": "2019-08-24T14:15:22Z", "lastReplyAt": "2019-08-24T14:15:22Z", "emailOpenedAt": "2019-08-24T14:15:22Z", "emailClickedAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "error": "string", "createdAt": "2019-08-24T14:15:22Z" }}Remove a lead from a campaign DELETE
**JavaScript SDK:** [`swarmhit.campaigns.leads.remove(campaignId, leadId)`](/sdk/methods#campaigns.leads) Removes the lead from this campaign and from the campaign's own list. The underlying lead is kept.
Resume a paused lead in a campaign POST
**JavaScript SDK:** [`swarmhit.campaigns.leads.resume(campaignId, leadId)`](/sdk/methods#campaigns.leads) Moves a `paused` lead back to `pending`, continuing its sequence from where it left off. A lead waiting on an out-of-office reply (`waitReason: out_of_office`) goes at the campaign's next sending time instead. No-op on any other lead.