---
title: "Submit tool-call input (batch)"
method: POST
path: "/api/apps/{app_id}/chat/submit-tool-call-input/batch"
---

# Submit tool-call input (batch)

`POST /api/apps/{app_id}/chat/submit-tool-call-input/batch`

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Answers several waiting tool calls at once with the same `action`, then resumes the turn. Use it instead of calling [Submit tool-call input](/api-reference/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. Resuming a turn consumes credits.

Set an `X-Request-ID` header before you send. A network [retry](/developers/references/app-management/get-started/retries) 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. Two cases come back as a `200`.

- **The turn ran and finished.** `app.status.state` is `ready` and the app is idle again.
- **The turn ran and failed.** `app.status.state` is `error`, and `app.status.error_source` says where it failed. A value of `paywall` means the app's workspace has no credits left.

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>

## Path parameters

- `app_id` string, required — ID of the app whose AI chat this request acts on.

## Request body

- object
  - `tool_call_ids` string[], required — IDs of the tool calls to answer, up to 100. They all get the same `action`, and a repeated ID is answered once.
  - `action` 'approved' | 'rejected', required — Whether to let these tool calls run or turn them down.

## Response `200`

Successful Response

- BatchToolCallResponse — The app after a batch of tool calls was answered, with one result per call.
  - `results` BatchToolCallResultSummary[], nullable — One entry per tool call that was answered, in the order they were processed. A repeated ID appears once, so this can be shorter than the list you sent. Empty when the request was a duplicate that had already been applied.
    - `id` string, nullable — ID of the tool call this result is for.
    - `success` boolean, nullable — Whether this tool call was answered successfully.
    - `error` string, nullable — Why this tool call could not be answered, or `null` when it succeeded.
  - `app` ChatTurnResponse — An app, with its conversation and build status.
    - `id` string, nullable — ID of the app.
    - `name` string, nullable — Display name of the app.
    - `status` AppStatusResponse — The app's current build status.
      - `state` 'ready' | 'processing' | 'error', required — Where the app is in its build lifecycle. Ready means idle with no build in progress, processing means the app is being generated or modified, and error means the last build failed. This tracks building, not publishing.
      - `details` string, nullable — Human readable note about the current state, such as what is being processed or why it failed, or `null` when there is nothing to report.
      - `request_id` string, nullable — ID of the request that last changed the status, or `null` if the status has never changed. Useful when reporting an issue.
      - `last_updated_date` string, date-time, nullable — Time the status was last updated, as a UTC timestamp in ISO 8601 format.
      - `error_source` string, nullable — Where the failure originated when `state` is `error`, or `null` otherwise. A value of `paywall` means the work was blocked because the app's workspace has no credits left.
      - `paywall_context` PaywallStatusContextResponse
        - `billing_organization_id` string, required — ID of the billing organization the paywall was evaluated against.
        - `user_id` string, required — ID of the user the paywall was evaluated for.
        - `evaluated_at` string, date-time, required — Time the paywall condition was evaluated, as a UTC timestamp in ISO 8601 format.
    - `conversation` ChatTurnConversation
      - `id` string, nullable — ID of the conversation.
      - `messages` ConversationMessageSummary[], nullable — The conversation's messages once the request finished, oldest first.
        - `id` string, nullable — ID of the message.
        - `role` 'user' | 'assistant' | 'system', nullable — Who produced the message. A `user` message is a prompt sent to the AI, an `assistant` message is the AI's reply, and a `system` message is a platform-generated note.
        - `content` string, nullable — Text of the message. Empty on assistant turns whose work is carried entirely by tool calls, and on internal diff messages.
        - `file_urls` string[], nullable — URLs of the files attached to the message, or `null` if it has none.
        - `hidden` boolean, nullable — Whether the message is internal and hidden from the chat in the app editor.
        - `checkpoint_id` string, nullable — ID of the [checkpoint](/developers/references/app-management/get-started/concepts#checkpoints) this message produced, or `null` if it produced none. Pass it as `checkpoint_id` to [Deploy an app](/api-reference/deploy-an-app) to deploy that version.
        - `tool_calls` ConversationToolCallSummary[], nullable — Tool calls the AI made on this message, or `null` on messages that made none. A call with `status` set to `waiting_for_user_input` is holding the turn open until it is answered.
          - `id` string, nullable — ID of the tool call. Pass it as `tool_call_id` to [Submit tool-call input](/api-reference/submit-tool-call-input) when `status` is `waiting_for_user_input`.
          - `name` string, nullable — Name of the tool the AI is calling.
          - `status` 'running' | 'success' | 'error' | 'stopped' | 'waiting_for_user_input', nullable — Where the tool call is. Either `running`, `success`, `error`, `stopped`, or `waiting_for_user_input`. The last one means the turn is paused until the call is answered.
          - `requires_user_input` boolean, nullable — Whether this tool call has to be approved or rejected before the turn can continue.
        - `usage` MessageUsageSummary
          - `prompt_tokens` integer, nullable — Tokens the model read for this message, including the conversation history it was given.
          - `completion_tokens` integer, nullable — Tokens the model generated for this message.
          - `credits_charged` number, nullable — Credits charged for this message, or `null` if it was not billed.
        - `metadata` MessageMetadataSummary
          - `created_date` string, date-time, nullable — Time the message was created, as a UTC timestamp in ISO 8601 format.
          - `created_by_email` string, nullable — Email of the user whose turn produced the message, or `anonymous` on a message Base44 created with no user in context.

## Other responses

- `400` — The app has unsaved sandbox changes that could not be committed first. Retry the request.
- `401` — Missing or invalid credentials.
- `403` — You don't have access to this app.
- `404` — App not found.
- `409` — The app is busy with another operation that blocks this resume.
- `422` — The request body is missing `tool_call_ids` or `action`, `action` is not `approved` or `rejected`, or more than 100 IDs were sent.
- `503` — The server is shutting down. Retry the request.

## Changes

- **2026-08-30** `394136a6cdd4` — 1 breaking
  - removed the media type `application/json` for the response with the status `422`
- **2026-08-24** `a58b38664ce9` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/idealspot/apis/base44-app-management-api/changes/api/apps/:app_id/chat/submit-tool-call-input/batch/post.md)

---

[API](https://skmtc.dev/idealspot/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/idealspot/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/idealspot/base44-app-management-api/revisions/394136a6cdd4/schema)
