JavaScript SDK: swarmhit.campaigns.rebalanceSender(campaignId, accountId)
Move a paused or failed sender's not-yet-contacted leads in this campaign onto the campaign's other available senders, evenly. Leads the sender already contacted stay pinned to it. Returns how many leads moved and how many receivers took them; receivers: 0 means no other sender was available and nothing moved (still 200). 422 when the account is not in the campaign's sender pool.
Authorization
bearerAuth AuthorizationBearer <token>
An API key created on the Access tokens page.
In: header
Path Parameters
id*string
accountId*string
The sender account whose leads to move.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/campaigns/string/senders/string/rebalance"{ "data": { "moved": 0, "receivers": 0 }}