Skip to content

Execute scripts as HTTP endpoints via POST requests. The Script Execution API lets you run server-side scripts by making a POST request to the script’s path, supporting Next.js-style routing for dynamic and catch-all routes.

Execute a script with POST data. The script receives the POST body and returns the result in the response.

NameInTypeRequiredDescription
pathpathstringYesScript path (supports Next.js-style routing)

This endpoint does not define a request body schema. Any JSON payload sent will be forwarded to the script.

{
"success": true,
"output": "Script executed successfully",
"data": {
"result": "processed"
}
}
const result = await client.exec.execution.execute({
path: "scripts/handle-webhook",
});