API Documentation

Integrate Verified Workflows's human-in-the-loop review platform into your workflows.

Base URL: https://api.verifiedworkflows.com (production) or http://localhost:8000 (development)

Authentication

All API requests require authentication via Bearer token. Include your API key in the Authorization header.

HTTP Header
Authorization: Bearer vw_live_xxxxxxxxxxxxxxxxxxxxxxxx
Workspace-Id: default

Obtaining API Keys

Navigate to Account Settings to create and manage API keys. Each key can be scoped to specific permissions.

Rate Limits

API requests are rate-limited to 5 requests per 10 seconds per API key. When exceeded, you'll receive a 429 Too Many Requests response with a Retry-After header.

Rate limit headers X-RateLimit-Limit and X-RateLimit-Remaining are included in every response.

Endpoints

POST/v1/tasks
Submit a new task for human review.

Request Body

ParameterTypeDescription
typerequiredstringTask type: audio-audit, text-review, image-review, medical, legal, data-extraction
priorityrequiredstringPriority level: standard ($0.15) or express ($0.20)
titlerequiredstringHuman-readable task title
instructionsrequiredstringDetailed instructions for reviewers
payloadrequiredobjectTask content (URLs, file references, data)
consensus_totalintegerNumber of independent reviewers (default: 1)
required_skillsstring[]Required reviewer certifications
workflow_stepsstring[]Multi-step review workflow labels
cURL
curl -X POST https://api.verifiedworkflows.com/v1/tasks \
  -H "Authorization: Bearer hq_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Workspace-Id: default" \
  -d '{
    "type": "audio-audit",
    "priority": "express",
    "title": "TTS Quality Check - Batch 42",
    "instructions": "Listen to the audio and verify natural pacing...",
    "payload": {"url": "https://storage.example.com/audio_42.wav"},
    "consensus_total": 3,
    "required_skills": ["audio"]
  }'

Response 201 Created

{
  "status": "created",
  "id": "tsk_live_a3f21",
  "queue_position": 1,
  "payout_escrowed": true,
  "cost_usd": 0.20,
  "consensus_votes_gated": 3,
  "task_created_at": "2026-06-09 14:32:00",
  "workspace": "default"
}
GET/v1/tasks/{id}
Get detailed status and results for a specific task.

Path Parameters

ParameterTypeDescription
idrequiredstringTask ID (e.g., tsk_live_a3f21)
{
  "id": "tsk_live_a3f21",
  "type": "audio-audit",
  "title": "TTS Quality Check - Batch 42",
  "status": "Completed",
  "priority": "express",
  "result": {
    "approved": true,
    "pacing_natural": true,
    "quality_score": 96.5
  },
  "created_at": "2026-06-09 14:32:00"
}
GET/v1/tasks
List all tasks in the workspace. Supports filtering by workspace via header.
[
  {
    "id": "tsk_live_a3f21",
    "type": "audio-audit",
    "title": "TTS Quality Check",
    "status": "Completed",
    "priority": "express",
    "created_at": "2026-06-09 14:32:00"
  }
]
POST/v1/tasks/{id}/webhook
Configure a webhook URL for task completion notifications.
ParameterTypeDescription
urlrequiredstringWebhook endpoint URL
eventsstring[]Events to subscribe: task.completed, task.failed, quality.alert
GET/v1/client/dashboard
Get dashboard statistics including task counts, quality scores, and balance.
{
  "tasks_submitted_today": 12,
  "tasks_submitted_week": 87,
  "tasks_submitted_month": 342,
  "tasks_completed": 328,
  "avg_completion_time": 18.4,
  "quality_score": 96.2,
  "balance": 1847.50
}
GET/v1/client/analytics/summary
Get analytics overview with time-series data and quality metrics.
GET/v1/client/billing/usage
Get billing usage statistics and transaction history.

Webhook Events

Webhooks are sent as POST requests with JSON payloads. Each request includes an HMAC signature in the X-Verified-Workflows-Signature header for verification.

Event Types

EventDescription
task.completedTask has been reviewed and completed
task.failedTask failed (expired or error)
task.expiredTask expired due to SLA timeout
quality.alertQuality score dropped below threshold

Webhook Payload

{
  "event": "task.completed",
  "task_id": "tsk_live_a3f21",
  "completed_at": "2026-06-09T14:35:00Z",
  "results": {
    "approved": true,
    "quality_score": 96.5
  }
}

Verifying Signatures

Python
import hmac, hashlib

def verify_signature(payload_body, signature_header, secret):
    timestamp = signature_header.split(',')[0].split('=')[1]
    signature = signature_header.split(',')[1].split('=')[1]
    signed_payload = f"t={timestamp},{payload_body}".encode('utf-8')
    expected = hmac.new(secret.encode(), signed_payload, hashlib.sha256).hexdigest()
    return hmac.compare_digest(signature, expected)

Error Codes

StatusError TypeDescription
400Bad RequestInvalid request parameters
401UnauthorizedMissing or invalid Authorization header
403ForbiddenAPI key not registered or revoked
404Not FoundResource not found
422Validation ErrorRequest body schema validation failed
429Rate LimitedToo many requests, retry after cooldown
500Internal ErrorServer error, contact support

Error Response Format

{
  "type": "https://api.verifiedworkflows.com/errors/validation-failed",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "Request body schema validation failed: ...",
  "instance": "/v1/tasks"
}

Idempotency

Include an Idempotency-Key header to safely retry requests without creating duplicate tasks. Keys are valid for 24 hours.

HTTP Header
Idempotency-Key: unique-request-id-12345

SDKs & Libraries

Official SDKs are available for popular languages:

  • Python: pip install verifiedworkflows
  • Node.js: npm install @verifiedworkflows/sdk
  • Go: go get github.com/verifiedworkflows/go-sdk

Need help? Contact support or view the interactive API reference.