Skip to main content

Support Mode — Diagnostic Log REST API

REST endpoint for sending a diagnostic log snapshot to Benecaster support.

Base path: benecaster/v1/tools/support-mode


POST /benecaster/v1/tools/support-mode/send-diagnostic-log

Bundles recent benecaster_debug_log entries and plugin metadata into a gzipped snapshot and POSTs it to the Benecaster license server. Returns a reference identifier the customer can quote when contacting support.

Auth: manage_options + X-WP-Nonce

Request body: None required.

Response — success (200):

{
  "sent": true,
  "id": "DIAG-20260621-A3F9"
}

Error responses:

Code Reason
400 support_mode_off Support Mode is not currently active. The button should be disabled in the UI in this state.
400 license_key_missing No license key is stored; cannot authenticate the outbound request to the license server.
502 send_failed The license server POST failed or returned a non-2xx response.

Field Notes

id — The server-issued reference identifier. The license server may return this as any of id, log_id, or diagnostic_log_id; the plugin accepts whichever key is present and surfaces it as id in the response.

Snapshot contents — The snapshot includes: the most recent N entries from benecaster_debug_log (N controlled by the benecaster_support_mode_log_limit filter; default 200), plus plugin version, PHP version, WP version, site URL, and active bridge slugs. The raw license key is never included — the site is identified by a one-way hash. No episode content, subscriber data, or payment information is sent.

Fire-once — This endpoint never fires automatically. No data leaves the site until explicitly called.

See Also