Interactive workflows for Shieldbase Mini
Existing workflow API requests retain their behavior. This is an opt-in addition for WhatsApp/Telegram clients; no workflow definition changes are needed. Use the existing external API authentication headers (X-Client-ID, X-API-Key, X-Secret), and X-Tenant-ID for the intended tenant. The API key owner is the execution identity. external_user is display metadata, not authorization.
POST /external/workflows/{group_id}/runswith{"interactive":true}and optional existinginputs/external_userfields. Retain the returnedrun_id. Starting is asynchronous.- Poll
GET /external/workflows/runs/{run_id}/inputs(for example every 2 seconds, backing off on errors).waiting_inputscontains the currentqueue_id, opaquetask_token,step, and any validation message. An empty list is not completion: inspectstatusand the existing run-detail endpoint for execution errors/results. - Ask only for the returned step.
expectsisform,file,choice,message, orapproval. Forms exposeformFieldsandform_sectionswith required, conditional, options, repeated-row and file constraints. Do not invent values. Use the existing upload API and pass resulting URLs for files. Approval must be performed by its authorized approver; this endpoint does not grant approval rights. POST /external/workflows/runs/{run_id}/inputs:
answer maps exact field names to values. For repeatable forms, send the existing canonical formFields payload with row metadata. For text/choices, send a string; choices accept a returned option ID or label. File-only steps may omit answer. Submission returns HTTP 202 and continues the same run and workflow version; poll again to discover the next actual graph step.
Reuse the same command_id and identical body when retrying an uncertain response. A changed answer needs a new command. HTTP 409 means the task changed, was already answered, or needs an approver; refresh state before acting. Invalid form data remains subject to runtime validation and can return as a waiting task with a validation message. HTTP 402/503 credit/rule admission failures must not be presented as success.
The API does not interpret natural language or generate missing values: Mini maps chat messages to the returned schema. Child-workflow approval waits and non-input pauses retain their existing lifecycle; an empty input list must not cause Mini to restart a workflow. Historical failed runs are not automatically repaired or replayed by opting into this mode.
Download the Word guide