Workflows API
Workflow endpoints manage automation definitions and versioned step logic.
Common endpoints
GET /api/workflowslist workflows in the current organizationPOST /api/workflowscreate a workflowGET /api/workflows/{id}load workflow detailsPOST /api/workflows/{id}/savepersist script or step updatesPOST /api/workflows/uploadcreate from uploaded recording artifacts
Request design
- Use JSON payloads with explicit field names.
- Keep workflow IDs UUID-based.
- Separate mutable metadata from executable step definitions.
Validation and safety
- Validate request bodies with Zod.
- Reject missing required fields with 400.
- Enforce organization ownership on all workflow reads/writes.
Example create request
{ "name": "Eligibility Check", "description": "Payer portal eligibility verification", "variables": ["member_id", "date_of_birth", "payer_name"]}Example save request
{ "script": "// generated or edited workflow script", "steps": [ { "id": "step_1", "type": "navigate", "url": "https://example-portal" }, { "id": "step_2", "type": "type", "field": "member_id" } ]}Related APIs
- Jobs API for execution
- Agents API for runtime control
- Functions API for reusable helper methods