Tasks
Estimate, create, read, and settle tasks — the core loop of the Hannu API.
Tasks are the core of the API. You estimate the work, create it under escrow, then approve, reject, or cancel once proof is in.
/v1/estimate_taskDry-run pricing with zero state change.
Send the task shape you intend to create; get back a price. Nothing is committed.
curl -X POST https://api.hannu.africa/v1/estimate_task \
-H "Authorization: Bearer $HANNU_KEY"/v1/tasksCreate and escrow-lock a task.
Requires an Idempotency-Key, plus type, title, instructions, reward_major, and deadline. Locks escrow and enters safety screening atomically.
{
"data": {
"taskId": "task_8f21",
"escrowLockId": "lock_3c90",
"state": "screening",
"totalChargedMinor": "303750"
}
}/v1/tasksList the org's tasks (newest first, bounded to 50).
/v1/tasks/:idFull task state, reward, and proof status.
/v1/tasks/:id/proofThe AI verification report summary.
/v1/tasks/:id/approveRelease escrow to the Operator.
/v1/tasks/:id/rejectReject proof with a structured reason — opens a dispute, freezes escrow.
Send a structured reason so the dispute has context. Reject is valid only while the task is verifying. The handler reads reason only:
curl -X POST https://api.hannu.africa/v1/tasks/task_8f21/reject \
-H "Authorization: Bearer $HANNU_KEY" \
-H "Idempotency-Key: $(uuidgen)"/v1/tasks/:id/cancelCancel before acceptance and refund escrow.
A task moves through a defined state machine — draft → screening → live → matched → accepted → in_progress → proof_submitted → verifying → approved → paid, with dispute and refund branches. See Task lifecycle.