Skip to main content

Workflows API

Create, manage, and trigger document automataion workflows via the API.

List Workflows

GET /api/workflows

Returns all workflows owned by the authenticated user.

Response: 200 OK

[
{
"publicId": "wrk_01j5abc123",
"name": "Auto N4 Generator",
"status": "ACTIVE",
"triggerType": "webhook",
"createdAt": "2026-02-10T09:15:00",
"updatedAt": "2026-04-01T11:30:00"
}
]

Get Workflow

GET /api/workflows/{publicId}

Returns the full workflow configuration including the node/edge graph.

Response: 200 OK

{
"publicId": "wrk_01j5abc123",
"name": "Auto N4 Generator",
"status": "ACTIVE",
"webhookUrl": "https://api.formstamper.com/api/workflows/wrk_01j5abc123/webhook",
"createdAt": "2026-02-10T09:15:00",
"updatedAt": "2026-04-01T11:30:00",
"stepsJson": "{\"nodes\":[...],\"edges\":[...]}"
}

Create Workflow

POST /api/workflows

Create a new workflow.

Request Body:

{
"name": "Auto N4 Generator",
"triggerType": "webhook",
"stepsJson": {
"nodes": [
{
"id": "trigger-1",
"type": "webhookTrigger",
"position": { "x": 100, "y": 200 },
"data": {}
},
{
"id": "template-1",
"type": "templateNode",
"position": { "x": 400, "y": 200 },
"data": {
"templateId": "tpl_01j5abc123",
"fieldMappings": {
"TO_TenameName": "event.tenant_name",
"RentalUnitAddress": "event.address"
}
}
}
],
"edges": [
{
"id": "e1",
"source": "trigger-1",
"target": "template-1"
}
]
}
}

Response: 200 OK — Returns the created workflow with its generated webhook URL.


Update Workflow

PUT /api/workflows/{publicId}

Update a workflow's configuration, status, or node graph.

Request Body:

{
"name": "Updated Workflow Name",
"status": "ACTIVE",
"stepsJson": {
"nodes": [...],
"edges": [...]
}
}

Response: 200 OK


Workflow Statuses

StatusDescriptionAccepts Webhooks
DRAFTUnder developmentEvents stored, not processed
ACTIVELive and processing
DISABLEDManually paused
ERRORHas errors

Change status by including "status": "ACTIVE" in the update request body.