API Reference

Test Webhook

POST /webhooks/:id/test — send a test event to a webhook endpoint.

POST/webhooks/:id/test

Sends a synchronous test delivery to the webhook's endpoint. MailBlastr fires a test event regardless of the webhook's subscribed event types and returns the live result — including the HTTP status your endpoint responded with. No retry is queued on failure, and a test never affects the endpoint's health (its failure_count, last-delivery status, or the 50-failure auto-disable) — it is recorded in the delivery history only.

Path parameters
idstringrequired

The webhook id as returned by Create Webhook or List Webhooks — a numeric string (e.g. 17), not a UUID. A non-numeric id returns not_found (404).

import { Mailblastr } from 'mailblastr';

const mb = new Mailblastr('mb_xxxxxxxxx');

const { data, error } = await mb.webhooks.test('17');
console.log({ data, error });

Response

Returns a webhook_test object. ok is true when your endpoint responded with a 2xx status. status is the HTTP status code your endpoint returned. error is present only when delivery failed (network error or non-2xx response).

{
  "object": "webhook_test",
  "id": "17",
  "ok": true,
  "status": 200
}
A failed test — e.g. "ok": false, "status": 404, "error": "HTTP 404" — means your endpoint is reachable but returned a non-2xx response. Check your server logs and ensure the endpoint accepts POST requests with a Content-Type: application/json body.