Webhook Documentation

    Notifications when a crawl or scan finishes.

    Last updated

    What are Webhooks?

    Webhooks send a POST request to your URL when a site crawl, a score scan or a question scan completes. You do not need to poll the API to know when work is done.

    Platform Support

    Our webhooks use a hybrid payload format that works with any platform. The payload includes both structured data for custom integrations and rich formatting for messaging platforms.

    Slack
    Use your Slack Incoming Webhook URL. Messages will display with rich formatting and blocks.
    Discord
    Use your Discord webhook URL. Discord shows the embed card.
    Custom Endpoint
    Use any HTTP endpoint. Parse the structured JSON payload for your custom integration.

    Setting up webhooks

    1. Create a public endpoint on your server. It must accept POST requests with a JSON body.
    2. In Brandop, open Settings, then the Automation tab. In the Webhooks card, enter the Webhook URL and an optional Webhook Secret.
    3. Select Test to send a test.event. Then turn on Enable Webhooks and select Save Changes.
    Owners and admins can change these settings. Webhooks are included in: Pro, Agency and Enterprise. A workspace has one webhook URL, and every event goes to it.

    Webhook Events

    Brandop sends one request when each of these operations finishes.

    EventDescription
    crawl.site.completedFires once when a full 'Crawl Site' job finishes. Payload: pagesCrawled, pagesErrored, triggeredBy (manual|scheduled|api), startedAt, finishedAt, durationMs, plus a detailed breakdown object with newPages, updatedPages, failedPages, stuckForceFailed, staleRemoved, externalFiltered, previousPageCount, newPageCount.
    scan.score.completedFires once when a Site Health scan finishes for a workspace. Payload includes scoresComputed, pagesErrored, triggeredBy, and durationMs.
    scan.questions.completedFires once when an AI visibility (questions) scan finishes. Payload includes questionsScanned, triggeredBy, and durationMs.

    test.event is sent only when you select Test in the settings. Its workspaceId and userId are test values.

    Webhook Payload

    Each request is a POST with a JSON body. The body has the event data for your own code, plus text, blocks and embeds for Slack and Discord.

    crawl.site.completed
    {
      "text": "...",
      "event": "crawl.site.completed",
      "timestamp": "2026-10-12T09:12:45.000Z",
      "workspaceId": "5d3c2b1a-0f9e-5d8c-b7a6-958473625140",
      "userId": "1a2b3c4d-5e6f-5a7b-8c9d-0e1f2a3b4c5d",
      "jobId": "e7f8a9b0-c1d2-5e3f-a4b5-c6d7e8f9a0b1",
      "status": "completed",
      "data": {
        "triggeredBy": "scheduled",
        "startedAt": "2026-10-12T09:05:36.000Z",
        "finishedAt": "2026-10-12T09:12:44.000Z",
        "durationMs": 428000,
        "pagesCrawled": 118,
        "pagesErrored": 2,
        "breakdown": {
          "newPages": 4,
          "updatedPages": 114,
          "failedPages": 2,
          "previousPageCount": 118,
          "newPageCount": 122
        }
      },
      "blocks": [ ... ],
      "embeds": [ ... ]
    }

    data always has triggeredBy (manual, scheduled or api), startedAt, finishedAt and durationMs. The counters depend on the event. breakdown comes only with crawl.site.completed.

    Delivery and retries

    HeaderValue
    Content-Typeapplication/json
    User-AgentBrandop-Webhook/1.0
    X-Webhook-EventThe event name.
    X-Webhook-SignatureHMAC SHA-256 of the raw body, as hex. Sent only when a secret is set.
    X-Webhook-Retry-Attempt0 on the first try, then 1 to 3.
    • Brandop waits up to 15 seconds for your response.
    • A 2xx response confirms delivery.
    • After a timeout, a network error, a 429 or a 5xx, Brandop tries again up to 3 times with exponential backoff.
    • Other 4xx responses are not retried.
    • Redirects are not followed. Use the final URL.

    Security & Signature Verification

    If you configure a webhook secret, we'll sign each webhook with an HMAC SHA-256 signature sent in the X-Webhook-Signature header.

    Node.js Example:
    const crypto = require("crypto");
    const express = require("express");
    
    const app = express();
    
    // Verify the raw body, before JSON parsing.
    app.post("/webhook", express.raw({ type: "application/json" }), (req, res) => {
      const signature = req.get("x-webhook-signature") || "";
      const expected = crypto
        .createHmac("sha256", process.env.WEBHOOK_SECRET)
        .update(req.body)
        .digest("hex");
    
      const valid =
        signature.length === expected.length &&
        crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
      if (!valid) return res.status(401).send("Invalid signature");
    
      const event = JSON.parse(req.body.toString("utf8"));
      res.status(200).send("OK");
      // Process event in the background (queue), after the response.
    });

    Best Practices

    • Always verify the signature if you configured a secret
    • Respond with 2xx quickly. Brandop waits up to 15 seconds.
    • Process webhook data asynchronously (use a queue)
    • Implement idempotency to handle duplicate deliveries
    • Use HTTPS endpoints for production

    Troubleshooting

    Webhook not receiving events?

    • Verify your endpoint is publicly accessible
    • Check that your server responds with 2xx status codes
    • Ensure your firewall allows incoming requests
    • Use the "Test Webhook" button to verify configuration

    Signature verification failing?

    • Ensure you're using the raw request body (not parsed JSON)
    • Check that your secret matches exactly (no extra spaces)
    • Verify you're using HMAC SHA-256 algorithm