Workflows

Start an approval run

Starts one of the flows from workflow_list_flows. Notifies the first approvers, so confirm with the user before calling it. fields must satisfy the flow’s own custom fields — read them from workflow_list_flows first. A flow with a subject type of document or email requires subject_id.

post/api/v1/rest/workflow/flows/{id}/instances

Request

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

Path parameters

idstring uuid required

From workflow_list_flows.

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

subject_type'document' | 'email' | 'none'

What the approval is ABOUT: a filed document, an archived email, or none for a form-only request. A flow does not fix this — the person starting the run chooses it, so ask the user if it is not obvious.

subject_idstring uuid

The document or message id. Required unless subject_type is none.

titlestring

Defaults to the flow’s name.

fieldsobject

Values for the flow’s custom fields, keyed by field name.

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.