---
title: "POST /base/{baseId}/chat/execute-script"
method: POST
path: "/base/{baseId}/chat/execute-script"
tags: ["chat"]
---

# POST /base/{baseId}/chat/execute-script

`POST /base/{baseId}/chat/execute-script`

Execute TypeScript code in sandbox for chat tools

## Path parameters

- `baseId` string, required

## Request body

- object
  - `code` string, required — TypeScript code to execute
  - `input` object — Input parameters for the script
  - `integrationIds` string[] — Integration IDs to inject into script context
  - `dependencies` object[] — NPM dependencies to install
    - `name` string, required
    - `version` string, required

## Response `200`

Script execution result

- object
  - `success` boolean, required
  - `result` object
  - `logs` object
    - `stdout` string, required
    - `stderr` string, required
  - `executionTime` number
  - `error` string

---

[API](https://skmtc.net/teable/apis/teable-app.md) · [All operations](https://skmtc.net/teable/apis/teable-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/teable/teable-app/versions/7515f3b33d79/schema)
