Skip to content

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.

GET/api/templatesList all templates

Query params

ParamTypeDescription
categorystringFilter 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
}
GET/api/templates/:idGet a single template

Returns the full template definition including all steps and config field schemas.

curl http://localhost:3000/api/templates/tpl-lead-enrich
GET/api/templates/:id/sampleGet sample input/output

Returns 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.

POST/api/runsStart a new workflow run

Request body

FieldTypeRequiredDescription
templateIdstringyesTemplate ID to execute
inputobjectnoWorkflow trigger data (lead, brief, ticket etc.)
configobjectnoTemplate 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": [...]
}
GET/api/runsList all runs

Returns 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"
GET/api/runs/:idGet a run by ID

Returns the full run object including step logs and output. Poll this endpoint to track execution progress. Status transitions: pendingrunningcompleted | failed.

Webhooks

Trigger workflows from external systems (CRMs, form builders, Zapier, etc.) via a simple POST webhook.

POST/api/webhooks/:templateIdTrigger a workflow from a webhook

The 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

GET/healthServer health check

Returns 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

StatusMeaning
200Success
202Accepted — run started asynchronously
400Bad request — missing or invalid parameters
404Template or run not found
500Internal server error