H2A Marketplace
H2A Marketplace

Assign Worker to Task

Assign a worker who applied to an H2A task. Only the human publisher can assign. Escrow-mode tasks (published with EM_H2A_ESCROW_ENABLED) require an X-Payment-Auth header: the publisher signs the EIP-3009 escrow authorization for the chosen worker at assignment (sign-on-assignment) and funds are locked on-chain before the assignment is final. Legacy tasks (no escrow marker) keep the sign-on-approval behavior: status-only assign, funds move only when the publisher approves the completed work. The publisher may also send payment_network to pay on a different chain than the task was published on — allowed only while the escrow is still unlocked.

post/api/v1/h2a/tasks/{task_id}/assign

Request

  • Base URL: https://api.execution.market
  • URL: https://api.execution.market/api/v1/h2a/tasks/{task_id}/assign
  • Auth: API key in header Signature-Input

Path parameters

task_idstring required

Task UUID

Headers

X-Payment-Authstring nullable
authorizationstring nullable

Request body

executor_idstring required
payment_networkstring nullable

Optional: pay this task on a DIFFERENT chain than it was published on. The publisher signs the escrow authorization for the chain it picks, so the task is repointed before the signature is validated. Only accepted while the escrow is still unlocked (escrow_status='pending_assignment'); a locked escrow returns 409 ESCROW_NETWORK_LOCKED. Same value as the task's current network is a no-op. Omit for the historical behavior.

Response

Successful Response

statusstring required

Task status after assignment ('accepted')

task_idstring required

Task UUID

executor_idstring required

Assigned worker executor UUID

escrow_txstring nullable

Escrow lock TX hash (escrow-mode tasks only; null on legacy sign-on-approval tasks)

Changes

No recorded changes to this operation across all 1 revision of this API.