Skip to content

Task

A Task is an Action waiting on a Worker, with an assignee, a due time, and a place in that Worker’s inbox.

Properties

PropertyTypeRequiredDescription
duedatetimeWhen the Task is due.
priorityintegerIts rank in the inbox, highest first.
recurrencestringThe schedule a recurring duty repeats on.
Inherited from Action: 11 properties
PropertyTypeRequiredDescription
statusstringrequiredOne of pending, done, failed, canceled, or refused.
reasonstringWhy a pending Action waits: queued, running, retrying, awaitingWorker, awaitingInput, awaitingSource, awaitingAction, or awaitingTime.
modestringrequiredHow the caller invoked it: try, send, or do.
byWorkerThe Worker that performed it.
forPartyThe Party it was done on behalf of.
viastringThe Interface or request it arrived through.
onstringThe Action or Event that caused it, such as the failed attempt a retry follows.
thingstringThe record, at the Version the Action was decided against.
inputjsonThe input it was called with.
createdAtdatetimeWhen it was called.
reservedmoneyThe most this Action may cost, held against its Limits from the check until it settles, billed misses included.

Object

JSON
{
  "$id": "https://api.sb/routewise.dev/tasks/task_1",
  "$type": "Task",
  "status": "pending",
  "reason": "queued",
  "mode": "try",
  "by": "worker_1",
  "for": "party_1",
  "via": "API",
  "on": "Invoice.overdue",
  "thing": "invoice_1@v3",
  "input": {},
  "createdAt": "2026-10-22T12:00:00Z",
  "reserved": {
    "amount": 25,
    "currency": "USD"
  },
  "due": "2026-10-22T12:00:00Z",
  "priority": 1,
  "recurrence": "Weekly on Friday"
}

Relationships

  • A Task is assigned to one Worker: the Worker a Task waits on; the Task sits in that Worker’s inbox until it is done. assignedTo, inverse tasks.
  • A Task has one Project: a Project is made of Tasks. project, inverse plans.

Verbs

  1. createCreates a Task.
    POST /{namespace}/tasksdoTask.created
  2. getReturns one Task by id.
    GET /{namespace}/tasks/{id}readNo Event
  3. listReturns Tasks, newest first, one page at a time.
    GET /{namespace}/tasksreadNo Event
  4. updateChanges the given properties of a Task.
    PATCH /{namespace}/tasks/{id}doTask.updated
  5. deleteDeletes a Task; its history is kept.
    DELETE /{namespace}/tasks/{id}doTask.deleted
  6. assignAssign gives a Task to a Worker, human or agent, and places it in that Worker’s worklist.
    POST /{namespace}/tasks/{task}/assigndoTask.assigned
  7. claimClaim takes an offered Task from a shared queue or a handoff and makes the calling Worker its assignee.
    POST /{namespace}/tasks/{task}/claimdoTask.claimed
  8. completeComplete marks a Task done and resumes the Action that waited on it.
    POST /{namespace}/tasks/{task}/completedoTask.completed
  9. delegateDelegate passes a Task to another Role along a declared handoff and keeps its history.
    POST /{namespace}/tasks/{task}/delegatedoTask.delegated
  10. escalateEscalate moves a Task to the Role its current Role escalates to, with the reason attached.
    POST /{namespace}/tasks/{task}/escalatedoTask.escalated
  11. nextNext returns the oldest open Task the calling Worker’s Roles may claim, without claiming it.
    POST /{namespace}/tasks/nextdoTask.offered
  12. returnReturn hands an offered Task back to its sender, unchanged, with the reason the receiver cannot take it.
    POST /{namespace}/tasks/{task}/returndoTask.returned

Permissions

Which Access level may call each Verb. One-way Verbs wait their delay window.

Operationowneradminmemberviewer
Task.createYesYesYesNo
Task.getYesYesYesYes
Task.listYesYesYesYes
Task.updateYesYesYesNo
Task.deleteYesYesYesNo
Task.assignYesYesYesNo
Task.claimYesYesYesNo
Task.completeYesYesYesNo
Task.delegateYesYesYesNo
Task.escalateYesYesYesNo
Task.nextYesYesYesNo
Task.returnYesYesYesNo

Call it

Text
Assign the latest task with a worker.

Example

A parent asks a tutoring marketplace to reschedule. The reply is a Task assigned to the Customer Lead, due in 15 minutes, at the top of its inbox.