API reference wey dey
Reference for WorkItem operations, decision-step controls, integration execution, plus telemetry export.
These APIs dey designed for predictable automation behaviour with explicit policy and tenant scoping.
Base endpoint wey dey
Use your configured public API endpoint for authenticated requests wey dey.
https://api.threada.ai Authentication plus context
- Use scoped credentials for API access wey dey
- Include tenant plus role context where required
- Requests without valid context fail closed wey dey
Typical scopes wey dey
- workitems:read plus workitems:write
- workflow:manage for policy plus decision updates
- actions:execute for governed execution wey dey
- telemetry:read for exports plus analysis
Pagination plus filtering
- List endpoints support cursor- or token-based pagination wey dey
- Filter by channel, workflow, status, policy version, plus time range
- Prefer bounded windows for large telemetry exports wey dey
Error model
- Typed error categories for validation, authorization, policy, plus execution failures
- Reason codes support deterministic handling in operator tooling wey dey
- Correlation IDs dey returned for cross-service investigation
Example requests wey dey
Create a WorkItem from intake payload wey dey
Create a canonical work record for workflow processing. Include di channel identifier for di intake channel when required.
Request
curl -X POST "https://api.threada.ai/work-items" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d "{\"workflow_id\":\"policy_review\",\"channel_id\":\"web_main\",\"payload\":{\"message\":\"Review this renewal request before approval\"}}" Response
{
"work_item_id": "wi_123",
"status": "new",
"workflow_id": "policy_review"
} Execute an approved action wey dey
Run a policy-approved action against a configured integration wey dey.
Request
curl -X POST "https://api.threada.ai/actions/execute" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d "{\"work_item_id\":\"wi_123\",\"action_id\":\"request_approval\",\"integration_id\":\"int_workflow\"}" Response
{
"execution_id": "ex_456",
"status": "started",
"idempotency_key": "idem_789"
} Need implementation guidance dey?
Use di docs and technical overview for rollout and governance patterns.
Contact technical team wey dey