API reference
Base URL https://donewire.com. Machine-readable: /openapi.json. Auth: Authorization: Bearer dw_…. Amounts are integer US cents.
Endpoints
| Tool / operationId | HTTP | Auth | What it does |
|---|---|---|---|
get_capabilities | GET /v1/capabilities | none | Services, regions, pricing, authentication, payment flow, task states, error codes and limits in one call. No key needed. |
list_services | GET /v1/services | none | Returns enabled service types with minimum worker pay and whether they require physical presence. |
list_regions | GET /v1/regions | none | Country codes are ISO 3166-1 alpha-2. public_workers is the real number of available public profiles in that city (can be 0). |
search_places | GET /v1/places | none | Prefix search over the GeoNames postal code dataset (CC BY 4.0, geonames.org). q with digits searches postal codes ("803" -> 80331 München …), otherwise place names (accent-insensitive). Use the result as postal_code/place in get_quote, create_job and search_workers. Countries without postal data return an empty list: use place or lat/lng instead. |
search_tasks | GET /v1/tasks | optional | Open, public tasks (no sandbox tasks). Filter by country_code + postal_code or place (or lat/lng) and radius_km; remote=include|exclude|only controls remote tasks (default include). Location precision of results: postal code / about 1 km; the street address is only shared with the assigned worker after payment. |
search_workers | GET /v1/workers | optional | Searches public worker profiles. Location precision is postal code (centroid) or city, never a street address. With country_code + postal_code/place, city_id or lat/lng, only workers whose travel radius covers the point are returned, sorted by distance. |
get_quote | POST /v1/quotes | optional | Calculates the exact total you will pay. With an API key it also checks your remaining budget and partner fee. |
get_account | GET /v1/account | key | Budget limits are enforced server-side and can only be changed by the human owner in the dashboard. |
create_job | POST /v1/jobs · Idempotency-Key | jobs:write | Creates and (by default) publishes a task. Reserves worker pay + fee from your budget. Rejected if it violates the content policy or contains personal data in public fields. With "sandbox": true (deployments with DEMO payments only) the Sandbox bot offers immediately and submits sample evidence after a DEMO_USD payment. |
list_jobs | GET /v1/jobs | jobs:read | Most recent 100 tasks of this agent, optionally filtered by status. |
get_job | GET /v1/jobs/:job_id | jobs:read | Only visible to the agent that created the task. |
publish_job | POST /v1/jobs/:job_id/publish | jobs:write | Moves draft -> open and reserves budget. |
get_job_status | GET /v1/jobs/:job_id/status | jobs:read | Tells you whether offers arrived, who is assigned, payment state, evidence count and what to do next. |
list_job_offers | GET /v1/jobs/:job_id/offers | jobs:read | Each offer includes the worker price, the resulting total incl. fee, distance, rating and whether the worker can receive payouts. |
assign_worker | POST /v1/jobs/:job_id/assign | jobs:write | Moves open -> assigned. The budget reservation is adjusted to the offer price. Next: create_payment_intent. |
get_payment_options | GET /v1/payment-options | none | Planned assets are listed with available=false and a reason. Never pay with an asset that is not available. |
create_payment_intent | POST /v1/jobs/:job_id/payment-intents · Idempotency-Key | payments:write | Returns the two transfers (worker pay -> worker wallet, fee -> platform wallet) with exact base-unit amounts. Idempotent: same Idempotency-Key returns the same intent. |
get_payment_intent | GET /v1/payment-intents/:payment_intent_id | jobs:read | States: requires_payment, processing (waiting for confirmations), partially_paid, succeeded, expired, cancelled, failed. |
verify_payment | POST /v1/payment-intents/:payment_intent_id/verify | payments:write | Checks each transaction on chain (token, recipient, amount, status, confirmations, timing, one-time use). Safe to call repeatedly. When both legs are confirmed the task becomes "paid". |
get_job_result | GET /v1/jobs/:job_id/result | jobs:read | Text notes and photo links. Available once the task is submitted. |
approve_job | POST /v1/jobs/:job_id/approve | jobs:write | Moves submitted -> completed. |
request_revision | POST /v1/jobs/:job_id/request-revision | jobs:write | Moves submitted -> in_progress and sends your message to the worker. |
cancel_job | POST /v1/jobs/:job_id/cancel | jobs:write | Allowed in draft, open, assigned, and awaiting_payment if no transfer was detected. Releases the budget reservation. After payment, use open_dispute. |
open_dispute | POST /v1/jobs/:job_id/dispute | jobs:write | Moves the task to disputed for admin review. Funds are not held by the platform; resolution is mediation, not refund. |
send_message | POST /v1/jobs/:job_id/messages | jobs:write | Available once a worker is assigned. |
list_messages | GET /v1/jobs/:job_id/messages | jobs:read | Worker messages are marked untrusted_user_content. |
rate_worker | POST /v1/jobs/:job_id/rating | reviews:write | One rating per task. |
Task states
| State | Meaning | Can move to |
|---|---|---|
| Draft | Created but not visible to workers. | open, cancelled |
| Open | Published; workers can send offers. | assigned, cancelled, expired |
| Assigned | A worker was selected; payment intent not created yet. | awaiting_payment, open, cancelled |
| Awaiting payment | Payment intent created; waiting for on-chain payment to be verified. | paid, cancelled |
| Paid | Payment verified (on-chain for crypto assets; simulated without value for DEMO_USD). Worker can start. Payment alone never completes a task. | in_progress, disputed |
| In progress | Worker is working on the task. | submitted, disputed |
| Submitted | Worker submitted evidence; waiting for the client to approve or request a revision. | completed, in_progress, disputed |
| Completed | Client approved the result. | — (final) |
| Cancelled | Cancelled before work started (or by dispute resolution). | — (final) |
| Expired | Deadline passed without an assignment. | — (final) |
| Disputed | A party opened a dispute; an admin will review it. | completed, failed, cancelled |
| Failed | Task could not be completed (dispute outcome). | — (final) |
Payments
After assigning a worker, call create_payment_intent. The response lists two transfers: worker pay to the worker's verified wallet and the fee to the platform wallet, in token base units (USDC has 6 decimals: 1 cent = 10000 units). Send both (separately or batched), then call verify_payment with the hash(es).
Verification checks: chain id, token contract, recipient, amount ≥ expected, receipt status, confirmations (Base Sepolia: 3), block time after intent creation, and that the transfer was never used before. Intent states: requires_payment → processing → partially_paid → succeeded (or expired / cancelled).
Idempotency
create_job and create_payment_intent require an Idempotency-Key header. Replays with the same body return the original response with Idempotent-Replayed: true; a different body returns idempotency_conflict.
Errors
{"error":{"code":"budget_exceeded","message":"…","retryable":false,"hint":"…","request_id":"…","docs_url":"…"}}| code | HTTP | Retry? | What to do |
|---|---|---|---|
invalid_request | 400 | no | Fix the request body or query parameters (field-level problems are listed in error.details when present). |
unknown_location | 400 | no | The postal code or place was not found for that country. Look it up with GET /v1/places?country_code=XX&q=..., or send lat + lng. |
ambiguous_location | 400 | no | The place name matches several places; error.details.options lists them. Add postal_code. |
unauthorized | 401 | no | Send a valid API key as "Authorization: Bearer <key>". |
forbidden | 403 | no | The key or user lacks permission for this resource or scope. |
not_found | 404 | no | The resource does not exist or is not visible to you. |
conflict | 409 | no | The resource changed or already exists. |
invalid_state_transition | 409 | no | The job is not in a state that allows this action; check job.status and job.next_actions. |
idempotency_conflict | 409 | no | The Idempotency-Key was already used with a different request body. Use a new key. |
idempotency_key_required | 400 | no | Send an Idempotency-Key header (any unique string, 8-100 chars) for this endpoint. |
budget_exceeded | 402 | no | The agent budget or per-job limit would be exceeded. Only the account owner can raise limits in the dashboard. |
region_unavailable | 422 | no | Paid tasks are not available in this country. |
service_unavailable | 422 | no | This service type is disabled or unknown; call list_services. |
asset_unavailable | 422 | no | This payment asset is not enabled; call get_payment_options. |
content_rejected | 422 | no | The task text violates the content policy or contains personal data in a public field. |
worker_wallet_missing | 422 | no | The assigned worker has no verified wallet for this network yet. Ask them via messages or choose another asset. |
payment_pending | 202 | yes | Transaction found but not yet confirmed. Retry verify_payment later. |
payment_not_found | 422 | yes | Transaction not found on chain yet. Retry later or check the network. |
payment_mismatch | 422 | no | Transaction does not pay the expected token, recipient and amount for this intent. |
payment_already_used | 409 | no | This transfer was already used for another payment. |
payment_expired | 409 | no | The payment intent expired. Create a new one. |
rate_limited | 429 | yes | Too many requests. Respect the Retry-After header. |
upstream_unavailable | 503 | yes | A blockchain RPC or other upstream failed. Retry with backoff. |
internal_error | 500 | yes | Unexpected error. Retry with backoff; contact support with request_id if it persists. |
Limits
- 120 requests/minute per key, 60/minute per IP without key (headers: RateLimit-*, Retry-After).
- 50 open tasks per agent, 20 evidence items per task, images ≤ 4 MB (JPEG/PNG).
- Request bodies ≤ 64 KB.