OpenSequence
DocsAPI referenceSDKs and CLIReference
Enrollments

Tasks

List a sender's tasks, complete them with outcomes, cancel them, understand expiry, and build a task inbox.

Edit on GitHub
curl
curl "$SEQ/v1/tasks?sender=u_42&status=open" -H "Authorization: Bearer $KEY"
curl "$SEQ/v1/senders/u_42/tasks" -H "Authorization: Bearer $KEY"          # open tasks by default
curl $SEQ/v1/tasks/tsk_01J9… -H "Authorization: Bearer $KEY"
curl -X POST $SEQ/v1/tasks/tsk_01J9…/complete -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"outcome":"connected","note":"Booked a demo for Thursday."}'
curl -X POST $SEQ/v1/tasks/tsk_01J9…/cancel -H "Authorization: Bearer $KEY"

The task

FieldMeaning
id, kind, title, body, linkwhat to show; title, body and link were rendered when the task was created
dueAt, expiresAton the sender's calendar; after expiresAt the task expires and the step takes no_answer
statusopen, done, expired, cancelled
outcome, note, completedAtset on completion
dialer, dialerPushedAtwhether the number was pushed to the sender's Allo queue, and when
enrollmentId, contactId, senderIdthe links; join with GET /v1/contacts/{id} for the contact card

Listing

GET /v1/tasks (scope read) filters by sender, status, kind, contact and updated_since, paginated. GET /v1/senders/{id}/tasks is the same scoped to one sender, status=open by default. For a per-user inbox, poll the sender's open tasks or mirror task.created and task.expired events into your own table.

Completing

POST /v1/tasks/{id}/complete (scope enroll) with { outcome, note? }. The outcome is free text, 1 to 32 characters, matched against the node's branches_by_outcome; anything else takes completed. The waiting run closes on the outcome, the enrollment advances at once, and the signals the outcome implies are recorded: task_completed always, call_connected when the outcome is in the node's connected_outcomes, connection_accepted for linkedin_connect + accepted, a LinkedIn reply for linkedin_message + replied. Completing a task that is not open returns it unchanged, so a double click is harmless.

Call tasks with dialer: true complete themselves when Allo reports the call; a manual completion that arrives first wins, the later one is ignored. See The task node.

Cancelling and expiry

POST /v1/tasks/{id}/cancel marks an open task cancelled and the step takes no_answer. A task nobody completes expires at expiresAt (due + 7 days unless the node sets expire): the run closes on timeout, the flow takes no_answer, and task.expired is delivered. An exit of the enrollment cancels its open task.

Building a task inbox

  1. Subscribe an endpoint to task.created and task.expired, or poll GET /v1/tasks?updated_since=.
  2. Store the task id, kind, title, body, link, due date, contact and sender; render kind with your own label and icon.
  3. Offer the outcomes the node defines (branches_by_outcome keys plus a generic "done") and call complete; offer "skip" and call cancel.
  4. For calls, let the rep dial from Allo and let auto-completion do the rest; show the note Allo wrote.
  5. Read signal.received with kind: "task_completed" to update the row when a task was completed elsewhere.

On this page