support@mavrtr.com

Integrations

Custom Webhook

Send a JSON POST to any HTTPS endpoint you control when a report finishes.

What it does

On report completion, Mavrtr sends a signed JSON POST to your endpoint. Use this to trigger custom backend logic — update a database, sync to your CRM, kick off an ad upload job, etc.

Setup

  1. Expose an HTTPS endpoint that accepts a JSON POST body and returns any 2xx response.
  2. In Mavrtr, go to Integrations → Custom webhook → Connect.
  3. Paste your endpoint URL. Optionally enter a shared secret.
  4. Click Connect.

Verifying the signature

If you set a shared secret, Mavrtr sends an X-Mavrtr-Signature header with every request. The value is a hex-encoded HMAC-SHA256 of the raw request body using your secret as the key. Verify it server-side:

import crypto from "crypto";

function verify(body: string, secret: string, header: string) {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(body)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(header)
  );
}
Always verify the signature if your endpoint takes any action (e.g. uploading ads). Without verification, anyone who discovers your URL can trigger your webhook.

Payload

{
  "event": "report.completed",
  "report_id": "uuid",
  "slug": "brand-product-name",
  "shopify_url": "https://example.com",
  "product_title": "Product Name",
  "status": "completed",
  "created_at": "2026-01-01T00:00:00Z",
  "pdf_url": "https://... (signed, expires 7 days)"
}

Minimum plan

Solo plan or higher.