{"openapi":"3.1.0","info":{"title":"Floop API","description":"Two-sided marketplace for hiring people for physical tasks. Supports both human users (session auth) and AI agent operators (API key auth). No OAuth 2.0 flow is supported in this release; agents without credentials should use POST /v1/tasks/propose or MCP propose_task, then continue with Bearer API keys after human claim.","version":"1.0.0","contact":{"name":"Floop","url":"https://floop.ing"}},"servers":[{"url":"https://api.floop.ing/v1","description":"Production"},{"url":"http://localhost:8080/v1","description":"Local API"}],"externalDocs":{"description":"Agent guide, MCP docs, pricing, and machine-readable llms.txt entrypoints: https://floop.ing/for-agents, https://floop.ing/docs/mcp, https://floop.ing/pricing.md, https://floop.ing/llms.txt.","url":"https://floop.ing/for-agents"},"tags":[{"name":"Health","description":"Health check endpoint"},{"name":"Tasks","description":"Create, search, and manage tasks"},{"name":"Workers","description":"Worker profiles, availability, and search"},{"name":"Reviews","description":"Submit and view reviews"},{"name":"Disputes","description":"File and resolve task disputes"},{"name":"Payments","description":"Wallet setup, Stripe Connect, payment history"},{"name":"Webhooks","description":"Register HTTPS endpoints for outbound signed POSTs on task and wallet events; list deliveries and retry failures. Overview: https://floop.ing/docs (Agent → Webhooks). MCP resource: guide://webhooks."},{"name":"Operators","description":"API key management and operator profiles"},{"name":"Usage","description":"API request logs and usage summaries"},{"name":"Admin","description":"Moderation, trust scores, and account actions"},{"name":"Geo","description":"Neighborhoods and location helpers"},{"name":"Agents","description":"Agent bootstrap and registration"},{"name":"Cold-start","description":"Unauthenticated agent task proposal and claim flow"},{"name":"Notifications","description":"In-app notifications and delivery preferences"},{"name":"Feedback","description":"Ideas, bugs, upvotes, and comments"},{"name":"Legal","description":"Terms and policy documents"},{"name":"Services","description":"Configurable service catalog"},{"name":"Uploads","description":"Media upload URLs"},{"name":"Users","description":"User profile and preferences"},{"name":"Intake","description":"Inbound webhooks and intake"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key for operators/agents. Keys start with `fl_live_` or `fl_test_`. OAuth is not advertised; use the no-key claim flow or a Bearer API key."},"sessionAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Session token for human web users. Passed as `Bearer <session-token>` in the Authorization header."}}},"paths":{"/health":{"get":{"operationId":"getHealth","tags":["Health"],"summary":"Health check","description":"Returns 200 when the API is reachable.","responses":{"200":{"description":"API is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok"}},"required":["status"]}}}}}}},"/health/deep":{"get":{"operationId":"getHealthDeep","tags":["Health"],"summary":"Deep health check with dependency probes","description":"Checks DB and Stripe reachability. Returns 503 if any required dependency is down. Stripe results are cached for 30s.","responses":{}}},"/v1/webhooks/stripe":{"post":{"operationId":"postV1WebhooksStripe","tags":["Payments"],"summary":"Stripe webhook receiver","description":"Receives Stripe webhook events. Authenticated via Stripe signature header, not API keys. Handles payment_intent, transfer, account, and charge events.","responses":{"200":{"description":"Event processed","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid signature","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/webhooks/telnyx/inbound-sms":{"post":{"operationId":"postV1WebhooksTelnyxInboundSms","tags":["Intake"],"summary":"Telnyx inbound SMS webhook","description":"Receives Telnyx message events. Verified via ed25519 signature. Captures inbound SMS to intake_message for the concierge flow. Non-inbound events are acknowledged but not persisted.","responses":{"200":{"description":"Event processed","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"},"duplicate":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid signature","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"500":{"description":"Webhook not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/webhooks/resend/inbound":{"post":{"operationId":"postV1WebhooksResendInbound","tags":["Messages"],"summary":"Resend inbound email webhook","description":"Receives inbound `email.received` events from Resend for task-thread reply-by-email. Verified via Svix-style signature headers. Parses the `Reply-To`-encoded thread id, authorizes the sender, and posts the body into the thread as a `task_message`.","responses":{"200":{"description":"Event processed","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"},"duplicate":{"type":"boolean"}},"required":["received"]}}}},"400":{"description":"Invalid signature","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"500":{"description":"Webhook not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/agents/register":{"post":{"operationId":"postV1AgentsRegister","tags":["Agents"],"summary":"Register an AI agent via claim code","description":"Called by an AI agent (no auth). Exchanges a claim code for a new agent account + API key. The code must be unclaimed and unexpired.","responses":{"201":{"description":"Agent registered","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"apiKey":{"type":"object","properties":{"key":{"type":"string"},"keyPrefix":{"type":"string"}},"required":["key","keyPrefix"]},"claimUrl":{"type":"string"}},"required":["agent","apiKey","claimUrl"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/tasks/propose":{"post":{"operationId":"postV1TasksPropose","tags":["Cold-start"],"summary":"Propose a task for a human to claim (unauthenticated)","description":"Called by an AI agent with no existing Floop account. Creates a placeholder agent user, parked API key, and pending task in one transaction, optionally emails the requester, and returns humanClaimUrl. requesterEmail is optional — the human can enter their email on the claim page. This is the supported delegated-access path while OAuth 2.0 is not available.","responses":{}}},"/v1/operators/me/keys":{"post":{"operationId":"postV1OperatorsMeKeys","tags":["Operators"],"summary":"Create API key","description":"Generate a new API key. The raw key is returned only once at creation. Store it securely — it cannot be retrieved again.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"keySuffix":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"rateLimitPerMinute":{"type":"number"},"isActive":{"type":"boolean"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"key":{"type":"string"}},"required":["id","name","keyPrefix","keySuffix","scopes","rateLimitPerMinute","isActive","lastUsedAt","expiresAt","createdAt","key"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"get":{"operationId":"getV1OperatorsMeKeys","tags":["Operators"],"summary":"List API keys","description":"Returns all API keys for the current operator. Only key prefixes are shown.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"API key list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"keySuffix":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"rateLimitPerMinute":{"type":"number"},"isActive":{"type":"boolean"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","name","keyPrefix","keySuffix","scopes","rateLimitPerMinute","isActive","lastUsedAt","expiresAt","createdAt"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/operators/me/keys/rotate-self":{"post":{"operationId":"postV1OperatorsMeKeysRotateSelf","tags":["Operators"],"summary":"Rotate the caller's API key","description":"Mint a fresh API key for the agent currently authenticated by this request's Bearer token. The existing key enters a short grace period and is then deactivated. The new key is returned only once.","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Key rotated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"keyPrefix":{"type":"string"},"keySuffix":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string"},"previousKeyId":{"type":"string"},"previousKeyGraceUntil":{"type":"string"}},"required":["id","key","keyPrefix","keySuffix","expiresAt","previousKeyId","previousKeyGraceUntil"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/operators/me/keys/{keyId}":{"delete":{"operationId":"deleteV1OperatorsMeKeysByKeyId","tags":["Operators"],"summary":"Revoke API key","description":"Deactivate an API key. The key can no longer be used for authentication.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Key revoked","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"revoked":{"type":"boolean"}},"required":["id","revoked"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"keyId","required":true}]}},"/v1/operators/me":{"get":{"operationId":"getV1OperatorsMe","tags":["Operators"],"summary":"Get operator profile","description":"Returns the current operator's profile info and active key count.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Operator profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"userType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"activeKeyCount":{"type":"number"}},"required":["id","name","email","userType","createdAt","activeKeyCount"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/operators/me/agents":{"post":{"operationId":"postV1OperatorsMeAgents","tags":["Agents"],"summary":"Create agent","description":"Create a new AI agent linked to your account. Returns the agent profile and a one-time API key.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Agent created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","name","createdAt"]},"apiKey":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"keyPrefix":{"type":"string"}},"required":["id","key","keyPrefix"]}},"required":["agent","apiKey"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"get":{"operationId":"getV1OperatorsMeAgents","tags":["Agents"],"summary":"List agents","description":"Returns all agents you own, with task counts and spending stats.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Agent list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"taskCount":{"type":"number"},"totalSpentCents":{"type":"number"},"lastActiveAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastActiveIp":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeKeyCount":{"type":"number"},"spendingLimitCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"activeKeyExpiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","createdAt","taskCount","totalSpentCents","lastActiveAt","lastActiveIp","activeKeyCount","spendingLimitCents","activeKeyExpiresAt"]}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/operators/me/agents/{agentId}":{"patch":{"operationId":"patchV1OperatorsMeAgentsByAgentId","tags":["Agents"],"summary":"Update agent","description":"Update an agent's name or per-agent spending cap. Any field omitted is left unchanged. Pass `spendingLimitCents: null` to clear the cap.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Agent updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"spendingLimitCents":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","spendingLimitCents"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}]},"delete":{"operationId":"deleteV1OperatorsMeAgentsByAgentId","tags":["Agents"],"summary":"Delete agent","description":"Delete an agent and revoke all its API keys.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Agent deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","deleted"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}]}},"/v1/operators/me/agents/{agentId}/keys":{"post":{"operationId":"postV1OperatorsMeAgentsByAgentIdKeys","tags":["Agents"],"summary":"Rotate agent API key","description":"Revoke all existing keys for this agent and generate a new one. The new key is returned only once.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"New key generated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"keyPrefix":{"type":"string"}},"required":["id","key","keyPrefix"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}]}},"/v1/operators/me/agents/{agentId}/tasks":{"get":{"operationId":"getV1OperatorsMeAgentsByAgentIdTasks","tags":["Agents"],"summary":"List agent tasks","description":"Returns tasks created by a specific agent you own.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Agent tasks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}]}},"/v1/operators/me/agents/{agentId}/usage":{"get":{"operationId":"getV1OperatorsMeAgentsByAgentIdUsage","tags":["Agents"],"summary":"Agent API usage","description":"Returns API request stats for a specific agent you own.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Usage stats","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalRequests":{"type":"number"},"errorCount":{"type":"number"},"avgLatencyMs":{"type":"number"},"last24hRequests":{"type":"number"}},"required":["totalRequests","errorCount","avgLatencyMs","last24hRequests"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}]}},"/v1/operators/me/agents/{agentId}/spending":{"get":{"operationId":"getV1OperatorsMeAgentsByAgentIdSpending","tags":["Agents"],"summary":"Agent spending","description":"Returns spending breakdown for a specific agent you own.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Spending stats","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totalChargedCents":{"type":"number"},"activeTaskCount":{"type":"number"},"completedTaskCount":{"type":"number"}},"required":["totalChargedCents","activeTaskCount","completedTaskCount"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"agentId","required":true}]}},"/v1/operators/me/agents/claim-code":{"post":{"operationId":"postV1OperatorsMeAgentsClaimCode","tags":["Agents"],"summary":"Create agent claim code","description":"Mints a short-lived code. Paste the returned `pasteSnippet` into an AI agent — the agent then calls POST /v1/agents/register with the code to bind itself to your account.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Claim code created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"code":{"type":"string"},"expiresAt":{"type":"string"},"pasteSnippet":{"type":"string"}},"required":["code","expiresAt","pasteSnippet"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/operators/me/agents/claim-code/{code}":{"get":{"operationId":"getV1OperatorsMeAgentsClaimCodeByCode","tags":["Agents"],"summary":"Check agent claim code status","description":"Returns `waiting` until an agent registers with the code, `claimed` with the new agent's info after it does, or `expired` past the TTL.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Claim code status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["waiting","claimed","expired"]},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["status"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"code","required":true}]}},"/v1/workers":{"post":{"operationId":"postV1Workers","tags":["Workers"],"summary":"Create worker profile","description":"Create a worker profile for the current human user. Only one profile per user.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Worker profile created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"averageRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedTasks":{"type":"number"},"verificationTier":{"type":"number"},"isAvailable":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","userId","headline","skills","photos","averageRating","completedTasks","verificationTier","isAvailable","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"get":{"operationId":"getV1Workers","tags":["Workers"],"summary":"Search workers","description":"Search workers by location (geo query with match scoring) or list with cursor pagination.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Worker list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"averageRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedTasks":{"type":"number"},"verificationTier":{"type":"number"},"isAvailable":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","userId","headline","skills","photos","averageRating","completedTasks","verificationTier","isAvailable","createdAt"],"additionalProperties":{}}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["data"]}}}}}}},"/v1/workers/me":{"get":{"operationId":"getV1WorkersMe","tags":["Workers"],"summary":"Get my worker profile","description":"Return the current user's worker profile, or { data: null } if none exists.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Worker profile or null","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"averageRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedTasks":{"type":"number"},"verificationTier":{"type":"number"},"isAvailable":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","userId","headline","skills","photos","averageRating","completedTasks","verificationTier","isAvailable","createdAt"],"additionalProperties":{}},{"type":"null"}]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"patch":{"operationId":"patchV1WorkersMe","tags":["Workers"],"summary":"Update my worker profile","description":"Update the current user's worker profile.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Worker updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"averageRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedTasks":{"type":"number"},"verificationTier":{"type":"number"},"isAvailable":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","userId","headline","skills","photos","averageRating","completedTasks","verificationTier","isAvailable","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/workers/me/listing":{"post":{"operationId":"postV1WorkersMeListing","tags":["Workers"],"summary":"Toggle worker listing visibility","description":"Flip the caller's worker.isListed flag. Listing (isListed=true) is rejected with 400 PROFILE_INCOMPLETE when display name, bio/headline, skills, rate, or location are missing; with 400 ID_VERIFICATION_REQUIRED when Stripe Identity is not verified; and with 400 STRIPE_ONBOARDING_REQUIRED when Stripe Connect charges/payouts are not enabled. Unlisting is always allowed.","security":[{"sessionAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"Listing state","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"isListed":{"type":"boolean"}},"required":["isListed"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/workers/me/verify":{"post":{"operationId":"postV1WorkersMeVerify","tags":["Workers"],"summary":"Initiate ID verification (Stripe Identity)","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Verification session","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"verificationUrl":{"type":"string"},"sessionId":{"type":"string"},"alreadyVerified":{"type":"boolean"}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/workers/me/verify/status":{"get":{"operationId":"getV1WorkersMeVerifyStatus","tags":["Workers"],"summary":"Get ID verification status","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Verification status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["not_started","pending","verified","failed"]},"idVerified":{"type":"boolean"},"lastVerifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","idVerified","lastVerifiedAt"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/workers/{id}":{"get":{"operationId":"getV1WorkersById","tags":["Workers"],"summary":"Get worker profile","description":"Retrieve a worker profile by ID, including availability schedule.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Worker profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"averageRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedTasks":{"type":"number"},"verificationTier":{"type":"number"},"isAvailable":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","userId","headline","skills","photos","averageRating","completedTasks","verificationTier","isAvailable","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"patch":{"operationId":"patchV1WorkersById","tags":["Workers"],"summary":"Update worker profile","description":"Update bio, headline, skills, rates, or location. Only the profile owner can update.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Worker updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"averageRating":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedTasks":{"type":"number"},"verificationTier":{"type":"number"},"isAvailable":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","userId","headline","skills","photos","averageRating","completedTasks","verificationTier","isAvailable","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/availability":{"get":{"operationId":"getV1WorkersByIdAvailability","tags":["Workers"],"summary":"List availability windows","description":"Return availability windows for a worker. Defaults to current + future windows. Pass ?from= and/or ?to= ISO timestamps to query an arbitrary range.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Window list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"post":{"operationId":"postV1WorkersByIdAvailability","tags":["Workers"],"summary":"Schedule an availability window","description":"Create a scheduled future availability window with absolute start/end timestamps.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Window created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/availability/online":{"post":{"operationId":"postV1WorkersByIdAvailabilityOnline","tags":["Workers"],"summary":"Go online","description":"Starts a rolling availability window beginning now. Ends any existing online_toggle window first.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Online","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/availability/offline":{"post":{"operationId":"postV1WorkersByIdAvailabilityOffline","tags":["Workers"],"summary":"Go offline","description":"Ends the active online_toggle window. No effect on scheduled windows.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Offline","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/availability/{windowId}":{"patch":{"operationId":"patchV1WorkersByIdAvailabilityByWindowId","tags":["Workers"],"summary":"Update availability window","description":"Adjust startsAt, endsAt, and/or note on an existing scheduled availability window. online_toggle windows cannot be patched.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Window updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"windowId","required":true}]},"delete":{"operationId":"deleteV1WorkersByIdAvailabilityByWindowId","tags":["Workers"],"summary":"Delete availability window","security":[{"sessionAuth":[]}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"windowId","required":true}]}},"/v1/workers/{id}/availability/series/{seriesId}":{"delete":{"operationId":"deleteV1WorkersByIdAvailabilitySeriesBySeriesId","tags":["Workers"],"summary":"Delete a recurring availability series","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Count of deleted rows","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"number"}},"required":["deleted"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"seriesId","required":true}]},"patch":{"operationId":"patchV1WorkersByIdAvailabilitySeriesBySeriesId","tags":["Workers"],"summary":"Update a recurring availability series","description":"Applies note changes to all instances of the series whose startsAt is >= now.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Count of updated rows","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"updated":{"type":"number"}},"required":["updated"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"seriesId","required":true}]}},"/v1/workers/{id}/reviews":{"get":{"operationId":"getV1WorkersByIdReviews","tags":["Workers"],"summary":"Get worker reviews","description":"Returns revealed reviews for a worker, ordered by most recent.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Review list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks":{"post":{"operationId":"postV1Tasks","tags":["Tasks"],"summary":"Create a task","description":"Create a new task with a Bearer API key or human session. Agent requesters are charged immediately; human requesters are authorized when a worker accepts. Include Idempotency-Key for safe retries. If the human has not issued a key yet, use POST /v1/tasks/propose first.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Task created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"402":{"description":"Payment failed or not configured","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"get":{"operationId":"getV1Tasks","tags":["Tasks"],"summary":"List or search tasks","description":"Search tasks by location (geo query) or filter by status/requester. Returns cursor-paginated results.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Paginated task list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["data","nextCursor","hasMore"]}}}}}}},"/v1/tasks/{id}":{"get":{"operationId":"getV1TasksById","tags":["Tasks"],"summary":"Get task detail","description":"Retrieve a single task by ID, including requester and worker info.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Task detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"patch":{"operationId":"patchV1TasksById","tags":["Tasks"],"summary":"Update a task","description":"Update a task that is in draft or posted status. Only the task owner can update.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Task updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"deleteV1TasksById","tags":["Tasks"],"summary":"Cancel a task","description":"Cancel a task. Voids the payment authorization (humans) or refunds the charge (agents).","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Task cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/release-worker":{"post":{"operationId":"postV1TasksByIdReleaseWorker","tags":["Tasks"],"summary":"Release assigned worker","description":"Release the currently assigned worker from an accepted task and return the task to posted so another worker can accept it.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Worker released","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/confirm":{"post":{"operationId":"postV1TasksByIdConfirm","tags":["Tasks"],"summary":"Confirm a pending task","description":"Owner confirms a task that is awaiting confirmation. Charges the card on file and transitions the task to posted.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Task confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"402":{"description":"Payment failed or spending cap exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/reject":{"post":{"operationId":"postV1TasksByIdReject","tags":["Tasks"],"summary":"Reject a pending task","description":"Owner rejects a task that is awaiting confirmation. Cancels the task without any charge.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Task rejected","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/accept":{"post":{"operationId":"postV1TasksByIdAccept","tags":["Tasks"],"summary":"Accept a task","description":"Worker accepts a posted task. Requires ID verification, Stripe onboarding, and available capacity. For human requesters, payment is authorized at this point.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Task accepted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"402":{"description":"Payment authorization failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"412":{"description":"Stripe account not ready","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/checkin":{"post":{"operationId":"postV1TasksByIdCheckin","tags":["Tasks"],"summary":"Worker check-in","description":"Worker checks in at the task location to start work. Geo-anomaly detection (impossible travel) is applied.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Checked in","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/proof":{"post":{"operationId":"postV1TasksByIdProof","tags":["Tasks"],"summary":"Submit proof of completion","description":"Worker submits proof media (photos/video) and location. GPS spoofing and boundary-pushing detection is applied.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Proof submitted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/approve":{"post":{"operationId":"postV1TasksByIdApprove","tags":["Tasks"],"summary":"Approve task completion","description":"Requester approves the submitted proof. Captures the payment (humans) and transfers funds to the worker.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Task approved and payment released","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/matches":{"get":{"operationId":"getV1TasksByIdMatches","tags":["Tasks"],"summary":"Get matched workers","description":"Returns up to 20 workers ranked by match score (proximity, rating, completed tasks, verification tier).","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Matched workers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"average_rating":{"anyOf":[{"type":"string"},{"type":"null"}]},"completed_tasks":{"type":"number"},"distance_meters":{"type":"number"},"match_score":{"type":"number"}},"required":["id","headline","average_rating","completed_tasks","distance_meters","match_score"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/action-items/worker":{"get":{"operationId":"getV1TasksActionItemsWorker","tags":["Tasks"],"summary":"Worker action items","description":"Returns tasks needing the current worker's attention: accepted/in-progress tasks with a deadline within 24h or already overdue, plus any applications where the requester has picked the worker and is waiting for them to confirm.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Action items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"number"},"dueSoon":{"type":"array","items":{}},"awaitingConfirmation":{"type":"array","items":{}},"serviceRequests":{"type":"array","items":{}}},"required":["count","dueSoon","awaitingConfirmation","serviceRequests"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/tasks/action-items/requester":{"get":{"operationId":"getV1TasksActionItemsRequester","tags":["Tasks"],"summary":"Requester action items","description":"Returns tasks needing the current requester's attention: application tasks with pending applicants, application tasks with `applications_close_at` within 24h and no selection, and proof-submitted tasks awaiting approval.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Action items","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"number"},"hasApplicants":{"type":"array","items":{}},"closingSoon":{"type":"array","items":{}},"awaitingApproval":{"type":"array","items":{}}},"required":["count","hasApplicants","closingSoon","awaitingApproval"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/tasks/{id}/applications/me":{"get":{"operationId":"getV1TasksByIdApplicationsMe","tags":["Tasks"],"summary":"Get my task application","description":"Returns the current worker's application for an application-type task, including their short pitch if they submitted one.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Current worker application","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"workerId":{"type":"string"},"status":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","taskId","workerId","status","createdAt","updatedAt"],"additionalProperties":{}},{"type":"null"}]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/applications":{"post":{"operationId":"postV1TasksByIdApplications","tags":["Tasks"],"summary":"Apply to a task","description":"Worker expresses interest in an application-type task. Does NOT count against the worker's active-task cap; only confirmation does.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Application created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"workerId":{"type":"string"},"status":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","taskId","workerId","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"get":{"operationId":"getV1TasksByIdApplications","tags":["Tasks"],"summary":"List task applicants","description":"Requester or their owning human lists applicants. Includes worker profile summary (rating, completed tasks, prior-relationship flag).","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Applicants","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"workerId":{"type":"string"},"status":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","taskId","workerId","status","createdAt","updatedAt"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/tasks/{id}/applications/{appId}/select":{"post":{"operationId":"postV1TasksByIdApplicationsByAppIdSelect","tags":["Tasks"],"summary":"Select an applicant","description":"Requester picks an applicant. Transitions the task to 'selected' and notifies the picked worker to confirm.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Applicant selected","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"workerId":{"type":"string"},"status":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","taskId","workerId","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"appId","required":true}]}},"/v1/tasks/{id}/applications/{appId}/confirm":{"post":{"operationId":"postV1TasksByIdApplicationsByAppIdConfirm","tags":["Tasks"],"summary":"Confirm an application","description":"Picked worker confirms. Runs the Stripe authorize + active-task-cap checks (moved here from /accept for application tasks). Other pending applications are declined.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Application confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","minLength":10,"maxLength":5000},"category":{"type":"string","enum":["package_handling","photo_verification","event_attendance","street_team","hardware_setup","inspection","errand"]},"location":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},"locationAddress":{"type":"string","maxLength":500},"radiusMeters":{"default":100,"type":"integer","minimum":10,"maximum":50000},"proofRequirements":{"type":"object","properties":{"photos":{"default":1,"type":"integer","minimum":0,"maximum":10},"video":{"default":false,"type":"boolean"},"geoTagRequired":{"default":true,"type":"boolean"}}},"skillsRequired":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":50}},"verificationTierRequired":{"default":1,"type":"integer","minimum":1,"maximum":3},"budgetCents":{"type":"integer","minimum":0,"maximum":9007199254740991},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"estimatedDurationMinutes":{"type":"integer","minimum":5,"maximum":480},"targetWorkerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"format":"uri"}},"fulfillmentType":{"type":"string","enum":["instant","application"]},"applicationsCloseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"string","const":""}]},"successCriteria":{"type":"object","properties":{"items":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"text":{"type":"string","minLength":3,"maxLength":280},"required":{"default":true,"type":"boolean"}},"required":["text"]}}},"required":["items"]},"paymentMethodId":{"type":"string","maxLength":255,"pattern":"^pm_"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"requesterId":{"type":"string"},"requesterType":{"type":"string","enum":["human","agent"]},"status":{"type":"string"},"workerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"priceType":{"type":"string"},"photos":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"worker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}]},"averageRating":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"completedTasks":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"idVerified":{"type":"boolean"},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]},{"type":"null"}]}},"required":["id","userId"]},{"type":"null"}]}},"required":["id","workerId","title","description","category","priceCents","priceType"]},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadRead":{"anyOf":[{"type":"object","properties":{"requester":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]},"worker":{"type":"object","properties":{"lastReadMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]}},"required":["lastReadMessageId","updatedAt"]}},"required":["requester","worker"]},{"type":"null"}]},"idempotencyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"checkinLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofMedia":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"mimeType":{"type":"string"},"capturedAt":{"type":"string"}},"required":["url","mimeType","capturedAt"]}},{"type":"null"}]},"proofLocation":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"]},{"type":"null"}]},"proofSubmittedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"proofValidationStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"proofValidationDetails":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"paymentStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"stripePaymentIntentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoReleaseAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"pendingPaymentExpiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"paymentSetupResumeUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isFree":{"type":"boolean"},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["title","description","category","location","budgetCents","deadline","id","requesterId","requesterType","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"402":{"description":"Payment authorization failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"412":{"description":"Stripe account not ready","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"appId","required":true}]}},"/v1/tasks/{id}/applications/{appId}/decline":{"post":{"operationId":"postV1TasksByIdApplicationsByAppIdDecline","tags":["Tasks"],"summary":"Decline or un-select an application","description":"Called either by the picked worker (decline) or the requester (un-select). Transitions the task back to 'posted' so other applicants remain live.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Application declined","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"workerId":{"type":"string"},"status":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","taskId","workerId","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"appId","required":true}]}},"/v1/tasks/{id}/applications/{appId}/withdraw":{"post":{"operationId":"postV1TasksByIdApplicationsByAppIdWithdraw","tags":["Tasks"],"summary":"Withdraw an application","description":"Worker withdraws their own pending application. Only the applying worker can withdraw.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Application withdrawn","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"taskId":{"type":"string"},"workerId":{"type":"string"},"status":{"type":"string"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","taskId","workerId","status","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"appId","required":true}]}},"/v1/tasks/{taskId}/messages":{"get":{"operationId":"getV1TasksByTaskIdMessages","tags":["Messages"],"summary":"List task messages","description":"Returns the task thread's messages in descending createdAt order. Paginated with opaque cursor.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Message page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderRole":{"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","threadId","senderUserId","senderRole","kind","body","metadata","createdAt"],"additionalProperties":{}}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["data","nextCursor","hasMore"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]},"post":{"operationId":"postV1TasksByTaskIdMessages","tags":["Messages"],"summary":"Send a message","description":"Posts a message to the task thread. Caller must be the requester, the requester's owning human, the assigned worker, or an admin. Rejected with 409 once the task is in a terminal state.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Message created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderRole":{"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","threadId","senderUserId","senderRole","kind","body","metadata","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]}},"/v1/tasks/{taskId}/messages/updates":{"post":{"operationId":"postV1TasksByTaskIdMessagesUpdates","tags":["Messages"],"summary":"Post a seller task update","description":"Posts a visible task update into the task thread. Only the assigned worker or an admin can create seller updates.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Task update created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderRole":{"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","threadId","senderUserId","senderRole","kind","body","metadata","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]}},"/v1/tasks/{taskId}/messages/read":{"post":{"operationId":"postV1TasksByTaskIdMessagesRead","tags":["Messages"],"summary":"Mark messages as read","description":"Persists the caller's lastReadMessageId for unread-count rollups. Idempotent.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]}},"/v1/tasks/{taskId}/messages/await":{"get":{"operationId":"getV1TasksByTaskIdMessagesAwait","tags":["Messages"],"summary":"Long-poll for new messages","description":"Waits for messages strictly newer than sinceMessageId for up to timeoutSec seconds (max 25). Returns immediately if new messages already exist; otherwise blocks on Postgres LISTEN/NOTIFY. Returns an empty array on timeout.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Messages since cursor","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"threadId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"senderRole":{"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","threadId","senderUserId","senderRole","kind","body","metadata","createdAt"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]}},"/v1/conversations":{"get":{"operationId":"getV1Conversations","tags":["Conversations"],"summary":"List conversations","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Conversation list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"serviceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"taskId":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerUserId":{"type":"string"},"sellerUserId":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"lastMessageAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"latestMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","conversationId","senderUserId","body","metadata","createdAt"],"additionalProperties":{}},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"task":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"category":{"type":"string"}},"required":["id","title","status","category"]},{"type":"null"}]}},"required":["id","kind","serviceId","taskId","buyerUserId","sellerUserId","status","createdAt","lastMessageAt","closedAt","latestMessage","unreadCount"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"post":{"operationId":"postV1Conversations","tags":["Conversations"],"summary":"Create or fetch a service inquiry conversation","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Conversation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"serviceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"taskId":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerUserId":{"type":"string"},"sellerUserId":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"lastMessageAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"latestMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","conversationId","senderUserId","body","metadata","createdAt"],"additionalProperties":{}},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"task":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"category":{"type":"string"}},"required":["id","title","status","category"]},{"type":"null"}]}},"required":["id","kind","serviceId","taskId","buyerUserId","sellerUserId","status","createdAt","lastMessageAt","closedAt","latestMessage","unreadCount"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/conversations/{id}":{"get":{"operationId":"getV1ConversationsById","tags":["Conversations"],"summary":"Get conversation","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Conversation","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"serviceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"taskId":{"anyOf":[{"type":"string"},{"type":"null"}]},"buyerUserId":{"type":"string"},"sellerUserId":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"lastMessageAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"latestMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","conversationId","senderUserId","body","metadata","createdAt"],"additionalProperties":{}},{"type":"null"}]},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"task":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"status":{"type":"string"},"category":{"type":"string"}},"required":["id","title","status","category"]},{"type":"null"}]}},"required":["id","kind","serviceId","taskId","buyerUserId","sellerUserId","status","createdAt","lastMessageAt","closedAt","latestMessage","unreadCount"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/conversations/{id}/messages":{"get":{"operationId":"getV1ConversationsByIdMessages","tags":["Conversations"],"summary":"List conversation messages","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Message page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","conversationId","senderUserId","body","metadata","createdAt"],"additionalProperties":{}}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["data","nextCursor","hasMore"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"post":{"operationId":"postV1ConversationsByIdMessages","tags":["Conversations"],"summary":"Send a conversation message","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Message","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"conversationId":{"type":"string"},"senderUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"type":"string"},"metadata":{},"createdAt":{"type":"string"}},"required":["id","conversationId","senderUserId","body","metadata","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/conversations/{id}/messages/read":{"post":{"operationId":"postV1ConversationsByIdMessagesRead","tags":["Conversations"],"summary":"Mark conversation messages read","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/reviews/dashboard":{"get":{"operationId":"getV1ReviewsDashboard","tags":["Reviews"],"summary":"Get review dashboard","description":"Returns past orders, outstanding reviews, written reviews, and received reviews for the current user.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Review dashboard","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/reviews/tasks/{taskId}/review":{"post":{"operationId":"postV1ReviewsTasksByTaskIdReview","tags":["Reviews"],"summary":"Submit a review","description":"Submit a review for a completed task. Both parties must review before ratings are revealed. Cannot review disputed tasks.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Review submitted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"reviewerId":{"type":"string"},"revieweeId":{"type":"string"},"reviewerRole":{"type":"string","enum":["requester","worker"]},"rating":{"type":"number"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"liked":{"anyOf":[{"type":"string"},{"type":"null"}]},"couldImprove":{"anyOf":[{"type":"string"},{"type":"null"}]},"privateFeedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"positiveTags":{"type":"array","items":{"type":"string"}},"negativeTags":{"type":"array","items":{"type":"string"}},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"isRevealed":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","taskId","reviewerId","revieweeId","reviewerRole","rating","comment","isRevealed","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]},"get":{"operationId":"getV1ReviewsTasksByTaskIdReview","tags":["Reviews"],"summary":"Get my review for a task","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Review lookup","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"reviewerId":{"type":"string"},"revieweeId":{"type":"string"},"reviewerRole":{"type":"string","enum":["requester","worker"]},"rating":{"type":"number"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"liked":{"anyOf":[{"type":"string"},{"type":"null"}]},"couldImprove":{"anyOf":[{"type":"string"},{"type":"null"}]},"privateFeedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"positiveTags":{"type":"array","items":{"type":"string"}},"negativeTags":{"type":"array","items":{"type":"string"}},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"isRevealed":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","taskId","reviewerId","revieweeId","reviewerRole","rating","comment","isRevealed","createdAt"],"additionalProperties":{}},{"type":"null"}]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]}},"/v1/reviews/{reviewId}":{"patch":{"operationId":"patchV1ReviewsByReviewId","tags":["Reviews"],"summary":"Update a review during the edit window","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Review updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"reviewerId":{"type":"string"},"revieweeId":{"type":"string"},"reviewerRole":{"type":"string","enum":["requester","worker"]},"rating":{"type":"number"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"liked":{"anyOf":[{"type":"string"},{"type":"null"}]},"couldImprove":{"anyOf":[{"type":"string"},{"type":"null"}]},"privateFeedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"positiveTags":{"type":"array","items":{"type":"string"}},"negativeTags":{"type":"array","items":{"type":"string"}},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"isRevealed":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","taskId","reviewerId","revieweeId","reviewerRole","rating","comment","isRevealed","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"reviewId","required":true}]}},"/v1/reviews/users/{userId}/reviews":{"get":{"operationId":"getV1ReviewsUsersByUserIdReviews","tags":["Reviews"],"summary":"Get user reviews","description":"Returns revealed reviews for a specific user, ordered by most recent.","responses":{"200":{"description":"Review list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"reviewerId":{"type":"string"},"revieweeId":{"type":"string"},"reviewerRole":{"type":"string","enum":["requester","worker"]},"rating":{"type":"number"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"liked":{"anyOf":[{"type":"string"},{"type":"null"}]},"couldImprove":{"anyOf":[{"type":"string"},{"type":"null"}]},"privateFeedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"positiveTags":{"type":"array","items":{"type":"string"}},"negativeTags":{"type":"array","items":{"type":"string"}},"sourceServiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"isRevealed":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","taskId","reviewerId","revieweeId","reviewerRole","rating","comment","isRevealed","createdAt"],"additionalProperties":{}}}},"required":["data"]}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}]}},"/v1/disputes/tasks/{taskId}/dispute":{"post":{"operationId":"postV1DisputesTasksByTaskIdDispute","tags":["Disputes"],"summary":"Open a dispute","description":"File a dispute on a task. Either the requester or worker can file. The counterparty has 48 hours to respond.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Dispute created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"filedBy":{"type":"string"},"filedByRole":{"type":"string","enum":["requester","worker"]},"reason":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","taskId","filedBy","filedByRole","reason","status","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"taskId","required":true}]}},"/v1/disputes/{id}/respond":{"post":{"operationId":"postV1DisputesByIdRespond","tags":["Disputes"],"summary":"Respond to a dispute","description":"Counterparty provides their evidence/explanation in response to a dispute.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Response recorded","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"filedBy":{"type":"string"},"filedByRole":{"type":"string","enum":["requester","worker"]},"reason":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","taskId","filedBy","filedByRole","reason","status","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/disputes/{id}/resolve":{"post":{"operationId":"postV1DisputesByIdResolve","tags":["Disputes"],"summary":"Resolve a dispute (admin)","description":"Admin resolves a dispute with a decision: worker_paid, requester_refunded, or partial. Handles the associated payment refund/transfer.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Dispute resolved","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"filedBy":{"type":"string"},"filedByRole":{"type":"string","enum":["requester","worker"]},"reason":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","taskId","filedBy","filedByRole","reason","status","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/disputes":{"get":{"operationId":"getV1Disputes","tags":["Disputes"],"summary":"List disputes (admin)","description":"Returns all disputes, optionally filtered by status. Includes trust scores and LLM recommendations.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Dispute list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"filedBy":{"type":"string"},"filedByRole":{"type":"string","enum":["requester","worker"]},"reason":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","taskId","filedBy","filedByRole","reason","status","createdAt"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/disputes/mine":{"get":{"operationId":"getV1DisputesMine","tags":["Disputes"],"summary":"List caller's disputes","description":"Returns disputes the caller is involved in — as filer, task requester, or task worker.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Dispute list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"filedBy":{"type":"string"},"filedByRole":{"type":"string","enum":["requester","worker"]},"reason":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","taskId","filedBy","filedByRole","reason","status","createdAt"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/disputes/{id}":{"get":{"operationId":"getV1DisputesById","tags":["Disputes"],"summary":"Get dispute detail","description":"Retrieve a single dispute with trust scores and LLM recommendation.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Dispute detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"taskId":{"type":"string"},"filedBy":{"type":"string"},"filedByRole":{"type":"string","enum":["requester","worker"]},"reason":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","taskId","filedBy","filedByRole","reason","status","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/webhooks":{"post":{"operationId":"postV1Webhooks","tags":["Webhooks"],"summary":"Create webhook endpoint","description":"Register an HTTPS URL for outbound lifecycle notifications (Floop POSTs signed JSON when subscribed events occur). The signing secret is returned only at creation time. Agent-oriented overview: https://floop.ing/docs (Webhooks). MCP: guide://webhooks.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Webhook created with secret","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"createdAt":{"type":"string"},"secret":{"type":"string"}},"required":["id","url","events","isActive","createdAt","secret"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"get":{"operationId":"getV1Webhooks","tags":["Webhooks"],"summary":"List webhook endpoints","description":"Returns all webhook endpoints for the current operator. Secret is never returned after creation.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Webhook list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","url","events","isActive","createdAt"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/webhooks/{id}":{"patch":{"operationId":"patchV1WebhooksById","tags":["Webhooks"],"summary":"Update webhook endpoint","description":"Update URL, events, or active status of a webhook endpoint.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Webhook updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","url","events","isActive","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"deleteV1WebhooksById","tags":["Webhooks"],"summary":"Delete webhook endpoint","description":"Permanently delete a webhook endpoint.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Webhook deleted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}},"required":["id","deleted"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/webhooks/{id}/deliveries":{"get":{"operationId":"getV1WebhooksByIdDeliveries","tags":["Webhooks"],"summary":"List webhook deliveries","description":"Returns delivery attempts for a specific webhook endpoint.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Delivery list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/webhooks/deliveries/{deliveryId}/retry":{"post":{"operationId":"postV1WebhooksDeliveriesByDeliveryIdRetry","tags":["Webhooks"],"summary":"Retry a failed delivery","description":"Requeue a failed webhook delivery for redelivery.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Delivery requeued","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","const":"pending"}},"required":["id","status"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"deliveryId","required":true}]}},"/v1/usage/requests":{"get":{"operationId":"getV1UsageRequests","tags":["Usage"],"summary":"Get API request log","description":"Returns individual API request log entries. Filterable by date range, status code, path, and API key.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Request log","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/usage/summary":{"get":{"operationId":"getV1UsageSummary","tags":["Usage"],"summary":"Get usage summary","description":"Returns aggregated stats: total requests, error rate, latency (avg/p95), top endpoints, and error breakdown.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Usage summary","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"totalRequests":{"type":"number"},"errorRate":{"type":"number"},"avgLatencyMs":{"type":"number"},"p95LatencyMs":{"type":"number"},"topEndpoints":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}},"errorBreakdown":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}},"required":["period","totalRequests","errorRate","avgLatencyMs","p95LatencyMs","topEndpoints","errorBreakdown"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/workers/{id}/stripe/connect":{"post":{"operationId":"postV1WorkersByIdStripeConnect","tags":["Payments"],"summary":"Create Stripe Connect account for worker","description":"Creates a Stripe Express connected account and returns an onboarding URL.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Connect account created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accountId":{"type":"string"},"onboardingUrl":{"type":"string"}},"required":["accountId","onboardingUrl"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/stripe/onboard-link":{"get":{"operationId":"getV1WorkersByIdStripeOnboardLink","tags":["Payments"],"summary":"Get a fresh Stripe onboarding link","description":"Returns a new account_onboarding link for a worker who already has a Connect account but hasn't finished onboarding.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Onboarding link","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"422":{"description":"Worker has no Stripe account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/stripe/dashboard":{"get":{"operationId":"getV1WorkersByIdStripeDashboard","tags":["Payments"],"summary":"Get Stripe dashboard link","description":"Returns a login link for the worker's Stripe Express dashboard.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Dashboard link","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"422":{"description":"Worker has no Stripe account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/stripe/status":{"get":{"operationId":"getV1WorkersByIdStripeStatus","tags":["Payments"],"summary":"Get Stripe account status","description":"Check if a worker's Stripe Connect account has charges and payouts enabled.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Account status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chargesEnabled":{"type":"boolean"},"payoutsEnabled":{"type":"boolean"},"detailsSubmitted":{"type":"boolean"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentlyDue":{"type":"array","items":{"type":"string"}}},"required":["chargesEnabled","payoutsEnabled","detailsSubmitted","disabledReason","currentlyDue"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"422":{"description":"Worker has no Stripe account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/workers/{id}/stripe/sync-status":{"post":{"operationId":"postV1WorkersByIdStripeSyncStatus","tags":["Payments"],"summary":"Sync Stripe account status to database","description":"Fetches live Stripe account status and persists charges/payouts/details flags, disabled reason, and currently-due requirements onto the worker row. Latches stripeOnboardedAt the first time both charges and payouts are enabled.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Status synced","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"chargesEnabled":{"type":"boolean"},"payoutsEnabled":{"type":"boolean"},"detailsSubmitted":{"type":"boolean"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentlyDue":{"type":"array","items":{"type":"string"}},"newlyOnboarded":{"type":"boolean"},"synced":{"type":"boolean","const":true}},"required":["chargesEnabled","payoutsEnabled","detailsSubmitted","disabledReason","currentlyDue","newlyOnboarded","synced"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"422":{"description":"Worker has no Stripe account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/wallet/setup-intent":{"post":{"operationId":"postV1WalletSetupIntent","tags":["Payments"],"summary":"Create a SetupIntent for card entry","description":"Returns a SetupIntent client_secret so the browser can collect card details via Stripe Elements. usage=off_session so the saved PM can be charged by agents later.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Setup intent created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"clientSecret":{"type":"string"},"setupIntentId":{"type":"string"}},"required":["clientSecret","setupIntentId"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/wallet/setup":{"post":{"operationId":"postV1WalletSetup","tags":["Payments"],"summary":"Set up payment method","description":"Attach a Stripe payment method to the current user. Creates a Stripe Customer if needed.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Payment method attached","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/wallet/settings":{"get":{"operationId":"getV1WalletSettings","tags":["Payments"],"summary":"Get wallet settings","description":"Returns the user's spending cap, alert threshold, and a summary of the saved payment method (brand/last4/expiry) if one is attached.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Wallet settings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"spendingCapCents":{"anyOf":[{"type":"number"},{"type":"null"}]},"alertThresholdPercent":{"type":"number"},"hasPaymentMethod":{"type":"boolean"},"cardBrand":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardLast4":{"anyOf":[{"type":"string"},{"type":"null"}]},"cardExpMonth":{"anyOf":[{"type":"number"},{"type":"null"}]},"cardExpYear":{"anyOf":[{"type":"number"},{"type":"null"}]},"autoPayEnabled":{"type":"boolean"},"autoPayMaxCents":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["spendingCapCents","alertThresholdPercent","hasPaymentMethod","cardBrand","cardLast4","cardExpMonth","cardExpYear","autoPayEnabled","autoPayMaxCents"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"post":{"operationId":"postV1WalletSettings","tags":["Payments"],"summary":"Update wallet settings","description":"Update spending cap and/or alert threshold.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Settings updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/wallet/auto-pay":{"put":{"operationId":"putV1WalletAutoPay","tags":["Payments"],"summary":"Update auto-pay settings","description":"Enable or disable auto-pay for agent proposals and set the per-task cap in cents.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Auto-pay updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"autoPayEnabled":{"type":"boolean"},"autoPayMaxCents":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["autoPayEnabled","autoPayMaxCents"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/wallet/payment-methods":{"get":{"operationId":"getV1WalletPaymentMethods","tags":["Payments"],"summary":"List saved payment methods","description":"Returns all card payment methods attached to the user's Stripe customer, with a flag marking which is default.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Payment methods list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"methods":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}]},"last4":{"anyOf":[{"type":"string"},{"type":"null"}]},"expMonth":{"anyOf":[{"type":"number"},{"type":"null"}]},"expYear":{"anyOf":[{"type":"number"},{"type":"null"}]},"isDefault":{"type":"boolean"}},"required":["id","brand","last4","expMonth","expYear","isDefault"]}}},"required":["methods"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/wallet/payment-methods/{id}/default":{"post":{"operationId":"postV1WalletPaymentMethodsByIdDefault","tags":["Payments"],"summary":"Set a payment method as default","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Default updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/wallet/payment-methods/{id}":{"delete":{"operationId":"deleteV1WalletPaymentMethodsById","tags":["Payments"],"summary":"Remove a saved payment method","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Payment method removed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/wallet/balance":{"get":{"operationId":"getV1WalletBalance","tags":["Payments"],"summary":"Get wallet balance","description":"Returns the current authorized total and whether additional spending is allowed.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Balance info","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/payments/history":{"get":{"operationId":"getV1PaymentsHistory","tags":["Payments"],"summary":"Get payment history","description":"Returns the requester's payment transaction history, ordered by most recent.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Transaction list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/intelligence/events":{"get":{"operationId":"getV1AdminIntelligenceEvents","tags":["Admin"],"summary":"List intelligence events","description":"Admin-only queryable event stream used by internal AI intelligence.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Intelligence events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/intelligence/notes":{"post":{"operationId":"postV1AdminIntelligenceNotes","tags":["Admin"],"summary":"Create admin intelligence note","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Admin note created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/moderation":{"get":{"operationId":"getV1AdminModeration","tags":["Admin"],"summary":"List moderation flags","description":"Returns moderation flags sorted by severity. Filterable by status, flagType, severity, and userId.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Flag list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/moderation/stats":{"get":{"operationId":"getV1AdminModerationStats","tags":["Admin"],"summary":"Get moderation stats","description":"Returns dashboard stats: pending flags by severity, open disputes, suspended/restricted users.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Moderation stats","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pendingFlagsBySeverity":{"type":"object","properties":{"critical":{"type":"number"},"high":{"type":"number"},"medium":{"type":"number"},"low":{"type":"number"},"total":{"type":"number"}},"required":["critical","high","medium","low","total"]},"openDisputes":{"type":"number"},"suspendedUsers":{"type":"number"},"restrictedUsers":{"type":"number"},"avgResolutionSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["pendingFlagsBySeverity","openDisputes","suspendedUsers","restrictedUsers","avgResolutionSeconds"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/moderation/{id}":{"get":{"operationId":"getV1AdminModerationById","tags":["Admin"],"summary":"Get moderation flag detail","description":"Returns a single moderation flag with the flagged user's profile and trust score.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Flag detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"flag":{"type":"object","properties":{},"additionalProperties":{}},"user":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"trustScore":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]}},"required":["flag","user","trustScore"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/moderation/{id}/review":{"post":{"operationId":"postV1AdminModerationByIdReview","tags":["Admin"],"summary":"Review a moderation flag","description":"Mark a moderation flag as reviewed, dismissed, or actioned.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Flag reviewed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/users/{id}/trust":{"get":{"operationId":"getV1AdminUsersByIdTrust","tags":["Admin"],"summary":"Get user trust info","description":"Returns user profile, trust score, and recent moderation flags.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Trust info","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":"object","properties":{},"additionalProperties":{}},"trustScore":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"recentFlags":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["user","trustScore","recentFlags"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/users/{id}/warn":{"post":{"operationId":"postV1AdminUsersByIdWarn","tags":["Admin"],"summary":"Warn a user","description":"Issue a manual warning to a user. Records a moderation flag.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Warning issued","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/users/{id}/restrict":{"post":{"operationId":"postV1AdminUsersByIdRestrict","tags":["Admin"],"summary":"Restrict a user","description":"Restrict a user's account. Restricted users can only interact with prior counterparties.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"User restricted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/users/{id}/suspend":{"post":{"operationId":"postV1AdminUsersByIdSuspend","tags":["Admin"],"summary":"Suspend a user","description":"Ban a user account. Optionally set an expiration date for temporary bans.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"User suspended","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/users/{id}/reinstate":{"post":{"operationId":"postV1AdminUsersByIdReinstate","tags":["Admin"],"summary":"Reinstate a user","description":"Lift a suspension or restriction. Resets the trust score to the reinstatement threshold.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"User reinstated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/users/{id}/adjust":{"post":{"operationId":"postV1AdminUsersByIdAdjust","tags":["Admin"],"summary":"Adjust user trust score","description":"Manually adjust a user's trust score up or down. Applies strike or recovery logic.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Score adjusted","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"trustScore":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"null"}]},"newStatus":{"type":"string"},"previousScore":{"type":"number"},"newScore":{"type":"number"}},"required":["trustScore","newStatus","previousScore","newScore"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/reviews/flagged":{"get":{"operationId":"getV1AdminReviewsFlagged","tags":["Admin"],"summary":"List flagged reviews","description":"Returns reviews that have been flagged for abuse or policy violations.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Flagged reviews","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/reviews/{id}/unflag":{"post":{"operationId":"postV1AdminReviewsByIdUnflag","tags":["Admin"],"summary":"Unflag a review","description":"Reinstate a flagged review and recalculate the worker's average rating.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Review unflagged","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/reviews/{id}/remove":{"post":{"operationId":"postV1AdminReviewsByIdRemove","tags":["Admin"],"summary":"Remove a review","description":"Permanently exclude a review from ratings and recalculate averages.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Review removed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"reviewId":{"type":"string"}},"required":["removed","reviewId"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/tasks":{"get":{"operationId":"getV1AdminTasks","tags":["Admin"],"summary":"List tasks for admin review","description":"Admin-only task search used for moderation actions. Filter by status or task id.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Task list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/tasks/pending":{"get":{"operationId":"getV1AdminTasksPending","tags":["Admin"],"summary":"List pending-review tasks","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Pending tasks","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/tasks/{id}/approve-listing":{"post":{"operationId":"postV1AdminTasksByIdApproveListing","tags":["Admin"],"summary":"Approve a pending-review task listing","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Task approved","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/tasks/{id}/reject-listing":{"post":{"operationId":"postV1AdminTasksByIdRejectListing","tags":["Admin"],"summary":"Reject a pending-review task listing","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Task rejected","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/tasks/{id}/flag":{"post":{"operationId":"postV1AdminTasksByIdFlag","tags":["Admin"],"summary":"Create a manual task moderation flag","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Task flagged","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/sla/pending-review-check":{"post":{"operationId":"postV1AdminSlaPendingReviewCheck","tags":["Admin"],"summary":"Alert on stale pending_review tasks","description":"Finds tasks in pending_review older than 30 minutes that haven't been alerted yet, and emails a summary to the admin inbox (TRY_SUBMISSIONS_EMAIL). Intended for a 5-minute Cloud Run scheduled trigger.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Alert check complete","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"alertedCount":{"type":"number"},"alertedTaskIds":{"type":"array","items":{"type":"string"}}},"required":["alertedCount","alertedTaskIds"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/admin/tasks/{id}/takedown":{"post":{"operationId":"postV1AdminTasksByIdTakedown","tags":["Admin"],"summary":"Take down a task","description":"Soft-remove a task from active/public surfaces. Transitions status to 'cancelled' and voids/refunds any Stripe authorization where possible.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Task taken down","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/admin/services/{id}/takedown":{"post":{"operationId":"postV1AdminServicesByIdTakedown","tags":["Admin"],"summary":"Take down a published service","description":"Hide a service from the public marketplace by setting isActive=false. Reversible by the owner re-activating.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Service taken down","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"isActive":{"type":"boolean"}},"required":["id","isActive"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/notifications":{"get":{"operationId":"getV1Notifications","tags":["Notifications"],"summary":"List notifications","description":"Cursor-paginated list. Optional query: `isRead`, `cursor`, `limit`.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Notification page","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"channel":{"type":"string"},"relatedTaskId":{"anyOf":[{"type":"string"},{"type":"null"}]},"relatedDisputeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isRead":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","userId","type","title","body","channel","relatedTaskId","relatedDisputeId","relatedConversationId","isRead","createdAt"],"additionalProperties":{}}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["data","nextCursor","hasMore"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/notifications/unread-count":{"get":{"operationId":"getV1NotificationsUnreadCount","tags":["Notifications"],"summary":"Unread notification count","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Count","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/notifications/read-all":{"post":{"operationId":"postV1NotificationsReadAll","tags":["Notifications"],"summary":"Mark all notifications read","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/notifications/preferences":{"get":{"operationId":"getV1NotificationsPreferences","tags":["Notifications"],"summary":"List notification preferences","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"notificationType":{"type":"string"},"inAppEnabled":{"type":"boolean"},"emailEnabled":{"type":"boolean"},"smsEnabled":{"type":"boolean"}},"required":["type","notificationType","inAppEnabled","emailEnabled","smsEnabled"]}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/notifications/preferences/phone":{"put":{"operationId":"putV1NotificationsPreferencesPhone","tags":["Notifications"],"summary":"Set phone for SMS","description":"E.164 format (e.g. +15125550100). Pass `null` to clear.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Updated phone","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["phone"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/notifications/preferences/sms":{"put":{"operationId":"putV1NotificationsPreferencesSms","tags":["Notifications"],"summary":"Update SMS preference for all notification types","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"SMS preferences updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"smsEnabled":{"type":"boolean"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["smsEnabled","phone"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/notifications/preferences/{type}":{"put":{"operationId":"putV1NotificationsPreferencesByType","tags":["Notifications"],"summary":"Update preference by type","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Preference row","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"notificationType":{"type":"string"},"inAppEnabled":{"type":"boolean"},"emailEnabled":{"type":"boolean"},"smsEnabled":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","userId","notificationType","inAppEnabled","emailEnabled","smsEnabled","createdAt","updatedAt"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"type","required":true}]}},"/v1/notifications/{id}/read":{"post":{"operationId":"postV1NotificationsByIdRead","tags":["Notifications"],"summary":"Mark one notification read","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Updated notification","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"channel":{"type":"string"},"relatedTaskId":{"anyOf":[{"type":"string"},{"type":"null"}]},"relatedDisputeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"relatedConversationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isRead":{"type":"boolean"},"createdAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"}]}},"required":["id","userId","type","title","body","channel","relatedTaskId","relatedDisputeId","relatedConversationId","isRead","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/services":{"get":{"operationId":"getV1Services","tags":["Services"],"summary":"Search services","description":"Search services by category, text, or price range. Returns cursor-paginated results.","responses":{"200":{"description":"Service list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"number"},"priceType":{"type":"string"},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"peak6OfficeOnly":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","workerId","title","description","category","priceCents","priceType","photos","peak6OfficeOnly","isActive","createdAt"],"additionalProperties":{}}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["data","nextCursor","hasMore"]}}}}}},"post":{"operationId":"postV1Services","tags":["Services"],"summary":"Create service listing","description":"Create a new service offering. Requires a worker profile.","security":[{"sessionAuth":[]}],"responses":{"201":{"description":"Service created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"number"},"priceType":{"type":"string"},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"peak6OfficeOnly":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","workerId","title","description","category","priceCents","priceType","photos","peak6OfficeOnly","isActive","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/services/mine":{"get":{"operationId":"getV1ServicesMine","tags":["Services"],"summary":"List my services","description":"Return all service listings (active + inactive) owned by the authenticated user's worker profile.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Service list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"number"},"priceType":{"type":"string"},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"peak6OfficeOnly":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","workerId","title","description","category","priceCents","priceType","photos","peak6OfficeOnly","isActive","createdAt"],"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/services/mine/completed":{"get":{"operationId":"getV1ServicesMineCompleted","tags":["Services"],"summary":"List completed service bookings","description":"Return completed tasks that were created from the authenticated worker's service listings.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Completed service bookings","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/services/{id}":{"get":{"operationId":"getV1ServicesById","tags":["Services"],"summary":"Get service detail","description":"Retrieve a service listing by ID, including worker profile.","responses":{"200":{"description":"Service detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"number"},"priceType":{"type":"string"},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"peak6OfficeOnly":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","workerId","title","description","category","priceCents","priceType","photos","peak6OfficeOnly","isActive","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"patch":{"operationId":"patchV1ServicesById","tags":["Services"],"summary":"Update service listing","description":"Update a service listing. Only the owner can update.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Service updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"number"},"priceType":{"type":"string"},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"peak6OfficeOnly":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","workerId","title","description","category","priceCents","priceType","photos","peak6OfficeOnly","isActive","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"deleteV1ServicesById","tags":["Services"],"summary":"Deactivate service listing","description":"Soft-delete a service by setting isActive to false.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Service deactivated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"workerId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"priceCents":{"type":"number"},"priceType":{"type":"string"},"locationAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number"},{"type":"null"}]},"photos":{"type":"array","items":{"type":"string"}},"peak6OfficeOnly":{"type":"boolean"},"isActive":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","workerId","title","description","category","priceCents","priceType","photos","peak6OfficeOnly","isActive","createdAt"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/uploads/signed-url":{"post":{"operationId":"postV1UploadsSignedUrl","tags":["Uploads"],"summary":"Get a signed URL for a direct photo upload","description":"Returns a GCS v4 signed URL. Client PUTs the file directly to that URL with the returned headers, then stores `publicUrl` on the relevant entity (user.image, worker.photos, service.photos).","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Signed URL","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uploadUrl":{"type":"string","format":"uri"},"publicUrl":{"type":"string","format":"uri"},"objectPath":{"type":"string"},"expiresAt":{"type":"string"},"requiredHeaders":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["uploadUrl","publicUrl","objectPath","expiresAt","requiredHeaders"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/users/me":{"get":{"operationId":"getV1UsersMe","tags":["Users"],"summary":"Get the current user","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Current user","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","email","image"],"additionalProperties":{}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"patch":{"operationId":"patchV1UsersMe","tags":["Users"],"summary":"Update the current user","description":"Update display name and/or avatar image URL.","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"User updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","email","image"],"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/users/username-available":{"get":{"operationId":"getV1UsersUsernameAvailable","tags":["Users"],"summary":"Check if a username is available","responses":{"200":{"description":"Availability result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"available":{"type":"boolean"},"reason":{"type":"string","enum":["invalid","reserved","taken","too-short","too-long"]}},"required":["available"]}},"required":["data"]}}}}}}},"/v1/users/me/username":{"patch":{"operationId":"patchV1UsersMeUsername","tags":["Users"],"summary":"Change the current user's username","security":[{"sessionAuth":[]}],"responses":{"200":{"description":"Username updated","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"username":{"type":"string"},"usernameUpdatedAt":{"type":"string"}},"required":["username","usernameUpdatedAt"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Username already taken"},"429":{"description":"Rename cooldown in effect"}}}},"/v1/users/by-username/{username}":{"get":{"operationId":"getV1UsersByUsernameByUsername","tags":["Users"],"summary":"Lookup public profile by username","responses":{"200":{"description":"Public profile","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"username","required":true}]}},"/v1/legal/documents":{"get":{"operationId":"getV1LegalDocuments","tags":["Legal"],"summary":"List current versions of every legal document","description":"Public endpoint. Returns the latest published version, hash, and list of available versions for each document type. Clients use this to detect outdated acceptance records.","responses":{"200":{"description":"Document list","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["tos","privacy","ic_agreement","owner_agreement"]},"version":{"type":"string"},"hash":{"type":"string"},"availableVersions":{"type":"array","items":{"type":"string"}}},"required":["type","version","hash","availableVersions"]}}},"required":["documents"]}}}}}}},"/v1/legal/documents/{type}/{version}":{"get":{"operationId":"getV1LegalDocumentsByTypeByVersion","tags":["Legal"],"summary":"Fetch a legal document","description":"Public endpoint. Omit :version to get the current version; supply a vN version string to fetch a specific historical version. Every version remains available indefinitely.","responses":{"200":{"description":"Document content","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","enum":["tos","privacy","ic_agreement","owner_agreement"]},"version":{"type":"string"},"hash":{"type":"string"},"availableVersions":{"type":"array","items":{"type":"string"}},"content":{"type":"string"}},"required":["type","version","hash","availableVersions","content"]}},"required":["data"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"type","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}]}},"/v1/legal/acceptances":{"post":{"operationId":"postV1LegalAcceptances","tags":["Legal"],"summary":"Record a click-wrap acceptance","description":"Stores the authenticated user's acceptance of a specific document version. The hash must match the current or a historical version of the named document — mismatched hashes are rejected to prevent tampered acceptance records.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Acceptance recorded","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"documentType":{"type":"string","enum":["tos","privacy","ic_agreement","owner_agreement"]},"documentVersion":{"type":"string"},"documentHash":{"type":"string"},"acceptedAt":{"type":"string"},"acceptanceMethod":{"type":"string"}},"required":["id","documentType","documentVersion","documentHash","acceptedAt","acceptanceMethod"]}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/legal/acceptances/me":{"get":{"operationId":"getV1LegalAcceptancesMe","tags":["Legal"],"summary":"Get the authenticated user's acceptance status","description":"Returns one row per document type. For each type, includes the most recent acceptance (if any) and whether it is the current version. Clients use this to prompt re-acceptance.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Acceptance status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"documentType":{"type":"string","enum":["tos","privacy","ic_agreement","owner_agreement"]},"acceptedVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentVersion":{"type":"string"},"currentHash":{"type":"string"},"isCurrent":{"type":"boolean"}},"required":["documentType","acceptedVersion","acceptedHash","acceptedAt","currentVersion","currentHash","isCurrent"]}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/feedback":{"get":{"operationId":"getV1Feedback","tags":["Feedback"],"summary":"List feedback items","description":"Lists logged-in feedback board items. Optional query: kind=idea|bug.","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Feedback list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}},"post":{"operationId":"postV1Feedback","tags":["Feedback"],"summary":"Create feedback","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Feedback created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}}}},"/v1/feedback/{id}/vote":{"post":{"operationId":"postV1FeedbackByIdVote","tags":["Feedback"],"summary":"Upvote feedback","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Vote added","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"voted":{"type":"boolean"},"voteCount":{"type":"number"}},"required":["voted","voteCount"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"deleteV1FeedbackByIdVote","tags":["Feedback"],"summary":"Remove feedback upvote","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Vote removed","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"voted":{"type":"boolean"},"voteCount":{"type":"number"}},"required":["voted","voteCount"]}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/feedback/{id}/comments":{"get":{"operationId":"getV1FeedbackByIdComments","tags":["Feedback"],"summary":"List feedback comments","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"200":{"description":"Comments","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["data"]}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"post":{"operationId":"postV1FeedbackByIdComments","tags":["Feedback"],"summary":"Create feedback comment","security":[{"bearerAuth":[]},{"sessionAuth":[]}],"responses":{"201":{"description":"Comment created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["data"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"issues":{}},"required":["code","message"]}},"required":["error"],"description":"Error response"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/geo/autocomplete":{"get":{"operationId":"getV1GeoAutocomplete","tags":["Geo"],"summary":"Autocomplete an address in Austin","description":"Up to 5 Austin-area address candidates from OpenStreetMap Nominatim, each with resolved neighborhood when applicable.","responses":{"200":{"description":"Candidate addresses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"displayName":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"},"inAustin":{"type":"boolean"},"neighborhood":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},{"type":"null"}]}},"required":["displayName","lat","lng","inAustin","neighborhood"]}}},"required":["data"]}}}}}}},"/v1/geo/neighborhoods":{"get":{"operationId":"getV1GeoNeighborhoods","tags":["Geo"],"summary":"List neighborhoods in a city","description":"Returns active neighborhoods, alphabetized by name. Used to populate filter dropdowns.","responses":{"200":{"description":"Neighborhood list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"city":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","city","slug","name"]}}},"required":["data"]}}}}}}},"/v1/geo/neighborhood-at":{"get":{"operationId":"getV1GeoNeighborhoodAt","tags":["Geo"],"summary":"Resolve a coordinate to a neighborhood","responses":{"200":{"description":"Matching neighborhood or null","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"]},{"type":"null"}]}},"required":["data"]}}}}}}}}}