API documentation
Use the /executions endpoint to submit JavaScript code for execution on api.jsrunner.cloud and receive the real backend response, including return value, console output, runtime, duration, and error details.
This endpoint is intended for Make.com and other integrations that need to send JavaScript code to JSRunner, execute it in the cloud, and retrieve the result in the exact structure returned by the Rust backend.
POST /executionsBase URL example
https://api.jsrunner.cloud/executionsUse a user API key in the Authorization header.
Authorization: Bearer YOUR_API_KEYContent-Type: application/json
Authorization: Bearer YOUR_API_KEYExample
{
"code": "4 + 2",
"collect_console": true,
"timeout": 5000
}| Field | Type | Required | Description |
|---|---|---|---|
| code | string | yes | JavaScript code to execute. |
| collect_console | boolean | no | When true, JSRunner captures console.log output into the response. |
| timeout | number | no | Execution timeout in milliseconds. The backend clamps it to the server-side maximum. |
Success example
{
"status": "success",
"return_value": 6,
"console": "",
"duration_ms": 123,
"runtime": "native-node-vm",
"error": null
}| Field | Type | Description |
|---|---|---|
| status | string | Execution status, either success or error. |
| return_value | any | Returned value from the executed JavaScript. If the runtime emits JSON, it is returned as parsed JSON. |
| console | string | Collected console output. Usually empty unless collect_console is enabled. |
| duration_ms | number | Execution duration in milliseconds. |
| runtime | string | Current backend runtime identifier. Right now this is native-node-vm. |
| error | string | null | Error message if execution failed. |
{
"status": "error",
"return_value": null,
"console": "",
"duration_ms": 17,
"runtime": "native-node-vm",
"error": "Unexpected token ';'"
}collect_console during scenario development{
"code": "4 + 2",
"collect_console": true,
"timeout": 5000
}code, optional collect_console, and optional timeout./executions using an API key, not the regular session token flow.curl -X POST "https://api.jsrunner.cloud/executions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"code": "4 + 2",
"collect_console": true,
"timeout": 5000
}'