Skip to content

POST /{path}

Execute a script by its path. The path supports Next.js-style routing, so nested directories map directly to URL segments (for example, scripts/handle-webhook is invoked at /scripts/handle-webhook).

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

This endpoint does not define a request body schema. Send a JSON payload of any shape; the script receives it as the raw request body.

Terminal window
curl -X POST "https://api.example.com/scripts/handle-webhook" \
-H "Content-Type: application/json" \
-d '{
"event": "order.created",
"orderId": "ord_8f3a2b1c"
}'

Script executed successfully. The response body has no defined schema; the script controls its own output.