JavaScript SDK: swarmhit.campaigns.get(campaignId)
Returns the campaign including its outreach sequence (the tree of steps).
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/campaigns/string"{ "data": { "id": "string", "name": "string", "status": "draft", "stats": { "total": 0, "done": 0, "failed": 0 }, "aiInterestEnabled": true, "unsubscribe": { "enabled": true, "text": "string" }, "tracking": { "opens": "mailbox", "clicks": "mailbox" }, "linkedinAccountIds": [ "string" ], "emailAccountIds": [ "string" ], "whatsappAccountIds": [ "string" ], "senderIds": [ "string" ], "excludeListIds": [ "string" ], "listId": "string", "excludeOtherCampaigns": true, "excludeOtherSenders": true, "excludeSameSenderOtherCampaigns": true, "companyLimit": { "max": 1, "period": "day", "scope": "campaign" }, "pauseCompanyOnReply": true, "outOfOffice": { "enabled": true, "fallbackDays": 7 }, "matchEmailProvider": true, "schedule": { "startDate": "2019-08-24T14:15:22Z", "endDate": "2019-08-24T14:15:22Z", "timezone": "string", "activeHours": { "from": "string", "to": "string" }, "activeDays": [ 0 ] }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "sequence": { "steps": [ { "id": "string", "type": "if_connected", "parent": "string", "branch": "yes", "config": {}, "nextDelayHours": 0, "branchDelays": { "yes": 0, "no": 0 } } ] } }}Duplicate a campaign POST
**JavaScript SDK:** [`swarmhit.campaigns.duplicate(campaignId)`](/smart-api/sdk/methods#campaigns) Clones the campaign's blueprint — name (suffixed " (copy)"), outreach `sequence`, send `schedule`, sender pool (`linkedinAccountIds`), mailbox pool (`emailAccountIds`), the lead-exclusion rules and the email and AI settings (`unsubscribe`, `tracking`, `aiInterestEnabled`) — into a fresh campaign that starts `paused` with no leads and zeroed stats. Use it to rework a `sequence` that's locked because leads are already in progress, or to spin up a variant of a working campaign.
List campaigns GET
**JavaScript SDK:** [`swarmhit.campaigns.list(params?)`](/smart-api/sdk/methods#campaigns)