Skip to main content
POST
/
form
/
human_input
/
{form_token}
Submit Human Input Form
curl --request POST \
  --url https://{api_base_url}/form/human_input/{form_token} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "inputs": {
    "comment": "Looks good to ship"
  },
  "action": "approve",
  "user": "abc-123"
}
'
import requests

url = "https://{api_base_url}/form/human_input/{form_token}"

payload = {
"inputs": { "comment": "Looks good to ship" },
"action": "approve",
"user": "abc-123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({inputs: {comment: 'Looks good to ship'}, action: 'approve', user: 'abc-123'})
};

fetch('https://{api_base_url}/form/human_input/{form_token}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_base_url}/form/human_input/{form_token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'inputs' => [
'comment' => 'Looks good to ship'
],
'action' => 'approve',
'user' => 'abc-123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{api_base_url}/form/human_input/{form_token}"

payload := strings.NewReader("{\n \"inputs\": {\n \"comment\": \"Looks good to ship\"\n },\n \"action\": \"approve\",\n \"user\": \"abc-123\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{api_base_url}/form/human_input/{form_token}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inputs\": {\n \"comment\": \"Looks good to ship\"\n },\n \"action\": \"approve\",\n \"user\": \"abc-123\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{api_base_url}/form/human_input/{form_token}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inputs\": {\n \"comment\": \"Looks good to ship\"\n },\n \"action\": \"approve\",\n \"user\": \"abc-123\"\n}"

response = http.request(request)
puts response.read_body
{}

Authorizations

Authorization
string
header
required

API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with Bearer. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.

Path Parameters

form_token
string
required

Access token for the paused form, returned in the human_input_required event from Run Workflow in streaming mode.

Body

application/json
inputs
object
required

Recipient-supplied values keyed by input output_variable_name.

action
string
required

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).

Maximum string length: 20
Pattern: ^[A-Za-z_][A-Za-z0-9_]*$
user
string
required

End-user identifier for the submitter.

Response

Form submitted successfully. The response body is an empty object.

The response is of type object.