API referenceCall tasks
POST
/call-tasks/{id}/skip

JavaScript SDK: swarmhit.callTasks.skip(callTaskId)

Skip the call: the lead moves on to its next step at once, without one. An unknown id is a 400 with code: warning-call-task-not-found, and a task that is no longer pending a 400 with code: warning-call-task-decided. A task whose lead already left the step on its own is closed, and returns a 400 with code: warning-call-task-stale. A task decided elsewhere at the same moment (in the app, or by another call) is a 400 with code: warning-call-task-raced: the first decision stands.

Authorization

bearerAuth
AuthorizationBearer <token>

An API key created on the Access tokens page.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/call-tasks/string/skip"
{  "data": {    "id": "string",    "status": "pending",    "lead": {      "id": "string",      "name": "string",      "profileUrl": "string",      "phone": "string",      "email": "string"    },    "campaign": {      "id": "string",      "name": "string"    },    "stepId": "string",    "instructions": "string",    "dueAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "outcome": "reached",    "note": "string",    "decidedAt": "2019-08-24T14:15:22Z",    "closedReason": "string"  }}

List call tasks GET

**JavaScript SDK:** [`swarmhit.callTasks.list(params?)`](/smart-api/sdk/methods#callTasks) The call tasks campaigns' `call` steps made for the team, newest first. Defaults to status `pending` (waiting for a call); pass `status=all` for every status. A task stays `pending` until someone logs the call (`done`), skips it (`skipped`) or stops the lead's sequence from it (`stopped`), or until it runs out at `dueAt` (`expired`), and the lead then moves on. It is `closed` when the lead left the step on its own: a reply, a pause, the campaign paused or deleted, or the lead removed (`closedReason` says which). `call_task.pending` fires when a task is made.

Stop the lead's sequence POST

**JavaScript SDK:** [`swarmhit.callTasks.stop(callTaskId, params?)`](/smart-api/sdk/methods#callTasks) Stop the lead's sequence from the task, for example when the call showed they are not interested: the lead ends with status `stopped` (and `lead.status_changed` fires). An optional outcome and note record the call on the task. A lead whose sequence can no longer be stopped is a 400 with `code: warning-call-task-stop-failed`, and the task stays `pending`. An unknown id is a 400 with `code: warning-call-task-not-found`, and a task that is no longer `pending` a 400 with `code: warning-call-task-decided`. A task whose lead already left the step on its own is closed, and returns a 400 with `code: warning-call-task-stale`. A task decided elsewhere at the same moment (in the app, or by another call) is a 400 with `code: warning-call-task-raced`: the first decision stands.