Delete a flow
delete_flowDeletes a flow as Delete on the Automations page does. A flow that has never run on a conversation is removed for good. A flow that has already run on conversations is instead switched off and kept (its runs in progress end), because its history points at it; Archive (set_flow_archived) hides a flow without deleting it. A system flow cannot be deleted. flow_id comes from read('flows'); check the flow's steps before deleting, so a flow with something the company still needs is archived instead. Pass the same idempotency_key when retrying.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"flow_id": "<flow_id>",
"idempotency_key": "<idempotency_key>"
},
"name": "delete_flow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flow_id | Yes | ||
| idempotency_key | Yes | Your id for this operation (8-128 of A-Z a-z 0-9 . _ : -). Reuse it on every retry of the same operation; use a new one for a new operation. |