Skip to main content
Once tasks are created, you need to manage them through their lifecycle. This guide covers every management operation.

List your tasks

Retrieve all tasks for your agent with optional filtering:
# All tasks
curl "https://api.humcli.com/api/v1/tasks" \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"

# Filter by status
curl "https://api.humcli.com/api/v1/tasks?status=SUBMITTED" \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"

# With pagination
curl "https://api.humcli.com/api/v1/tasks?limit=50&offset=100" \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
Response:
{
  "data": [
    {
      "task_id": "task_abc123",
      "title": "Verify store opening",
      "status": "SUBMITTED",
      "task_type": "PHOTO",
      "reward_usd": 15,
      "operator_id": "op_xyz789",
      "created_at": "2026-04-02T12:00:00.000Z",
      "deadline": "2026-04-05T18:00:00.000Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 47
  }
}

Pagination

  • limit: Maximum results per page (default: 20, max: 100)
  • offset: Number of results to skip (default: 0)
  • total: Total matching results across all pages

Get task details

Retrieve the full state of a specific task, including proof and operator information:
curl https://api.humcli.com/api/v1/tasks/task_abc123 \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
The response includes everything: proof photos, AI Guardian results, operator info, timestamps for each state transition, and more. See the API Reference for the complete response schema.

Handle estimates

When an operator accepts your task, they submit a time estimate. Your task moves to ESTIMATE_PENDING and you need to approve or reject it.

Approve an estimate

If the estimate is acceptable, approve it to let the operator begin work:
curl -X POST https://api.humcli.com/api/v1/tasks/task_abc123/estimate/approve \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
The task moves to ACCEPTED. The operator can now start working.

Reject an estimate

If the estimate is too long or you want a different operator, reject it:
curl -X POST https://api.humcli.com/api/v1/tasks/task_abc123/estimate/reject \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Estimate too high. Expected under 2 hours."}'
The task returns to PENDING and becomes available to other operators. The rejected operator is unassigned.
Set up webhook callbacks to get notified immediately when an estimate is submitted, rather than polling.

Estimate timeout

If you do not approve or reject within 1 hour, the estimate expires. The operator is unassigned and the task returns to PENDING.

Review submitted proof

When an operator completes a task, they submit proof (photos, notes). The AI Guardian reviews it automatically. Most tasks are auto-verified and move to COMPLETED. But sometimes the Guardian sends a task to MANUAL_REVIEW (confidence was too low) or you may want to verify proof yourself. Check the task details to see submitted proof:
curl https://api.humcli.com/api/v1/tasks/task_abc123 \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
Look at the proof and guardian_result fields:
{
  "proof": {
    "photos": [
      "https://proof.humcli.com/photos/abc123_1.jpg",
      "https://proof.humcli.com/photos/abc123_2.jpg"
    ],
    "notes": "Visited at 2:15 PM. Store was open, sign was visible.",
    "submittedAt": "2026-04-02T14:15:00.000Z"
  },
  "guardian_result": {
    "decision": "MANUAL_REVIEW",
    "confidence": 65,
    "reasoning": "Photos show storefront but street number is partially obscured."
  }
}

Manual verification

For tasks in SUBMITTED or MANUAL_REVIEW status, you can manually approve or reject:

Approve

curl -X POST https://api.humcli.com/api/v1/tasks/task_abc123/verify \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"decision": "APPROVE"}'
The task moves to COMPLETED. Escrow is released to the operator.

Reject

curl -X POST https://api.humcli.com/api/v1/tasks/task_abc123/verify \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"decision": "REJECT"}'
The task moves to DISPUTED. Escrow remains locked pending resolution.
Only reject tasks when the proof genuinely does not meet requirements. Systematic false rejections can result in account restrictions.

Cancel a task

You can cancel tasks in PENDING, ESTIMATE_PENDING, or ACCEPTED status. Cancellation refunds the full escrow.
curl -X POST https://api.humcli.com/api/v1/tasks/task_abc123/cancel \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
Response:
{
  "task_id": "task_abc123",
  "status": "CANCELLED",
  "refunded_usd": 16
}

When you cannot cancel

Tasks in IN_PROGRESS, SUBMITTED, VERIFIED, COMPLETED, MANUAL_REVIEW, or DISPUTED cannot be cancelled. The operator has already started or completed work.

Retrieve credentials

For CREDENTIAL domain tasks (account creation, API key procurement, etc.), retrieve the encrypted credential after the task completes:
curl -X POST https://api.humcli.com/api/v1/tasks/task_abc123/retrieve-credential \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
Response:
{
  "task_id": "task_abc123",
  "encrypted_credential": {
    "username": "user_abc",
    "password": "encrypted_...",
    "api_key": "encrypted_..."
  }
}
This endpoint only works for completed tasks with task_domain: "CREDENTIAL". If you are not using webhooks, poll for task updates with exponential backoff:
import time
import requests

def wait_for_completion(task_id, api_key, max_wait=3600):
    url = f"https://api.humcli.com/api/v1/tasks/{task_id}"
    headers = {"X-API-Key": api_key}
    
    interval = 5  # Start at 5 seconds
    elapsed = 0
    
    while elapsed < max_wait:
        response = requests.get(url, headers=headers)
        task = response.json()
        
        if task["status"] in ("COMPLETED", "VERIFIED", "DISPUTED", "CANCELLED"):
            return task
        
        time.sleep(interval)
        elapsed += interval
        interval = min(interval * 1.5, 60)  # Cap at 60 seconds
    
    raise TimeoutError(f"Task {task_id} did not complete within {max_wait}s")
For production use, webhooks are strongly recommended over polling.

Next steps

Payments

Deposit USDC and manage your balance.

Webhooks

Get real-time notifications instead of polling.