Workflows

Change an approval flow

Changes a flow: send ONLY the parts that change. fields and steps each replace the whole list — read the flow with workflow_get_flow first and send every field/step that should remain: an existing field keeps its key, an existing step is either sent in full with its id, or kept untouched with { keep_step: "<id>" } (always do that for automated steps). active: true switches the flow on — it starts asking people, and an automatic trigger starts on its own. The person approves the change before it is saved.

patch/api/v1/rest/workflow/flows/{id}

Request

  • Base URL: https://api.custodo.ai
  • URL: https://api.custodo.ai/api/v1/rest/workflow/flows/{id}
  • Auth: HTTP bearer

Path parameters

idstring uuid required

From workflow_list_flows with scope authoring, or workflow_create_flow.

Headers

X-Tenant-Idstring uuid

The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.

Request body

namestring
descriptionstring nullable
trigger'manual' | 'document_ready' | 'document_typed' | 'email_received' | 'crm_deal_won' | 'spese_report_submitted'
document_type_idstring uuid nullable
trigger_configobject

The automatic trigger’s filter: document_* {titleContains}; email_received {mailboxIds, subjectContains, fromContains, toContains, requireAttachments, pec: any|only|exclude}; crm_deal_won {pipelineIds, minAmount}; spese_report_submitted {minTotalCents}. Omit for none — but ALWAYS narrow email_received, or every synced message opens a run.

priority'low' | 'normal' | 'high'
activeboolean

true switches the flow on, false off. Omit to leave it as it is.

Response

Done. data is the tool’s own answer.

oktrue required
dataunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.