Quick Start with SDK
example.js
import w3do from '@w3do/sdk';
const client = new w3do.Client({
apiKey: process.env.W3DO_API_KEY,
webhookUrl: 'https://your-app.com/webhooks/w3do' // Optional
});
// Create a task for real-world execution
const task = await client.tasks.create({
title: "Verify store inventory",
description: "Check product availability at Main St location",
payout: 25.00,
location: {
lat: 40.7128,
lng: -74.0060,
address: "123 Main St, New York, NY"
},
requiredSkills: ["retail", "inventory"],
metadata: {
storeId: "NYC-001",
products: ["SKU-123", "SKU-456"]
}
});
// Get all your tasks
const myTasks = await client.tasks.list({
status: 'open', // open, in_progress, completed, etc.
limit: 50,
offset: 0
});
// Request update from executor
await client.tasks.requestUpdate(task.id, {
message: "Please provide photos of the shelf display"
});
Quick Start with cURL
terminal
curl -X POST https://api.w3do.ai/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Verify store inventory",
"description": "Check product availability",
"payout": 25.00,
"location": {
"lat": 40.7128,
"lng": -74.0060,
"address": "123 Main St, New York, NY"
},
"requiredSkills": ["retail", "inventory"]
}'
API Reference
GET
/api/v1/tasks
Query Parameters:
status
Filter by status: open, in_progress, pending_approval, completed, disputed, cancelledlimit
Number of results (default: 20, max: 100)offset
Pagination offset (default: 0)skills
Filter by required skills (comma-separated)location
Filter by location (lat,lng,radius in km)Response:
{
"tasks": [
{
"id": "task_abc123",
"title": "Verify store inventory",
"description": "Check product availability at Main St location",
"status": "in_progress",
"payout": 25.00,
"location": {
"lat": 40.7128,
"lng": -74.0060,
"address": "123 Main St, New York, NY"
},
"requiredSkills": ["retail", "inventory"],
"createdAt": "2024-01-15T10:00:00Z",
"acceptedAt": "2024-01-15T10:15:00Z",
"executor": {
"id": "exec_xyz789",
"name": "John Smith",
"rating": 4.8,
"completedTasks": 156
}
}
],
"total": 156,
"hasMore": true
}
POST
/api/v1/tasks
Request Body:
{
"title": "Property inspection", // Required
"description": "Full inspection with photos", // Required
"payout": 75.00, // Required (min: 5.00)
"location": { // Required
"lat": 52.5200,
"lng": 13.4050,
"address": "Alexanderplatz 1, Berlin"
},
"requiredSkills": ["real-estate", "photography"], // Optional
"deadline": "2024-01-20T18:00:00Z", // Optional
"metadata": { // Optional - your custom data
"propertyId": "PROP-123",
"clientName": "ACME Corp"
}
}
Response:
{
"id": "task_def456",
"status": "open",
"createdAt": "2024-01-15T12:00:00Z",
"estimatedAcceptanceTime": "15 minutes"
}
POST
/api/v1/tasks/:id/request-update
Request Body:
{
"message": "Please provide photos of the shelf display",
"urgent": false,
"requestType": "photo" // photo, info, eta, other
}
Response:
{
"success": true,
"notificationSent": true,
"executor": {
"id": "exec_xyz789",
"notifiedAt": "2024-01-15T10:30:00Z"
}
}
GET/api/v1/tasks/:id
Get task details
PUT/api/v1/tasks/:id
Update task details
DELETE/api/v1/tasks/:id
Cancel a task
GET/api/v1/tasks/:id/submission
Get submission details
POST/api/v1/tasks/:id/approve
Approve submission & release payment
POST/api/v1/tasks/:id/dispute
Dispute submission
SDKs & Libraries
🟨
Node.js / JavaScript
npm install @w3do/sdk
🐍
Python
pip install w3do
🐹
Go
go get github.com/w3do/go-sdk