/workflows/:id/structure
Add or edit an agent’s funnel statuses and custom lead fields. Rows are upserted by key: an unrecognized key is inserted, an existing key is updated. This endpoint never deletes — removing a status or field stays a deliberate dashboard action, so leads already sitting on a status are never orphaned.
Path Parameters
Request Body
Providestatuses, fields, or both.
statuses[] shape
fields[] shape
Responses
200 — Updated
statuses_upserted / fields_upserted are only present for the arrays you sent.
400 — Validation error
"each status needs a key and a label" or "each field needs a key and a label".