Skip to content
Hoody.com

Execute scripts as HTTP endpoints via POST requests. Each script becomes an addressable endpoint that accepts arbitrary JSON payloads, enabling you to expose server-side logic over HTTP without provisioning dedicated infrastructure.

Execute a script at the given path. The request body is passed to the script as input, and the script’s return value is sent back as the HTTP response.

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

The POST variant accepts an arbitrary JSON body, which is forwarded to the script. The body schema is open — no fixed fields are required.

{
"event": "order.created",
"orderId": "ord_8f3a2b",
"amount": 4200,
"currency": "EUR"
}
{
"ok": true,
"received": {
"event": "order.created",
"orderId": "ord_8f3a2b"
}
}

The SDK exposes script execution through client.exec.execution.execute, which takes the script path as a single positional string argument. Internally it issues a GET request to the script path; the POST variant documented above additionally accepts a request body for passing data to the script.

Terminal window
curl -X POST "https://myapp-cnt7k2-exec-1.eu.containers.hoody.icu/scripts/handle-webhook" \
-H "Content-Type: application/json" \
-d '{
"event": "order.created",
"orderId": "ord_8f3a2b",
"amount": 4200,
"currency": "EUR"
}'