Use this playbook when an integration expects an immediate callback response and you want to prototype that response without deploying your full backend first.
{
"urlCount": 1,
"retentionHours": 24,
"authKey": "callback-sandbox-key",
"enableJSONParsing": true,
"defaultResponseCode": 200,
"defaultResponseBody": "OK",
"defaultResponseHeaders": {
"Content-Type": "text/plain"
},
"customScript": "event.statusCode = HTTP_STATUS.ACCEPTED; event.responseHeaders = { 'Content-Type': 'application/json' }; event.responseBody = { ok: true, requestId: req.requestId, method: req.method };"
}customScriptruns inside a disposable worker-isolated sandbox withevent, a safe subset ofreq,console, andHTTP_STATUSavailable.- The script can override
event.statusCode,event.responseBody, andevent.responseHeaders. - The sandbox does not expose
process,require, filesystem, or network APIs, and blockseval()/Function()string compilation. - Script timeouts and runtime failures are logged, but the request path still completes with the actor's normal response flow.
- Response headers from the script are merged over
defaultResponseHeaders.
- Slack, bot, or command callbacks that need an immediate JSON response.
- URL verification or challenge-response endpoints.
- Rapid callback prototyping before you connect a real downstream service.
- All sandboxed responses for the active webhook ID:
GET /logs?webhookId=<your-webhook-id>
- Non-default response codes produced by the sandbox:
GET /logs?webhookId=<your-webhook-id>&statusCode=202
- Response body inspection for a specific callback:
GET /logs/<log-id>
| Signal | What it usually means | What to do |
|---|---|---|
| Script error in logs | The sandbox code threw an exception | Fix the script and resend or replay the callback. |
| Script timeout log | The script exceeded the execution timeout | Reduce the script to simple response shaping and move heavy work elsewhere. |
| Unexpected body shape in the script | The sender posted non-JSON content | Remember that only application/json is auto-parsed; form-encoded or binary payloads stay raw. |
- Point the callback URL at the actor.
- Start with a minimal
customScriptthat only shapes the response body and headers. - Use
/logsand/log-streamto inspect how the caller reacted to the sandboxed response. - Use
responseDelayMsto test timeout budgets and?__status=500to test the caller's error path before production cutover. - Once the callback contract is stable, replace the sandbox with forwarding or your real receiver.