Record Bin stores deleted records so they can be restored later.
The plugin now supports two runtimes:
Lambda runtime (webhook/API capable)Lambda-less runtime (dashboard delete capture only)The plugin requires the currentUserAccessToken permission.
Runtime is selected with a single toggle in the plugin config screen:
Also save records deleted from the API disabled): Lambda-less mode.Also save records deleted from the API enabled): Lambda-full mode.If you are not sure what Lambda is, keep the toggle off.
If no explicit runtime has ever been saved yet, the plugin falls back to legacy auto-detection:
Lambda-fullLambda-less| Capability | Lambda runtime | Lambda-less runtime |
|---|---|---|
| Capture dashboard deletions | ✅ | ✅ |
| Capture API deletions | ✅ | ❌ |
| Restore from Record Bin | ✅ | ✅ |
| Daily cleanup check of old bin entries (on plugin boot, no cron jobs) | ✅ | ✅ |
Cleanup is request-driven in both runtimes, not background-scheduled:
onBoot.automaticBinCleanup.timeStamp.Lambda-full mode, the plugin sends POST / to your lambda URL with event_type: "cleanup".Lambda-less mode, the plugin performs cleanup directly through the CMA API using currentUserAccessToken.We intentionally opted out of built-in cron jobs. On serverless platforms, scheduled invocations add recurring compute cost, while storage reduction versus boot-triggered cleanup is usually small. For this plugin, that tradeoff was not worth the extra cost and operational complexity.
Also save records deleted from the API disabled.In this mode, deleted records are captured through onBeforeItemsDestroy.
Also save records deleted from the API.Deploy lambda and choose one option:
Lambda URL.
https://your-app.netlify.app or just your-app.netlify.app; the plugin will prepend https:// when needed.Connect.Connected (ping successful).When connected, the plugin creates or updates a project webhook named 🗑️ Record Bin pointing to your lambda root URL.
The current user role must be allowed to manage webhooks for connect/disconnect operations.
record_body payloads are still restorable.event_type: to_be_restored) so records stay restorable after runtime switches.The plugin sends this request payload to POST /api/datocms/plugin-health:
{ "event_type": "plugin_health_ping", "mpi": { "message": "DATOCMS_RECORD_BIN_PLUGIN_PING", "version": "2026-02-25", "phase": "config_connect" }, "plugin": { "name": "datocms-plugin-record-bin", "environment": "main" }}phase values:
config_connect when the user clicks Connect on the config screen.config_mount every time the config screen is opened.finish_installation is legacy and kept for backward compatibility with older saved states.Expected successful response (HTTP 200):
{ "ok": true, "mpi": { "message": "DATOCMS_RECORD_BIN_LAMBDA_PONG", "version": "2026-02-25" }, "service": "record-bin-lambda-function", "status": "ready"}Any non-200 status, invalid JSON, timeout, network failure, or contract mismatch is treated as a connectivity error.
On connect, the plugin reconciles a managed project-level webhook (creates if missing, updates if existing):
name: 🗑️ Record Bin (legacy 🗑 Record Bin is migrated)url: connected lambda base URLevents: item.deletecustom_payload: nullheaders: {}http_basic_user: nullhttp_basic_password: nullenabled: truepayload_api_version: 3nested_items_in_payload: true