Invoke a workflow through the API
Use an existing, enabled workflow configured for API/public invocation. It must include Inkit Storage. Configure templates, destinations, and destination input mappings on the workflow before invoking it.
curl --fail-with-body --request POST \
"$INKIT_BASE_URL/api/v1/workflows-invoke" \
--header "X-Inkit-API-Token: $INKIT_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"flow_id": "flow_REPLACEWITHYOURWORKFLOWID",
"merge_parameters": {},
"custom_input_variables": {}
}'flow_id and merge_parameters are required. Optional fields include name, description, custom_data, custom_input_variables, and data_sources. Custom input variable names must exist on the workflow. The server populates destinations from the workflow configuration; do not copy the render request's destinations object into this request.
The 201 response contains the render id and applicable destination identifiers. Poll /api/v1/renders/{id} to follow the invocation. Do not assume every invocation returns a document_id; use the identifiers actually returned and the render details.
The account needs workflow-launch permission and available automation capacity. A disabled workflow, wrong invocation method, invalid variable, or unavailable connector causes an error.
The production /api/v1/workflows-invoke/batch route uses session authentication. It is not an API-key batch endpoint. Older /v1/invoke and /v1/invoke/batch examples are not the request paths in this edition.
Updated 10 days ago