VocalDocscontracts 1.65.0

Claim a human task

POST /v1/human-tasks/{human_task_id}/claim

PropertyValue
Operationclaim_human_task
GroupHuman tasks
Scopeprocesses:write
Route classcontrol
IdempotencyIdempotency-Key accepted: a retry with the same key replays the first answer
AuditAudited processes.human_task.claim (mutation)
Released in1.62.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Claims an open task for the calling Member, its assignee, and answers it claimed (1.62.0); a claim the Member already holds is answered as it stands. A task another Member claimed, or one that is not open, is human_task_conflict (HumanTaskConflictReason); an API key or a Member who is not the assignee is forbidden (assignee_required).

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the processes:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/human-tasks/htk_.../claim" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Parameters

NameInTypeRequiredDescription
human_task_idpathHumanTaskIdyesThe id of a human task: htk_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
idempotency-keyheaderstringnoA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Responses

StatusContent typeShapeError codes
200application/jsonHumanTask
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeprocess_not_active, human_task_conflict, idempotency_in_progress, idempotency_key_reused
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is HumanTask.

FieldTypeRequiredDescription
assigneeHumanTaskAssigneeyes
claimed_atTimestamp or nullyes
claimed_byMemberId or nullyes
completionHumanTaskCompletion or nullyes
created_atTimestampyes
due_atTimestamp or nullyesWhen the node takes timeout and the task expires; null when unbounded.
environmentEnvironmentyes
escalate_atTimestamp or nullyesWhen human_task.overdue is written if the task is still open or claimed.
formmap of WorkflowFieldyesTyped fields, with an outcome enum.
idHumanTaskIdyes
node_idWorkflowNodeIdyes
object"human_task"yes
organization_idOrganizationIdyes
process_idProcessInstanceIdyes
statusHumanTaskStatusyes
step_idProcessStepIdyes
titlestring or nullyesRendered from the node's template. Content; null unless the read names include=content.
updated_atTimestampyes
workflow_idWorkflowIdyes
workflow_versionintegeryes