Skip to main content
POST
/
base
/
{baseId}
/
chat
/
execute-script
cURL
curl --request POST \
  --url https://app.teable.ai/api/base/%7BbaseId%7D/chat/execute-script \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"code":"string","input":{"property1":null,"property2":null},"integrationIds":["string"],"dependencies":[{"name":"string","version":"string"}]}'
{
  "success": true,
  "result": {},
  "logs": {
    "stdout": "<string>",
    "stderr": "<string>"
  },
  "executionTime": 123,
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

baseId
string
required

Body

application/json
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

Response

200 - application/json

Script execution result

success
boolean
required
result
object
logs
object
executionTime
number
error
string
Last modified on March 5, 2026