POST/form/human_input/{form_token}

Submit Human Input Form

Available for: Chatflow, Workflow apps.

Submits the recipient's response to a paused Human Input form. On acceptance the workflow resumes; follow the resumed run via Stream Workflow Events. Requires web app delivery.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
form_tokenstringrequired
Access token for the paused form, returned in the `human_input_required` event from the Run Workflow or Send Chat Message endpoint in streaming mode.
actionstringrequired
ID of the action button the recipient selected. Must match one of the `id` values from the form's `user_actions` list (returned by [Get Human Input Form](/en/api-reference/human-input/get-human-input-form)).
inputsobjectrequired
Submitted values keyed by each input's `output_variable_name`. Paragraph and select inputs take a string; a `file` input takes one file mapping; a `file-list` input takes an array of file mappings. A file mapping is `{transfer_method: local_file, upload_file_id, type}` or `{transfer_method: remote_url, url, type}`, where `type` is one of the field's `allowed_file_types`. For `local_file`, `upload_file_id` is the `id` from [Upload File](/en/api-reference/files/upload-file). Use a consistent `user` across the run, upload, and submit.
userstringrequired
End-user identifier, defined by your app and unique within it. Service API and web app user IDs are separate, even when identical. See [End User Identity](/en/api-reference/guides/end-user-identity).

4 status codes
200Form submitted successfully. The response body is an empty object.
400- `bad_request` : Form recipient type is invalid. - `invalid_form_data` : Submission failed validation against the form definition.

2 documented failures

  • bad_request

    Form recipient type is invalid

    bad_request

  • invalid_form_data

    Missing required inputs: feedback

    invalid_form_data

404`not_found` : Form not found.

One documented failure

  • not_found

    Form not found

    not_found

412- `human_input_form_submitted` : Form already submitted. Forms are one-shot; the first response wins regardless of which user submits it. - `human_input_form_expired` : The form's expiration time passed before submission arrived.

2 documented failures

  • human_input_form_expired

    This form has expired, form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890

    human_input_form_expired

  • human_input_form_submitted

    This form has already been submitted by another user, form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890

    human_input_form_submitted

Error handling

A 400 is returned: - bad_request : Form recipient type is invalid.

  • invalid_form_data : Submission failed validation against the form definition. A 404 is returned: not_found : Form not found. A 412 is returned: - human_input_form_submitted : Form already submitted. Forms are one-shot; the first response wins regardless of which user submits it.
  • human_input_form_expired : The form's expiration time passed before submission arrived.