curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "approved",
"tool_call_ids": [
"toolu_01A9FJd3kP2mNqRs7VwXyZ4b"
]
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch"
payload = {
"action": "approved",
"tool_call_ids": ["toolu_01A9FJd3kP2mNqRs7VwXyZ4b"]
}
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({action: 'approved', tool_call_ids: ['toolu_01A9FJd3kP2mNqRs7VwXyZ4b']})
};
fetch('https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch', 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://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch",
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([
'action' => 'approved',
'tool_call_ids' => [
'toolu_01A9FJd3kP2mNqRs7VwXyZ4b'
]
]),
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://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch"
payload := strings.NewReader("{\n \"action\": \"approved\",\n \"tool_call_ids\": [\n \"toolu_01A9FJd3kP2mNqRs7VwXyZ4b\"\n ]\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://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"approved\",\n \"tool_call_ids\": [\n \"toolu_01A9FJd3kP2mNqRs7VwXyZ4b\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch")
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 \"action\": \"approved\",\n \"tool_call_ids\": [\n \"toolu_01A9FJd3kP2mNqRs7VwXyZ4b\"\n ]\n}"
response = http.request(request)
puts response.read_bodySubmit tool-call input (batch)
Answers several waiting tool calls at once with the same action, then resumes the turn. Use it instead of calling Submit tool-call input once per tool call.
Each tool call gets its own entry in results, so one of them can fail while the rest succeed. Check every entry rather than assuming the whole batch worked. The app is returned under app, not at the top level as it is on the single-tool-call endpoint.
The request stays open until the resumed turn settles, so it can take several minutes, unless the answers are kept for a turn that is still running (below). Resuming a turn consumes credits.
Set an Idempotency-Key or X-Request-ID header before you send. A network retry carrying the same value is ignored rather than resumed a second time and charged again. It comes back with an empty results array, which means nothing ran again rather than that the tool calls were rejected.
A 200 response does not mean the turn succeeded. Three cases come back as a 200.
- The turn ran and finished.
app.status.stateisreadyand the app is idle again. - The turn ran and failed.
app.status.stateiserror, andapp.status.error_sourcesays where it failed. A value ofpaywallmeans the app’s workspace has no credits left. - The answers were kept for a turn that is still running. Only with
nonblocking_cards. The request returns right away,app.status.stateis stillprocessing, and every entry inresultssucceeds, meaning its answer was kept, not yet applied. The running turn applies the answers, or they resume it once it ends. If that turn is stopped or fails first, they are dropped and the tool calls wait for an answer again.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "approved",
"tool_call_ids": [
"toolu_01A9FJd3kP2mNqRs7VwXyZ4b"
]
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch"
payload = {
"action": "approved",
"tool_call_ids": ["toolu_01A9FJd3kP2mNqRs7VwXyZ4b"]
}
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({action: 'approved', tool_call_ids: ['toolu_01A9FJd3kP2mNqRs7VwXyZ4b']})
};
fetch('https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch', 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://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch",
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([
'action' => 'approved',
'tool_call_ids' => [
'toolu_01A9FJd3kP2mNqRs7VwXyZ4b'
]
]),
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://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch"
payload := strings.NewReader("{\n \"action\": \"approved\",\n \"tool_call_ids\": [\n \"toolu_01A9FJd3kP2mNqRs7VwXyZ4b\"\n ]\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://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"approved\",\n \"tool_call_ids\": [\n \"toolu_01A9FJd3kP2mNqRs7VwXyZ4b\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/chat/submit-tool-call-input/batch")
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 \"action\": \"approved\",\n \"tool_call_ids\": [\n \"toolu_01A9FJd3kP2mNqRs7VwXyZ4b\"\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Scopes
Headers
Query Parameters
ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.
Body
What the user answered, for a tool call whose waiting_on.kind is choice or input. Its shape is the tool's: a choice question takes {"answers": [...]}, one entry per answered question with its question_index and a selected_label, selected_labels or custom_text, and a secrets request takes {"secrets": {"NAME": "value"}}. Leave it out for an approval call or a rejection, except a rejection a workspace rule caused, which may take {"workspace_rule_reason": "..."} with the rule's reason so the AI is told a rule refused it rather than the user.
Set to true when the AI may have kept working after it asked. The answer is then accepted until the user sends a new request, even after later AI replies or a stopped turn, and the AI goes on once every tool call still waiting in that turn is answered. While that turn is still running, the request returns as soon as the answer is kept, and the turn applies it. When false, an answer is refused once the user sent another message or stopped the turn. Ignored for users whose AI always stops to wait for an answer.
Response
Successful Response
The app after a batch of tool calls was answered, with one result per call.
Was this page helpful?