Update Workflow
Update a workflow's name, description, definition, or whether it is live. Only the attributes you send are changed; at least one must be present.
Enabling is where validation happens. Setting enabled to true validates the definition in full — every action, trigger and option must be known, and every required value must be set. If it does not pass, the request fails with 422, the workflow stays disabled, and nothing about it is changed. Sending a definition without enabling stores it as-is, so you can build a workflow up over several calls and only turn it on at the end.
Setting enabled to false turns a live workflow off. In-flight runs are allowed to finish; no new ones start.
definition and definition_version must be sent together. A definition replaces the stored one outright rather than being merged into it, so send the complete definition, not just the parts that changed. Every change to the definition stores a new version; the workflow's id never changes.
Only workflows belonging to account_id can be updated.
Credit Note: Updating a workflow does not consume credits.
:::info Requires the workflows:write OAuth2 scope. :::
Path parameters
The workflow ID.
Query parameters
The Leadfeeder Account ID. The Account ID can be retrieved using the List Accounts endpoint.
Request body
Example request
{
"data": {
"attributes": {
"name": "Route hot leads to Slack",
"description": "Notifies #sales whenever a company lands on the Hot Leads list.",
"enabled": true,
"definition_version": "V1",
"definition": {
"triggers": [
{
"name": "company_added_to_list",
"filters": [
{
"attribute": "list_id",
"op": "eq",
"value": "42"
}
],
"options": {
"type": "list"
}
}
],
"steps": {
"add_to_hot_leads": {
"action_name": "add_organization_to_list",
"options": {
"list_id": "42"
}
},
"notify_sales": {
"action_name": "send_company_to_slack",
"options": {
"channel": "#sales"
}
}
},
"order": {
"trigger": [
"add_to_hot_leads"
],
"add_to_hot_leads": [
"notify_sales"
]
}
}
}
}
}Response
Success
Example response
{
"data": {
"type": "workflow",
"id": "9f8b7c6d5e4f",
"attributes": {
"name": "Route hot leads to Slack",
"description": "Notifies #sales whenever a company lands on the Hot Leads list.",
"workflow_type": "company",
"version": 3,
"definition_version": "V1",
"definition": {
"triggers": [
{
"name": "company_added_to_list",
"filters": [
{
"attribute": "list_id",
"op": "eq",
"value": "42"
}
],
"options": {
"type": "list"
}
}
],
"steps": {
"add_to_hot_leads": {
"action_name": "add_organization_to_list",
"options": {
"list_id": "42"
}
},
"notify_sales": {
"action_name": "send_company_to_slack",
"options": {
"channel": "#sales"
}
}
},
"order": {
"trigger": [
"add_to_hot_leads"
],
"add_to_hot_leads": [
"notify_sales"
]
}
},
"disabled_at": "2026-08-01T10:00:00Z",
"created_at": "2026-07-20T09:15:00Z",
"updated_at": "2026-08-01T10:00:00Z",
"app_url": "https://app.leadfeeder.com/z/123456/workflows/9f8b7c6d5e4f"
},
"relationships": {
"created_by": {
"id": "123456"
},
"disabled_by": {
"id": "123456"
},
"run_stats": {
"type": "workflow_run_stats",
"id": "9f8b7c6d5e4f",
"attributes": {
"triggered_count": 128,
"failed_count": 3,
"last_run_at": "2026-08-05T14:22:31Z"
}
},
"errors": [
{
"type": "workflow_error",
"id": "7d3f1a90c2b4e6f8",
"attributes": {
"step_id": "notify_sales",
"error_code": "connection_unauthorized",
"error_message": "The Slack connection is no longer authorised.",
"count": 12,
"first_seen_at": "2026-07-29T08:03:00Z",
"last_seen_at": "2026-08-05T14:22:31Z"
}
}
]
}
},
"meta": {
"request_id": "cf054205-dd8c-4473-8689-07c30fe0789f"
}
}