API Reference
All endpoints are REST + JSON. Base URL: http://localhost:3000 locally, https://helloautoflow.com in production.
Templates
Templates are pre-built workflow definitions. You select a template to start a run.
/api/templatesList all templatesQuery params
| Param | Type | Description |
|---|---|---|
| category | string | Filter by category: sales, content, support |
Example response
{
"templates": [
{
"id": "tpl-lead-enrich",
"name": "Lead Enrichment",
"description": "Enriches incoming leads...",
"category": "sales",
"version": "1.0.0",
"stepCount": 7,
"configFieldCount": 3
}
],
"total": 3
}/api/templates/:idGet a single templateReturns the full template definition including all steps and config field schemas.
curl http://localhost:3000/api/templates/tpl-lead-enrich
/api/templates/:id/sampleGet sample input/outputReturns sampleInput and expectedOutput for a template — useful for understanding the data contract before running.
Runs
A run is a single execution of a workflow template. Runs are async — the API returns immediately with a run object, and you poll for status changes.
/api/runsStart a new workflow runRequest body
| Field | Type | Required | Description |
|---|---|---|---|
| templateId | string | yes | Template ID to execute |
| input | object | no | Workflow trigger data (lead, brief, ticket etc.) |
| config | object | no | Template config overrides (CRM, thresholds, etc.) |
Example
curl -X POST http://localhost:3000/api/runs \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl-content-gen",
"input": {
"topic": "How to reduce SaaS churn",
"audience": "B2B SaaS founders",
"format": "Blog post"
},
"config": {
"brandVoice": "conversational, data-driven",
"brandName": "Acme"
}
}'Response (202)
{
"id": "run_abc123",
"templateId": "tpl-content-gen",
"status": "pending",
"createdAt": "2026-04-01T12:00:00.000Z",
"steps": [...]
}/api/runsList all runsReturns all runs, sorted by creation date descending. Filter by template with the templateId query param.
curl "http://localhost:3000/api/runs?templateId=tpl-lead-enrich"
/api/runs/:idGet a run by IDReturns the full run object including step logs and output. Poll this endpoint to track execution progress. Status transitions: pending → running → completed | failed.
Webhooks
Trigger workflows from external systems (CRMs, form builders, Zapier, etc.) via a simple POST webhook.
/api/webhooks/:templateIdTrigger a workflow from a webhookThe entire request body is forwarded as the run input. The template must exist. Returns a runId immediately.
Example — Typeform integration
# Point your Typeform webhook at:
POST https://helloautoflow.com/api/webhooks/tpl-lead-enrich
# Body (forwarded as run input):
{
"name": "Jane Smith",
"email": "jane@acme.com",
"company": "Acme Corp"
}Response (202)
{ "runId": "run_xyz789", "status": "pending" }Health
/healthServer health checkReturns server status plus a summary of template count and run statistics.
{
"status": "ok",
"templates": 3,
"runs": {
"total": 142,
"running": 2,
"completed": 138,
"failed": 2
}
}Error codes
| Status | Meaning |
|---|---|
| 200 | Success |
| 202 | Accepted — run started asynchronously |
| 400 | Bad request — missing or invalid parameters |
| 404 | Template or run not found |
| 500 | Internal server error |