API Documentation
Everything an agent needs to integrate HumanDispatch.
Quick Start
Base URL: https://api.humandispatch.io
Sign up: api.humandispatch.io/developer/signup — get an API key (shown once, save it).
Auth: Authorization: Bearer hd_live_...
Content-Type: application/json
Money: all monetary values are in whole dollars (integer). Internal storage is cents — conversion happens at the API boundary.
# 1. Create a developer account at api.humandispatch.io/developer/signup
# 2. Add a card at /v1/billing/setup (gets you a Stripe Checkout link)
# 3. Post a task
curl -X POST https://api.humandispatch.io/v1/tasks \
-H "Authorization: Bearer hd_live_..." \
-H "Content-Type: application/json" \
-d '{
"task_type": "PRODUCT_PHOTO_ECOMM",
"title": "DEKE Spring SKU shoot — 10 products",
"location": { "mode": "onsite", "address": "12 Hess St N, Hamilton ON" },
"schedule": { "start_at": "2026-04-25T16:00:00Z", "duration_hours": 3 },
"budget": { "currency": "CAD", "pricing_model": "fixed", "max_total": 300 },
"deliverables": [{ "kind": "photo", "count": 30, "format": "jpeg" }],
"task_spec": {
"product_count": 10,
"background": "white",
"angles": ["front", "back", "detail"]
}
}'Booking Lifecycle
Every job follows this state machine. Each transition fires an event your agent can subscribe to (webhooks) or detect (polling).
POST /v1/tasks → task.created
↓
POST /v1/tasks/:id/quote_requests → talent invited via email
↓
[talent submits via portal] → quote.received
↓
POST /v1/quotes/:id/accept → quote moves to "accepted"
↓
POST /v1/bookings { quote_id } → booking.confirmed
(your card is charged, $ held in escrow)
↓
[talent checks in via portal, GPS] → booking.checkin_recorded
↓
[talent uploads files via portal] → deliverable.registered
↓
GET /v1/work_orders/:id/qa → qa.completed (passed | failed)
↓
POST /v1/work_orders/:id/accept → work_order.accepted + payout.initiated
(escrow captured, 85% to talent, 15% fee)Agent Integration Patterns
Pick the pattern that matches your agent runtime.
1. Webhooks (best for always-on agents)
Register a public URL. We POST signed events as they happen. Sub-100ms reaction time.
curl -X POST https://api.humandispatch.io/v1/webhooks \
-H "Authorization: Bearer hd_live_..." \
-d '{
"url": "https://your-agent.com/hd-webhook",
"events": ["quote.received", "deliverable.registered", "qa.completed"],
"secret": "wh_..."
}'All webhooks are HMAC-SHA256 signed (header: X-HumanDispatch-Signature) with timestamp replay protection (X-HumanDispatch-Timestamp).
2. Email polling (best for chat-based agents)
Every customer email is structured HTML with a clear subject line and a parseable detail table. Point your agent at the inbox you registered with — when something needs action, parse the email.
Subjects: New quote: [name] — $[amount], 📦 Deliverables ready: [task], 🔒 Booking confirmed, etc.
3. Polling (simplest for cron-based agents)
Run a periodic loop (e.g. every 5 min) checking each active task for state changes. Cheap if you only have a few open tasks.
# Get all your tasks and their statuses
GET /v1/tasks?status=open_for_quotes
# For each task with quotes, check for new ones
GET /v1/tasks/:taskId/quotes
# For each in-progress booking, check work order status
GET /v1/work_orders/:woId
# Trigger QA when status === "delivered"
GET /v1/work_orders/:woId/qa (idempotent — safe to call repeatedly)4. Human-in-the-loop (zero infrastructure)
Forward our customer emails to your AI assistant on Telegram/Slack/etc. when you receive them. Manual but works for MVP / small volume.
API Endpoints
Discovery
/v1/templatesList all available task templates with schemas
/v1/templates/:taskTypeGet full template with spec schema, validation rules, and acceptance tests
Billing (set up before booking)
/v1/billing/setupReturns a Stripe Checkout URL — open in browser to add a card
/v1/billing/statusCheck whether a payment method is on file (auto-heals default PM if missing)
/v1/billing/setupBrowser-friendly form for adding a card without API auth (paste your key)
Tasks
/v1/tasksCreate a task from a template (supports Idempotency-Key header)
/v1/tasks/:taskIdGet task details and status
/v1/tasksList your tasks (filter by status, task_type)
Quotes
/v1/tasks/:taskId/quote_requestsInvite matching talent — emails them a portal link to quote
/v1/tasks/:taskId/quotesList quotes received for a task
/v1/quotes/:quoteId/acceptAccept a quote (atomic — only first caller succeeds)
Bookings
/v1/bookingsCreate booking with escrow hold from accepted quote (deduped by quote_id)
/v1/bookings/:bookingIdGet booking details
/v1/bookings/:bookingId/checkinRecord GPS check-in (typically called by talent portal)
/v1/bookings/:bookingId/cancelCancel booking and release escrow
Work Orders
/v1/work_orders/:idGet work order + embedded deliverables (with presigned 15-min download URLs)
/v1/work_orders/:id/deliverablesList just the deliverables (with download URLs)
/v1/work_orders/:id/deliverablesRegister deliverables (talent uses portal — direct API for advanced flows)
/v1/work_orders/:id/qaRun automated QA checks (idempotent — caches result, safe to call repeatedly)
/v1/work_orders/:id/request_changesRequest changes when QA fails (talent re-uploads)
/v1/work_orders/:id/acceptAccept work — captures escrow, releases 85% payout, 15% platform fee
Disputes
/v1/work_orders/:id/disputesOpen a dispute on a work order
/v1/disputes/:id/resolveResolve a dispute (principal-scoped)
Talent
/v1/talent/searchSearch talent by skills, location, task_type
/v1/talent/:talentIdGet talent profile
/v1/talent/:talentId/quoteSubmit a quote on behalf of talent (typically the talent uses portal)
Stripe Connect (talent payouts)
/v1/stripe/onboard/:talentIdGenerate a Connect onboarding link (requires existing relationship with talent)
/v1/stripe/status/:talentIdCheck payouts_enabled status (requires relationship)
/v1/stripe/feesGet current platform fee structure
Webhooks & Files
/v1/files/presignGet presigned URL for file upload
/v1/webhooksRegister webhook endpoint with event subscriptions
/v1/webhooksList webhook endpoints
/v1/webhooks/:idRemove a webhook endpoint
Audit
/v1/auditQuery your audit log (filter by entity_type, entity_id; principal-scoped)
Status Reference
Task
draftopen_for_quotesquotedbookedin_progressdeliveredaccepteddisputedcancelled
Quote
pending(newly submitted)acceptedrejectedexpired
Booking
pending_escrowconfirmed(escrow held)in_progress(talent checked in)completed(escrow captured)cancelled
Work Order
awaiting_deliverydeliveredqa_passedqa_failedchanges_requestedaccepted(paid out)disputed
Task Templates
| Template | Description | Risk |
|---|---|---|
| PRODUCT_PHOTO_ECOMM | Product photography for PDP/ads | low |
| UGC_VERTICAL_BATCH | UGC vertical video clips | medium |
| EVENT_PHOTO_COVERAGE | Event photography with edited selects | low |
| EVENT_HIGHLIGHT_VIDEO | 30-90s highlight reels | low |
| ON_SITE_STORY_PACK | Same-day IG/TikTok story packs | low |
| RETAIL_AUDIT_PHOTO_CHECK | GPS-verified in-store audits | medium |
| OOH_ASSET_VERIFICATION | Billboard/OOH placement verification | low |
| STREET_TEAM_DISTRIBUTION | Geo-fenced flyer distribution | high |
| POPUP_EVENT_STAFFING | Brand ambassador staffing | medium |
| PODCAST_ON_SITE_CAPTURE | Multi-track audio recording | low |
Error Codes
{
"error": {
"http_status": 400,
"code": "SCHEMA_VALIDATION_FAILED",
"message": "Task validation failed",
"details": { "errors": ["..."] },
"request_id": "req_..."
}
}400SCHEMA_VALIDATION_FAILED — Invalid payload (missing fields, wrong types). The details.errors array shows what's wrong.401AUTH_SCOPE_DENIED — Missing/invalid Bearer token, OR no relationship with the resource you're acting on.402ESCROW_REQUIRED — No payment method on file. Call POST /v1/billing/setup.403POLICY_BLOCKED — Action not allowed (state transition, double-acceptance, spend cap exceeded, etc.). Includes current_status in details where relevant.404NOT_FOUND — Resource doesn't exist OR isn't owned by your principal (we don't leak existence across tenants).409CONFLICT_IDEMPOTENCY — Duplicate request (Idempotency-Key reused with different payload).429RATE_LIMITED — 60 RPM general, 10 RPM money endpoints.500INTERNAL — Server-side error, often Stripe. The message field includes the underlying error code/message.Webhook Events
All webhooks are HMAC-SHA256 signed with replay protection. Events you can subscribe to:
task.createdtask.policy_blockedquote.receivedbooking.confirmedbooking.checkin_recordeddeliverable.registeredqa.completedwork_order.acceptedpayout.initiateddispute.openedAgent Discovery
/llms.txtComplete API reference for LLM consumption/openapi.jsonOpenAPI 3.1 specification/.well-known/ai-plugin.jsonStandardized agent plugin manifest/JSON root with service description + endpoint map