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.

Path parameters
idstringrequired

The webhook id.

import { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

const { data, error } = await mb.webhooks.test('4dd369bc-aa82-4ff3-97de-514ae3000ee0');
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": "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
  "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.