> ## Documentation Index
> Fetch the complete documentation index at: https://docs.queryful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook

> Send scheduled report rows to your own endpoint as JSON, signed so you can check they came from Queryful.

Choose **Webhook** under **Send to** on a schedule to send each run to a URL you control, as JSON. It's the channel for wiring reports into your own systems, a data warehouse, or a no-code tool like Zapier or Make.

## Setup

Enter your endpoint's **Endpoint URL**. It must be an `https://` address on the public internet: addresses inside a private network are refused, because Queryful's servers send the request. On each run Queryful sends a `POST` with `Content-Type: application/json`, and any `2xx` response counts as delivered.

Once the schedule is saved, choose **Generate signing secret** so your endpoint can check a request came from Queryful (see [Verifying requests](#verifying-requests)). The secret is shown once, so copy it then. If you lose it, regenerate it and update your endpoint.

**[Send now](https://docs.queryful.app/user-guide/schedules.md#send-now)** works for webhook schedules, so you can fire a test delivery on demand.

## Payload

The body carries the schedule, when the run was generated, and the report:

```json theme={null}
{
  "schedule": { "id": 21, "name": "Weekly sales", "frequency": "weekly", "createdBy": "Jane Doe" },
  "generatedAt": "2026-11-21T09:00:00.000Z",
  "reports": [
    {
      "type": "saved",
      "name": "Net sales by vendor",
      "rowCount": 4,
      "columns": [
        { "key": "vendor", "label": "Vendor", "type": "text", "format": null },
        { "key": "orders", "label": "Orders", "type": "numeric", "format": "number" },
        { "key": "net_sales", "label": "Net sales", "type": "numeric", "format": "currency" }
      ],
      "dataFormat": "json",
      "data": [{ "vendor": "Acme", "orders": 12, "net_sales": 1480.5 }]
    }
  ]
}
```

`reports` is an array, so a schedule that sends several reports in future can add entries without changing the shape. Each report's `columns` describe its fields: `type` is `text` or `numeric`, and `format` carries the finer type (`currency`, `percent`, `date` and so on), or `null` for a plain dimension.

## Inline data or a linked file

`dataFormat` on each report tells you where the rows are, so a receiver never has to inspect the keys:

* **`json`** means the rows are inline in `data`, an array of objects.
* **`jsonl`** means the report was too large to send inline (over 1 MB), so `data` is replaced by **`dataUrl`**: a link to the full report as JSON Lines, one JSON object per line. Fetch it to read the rows.

```js theme={null}
const rows =
  report.dataFormat === "json"
    ? report.data
    : await fetchJsonl(report.dataUrl);
```

## Verifying requests

If the schedule has a signing secret, each request carries an **`X-Queryful-Signature`** header: the HMAC-SHA256 of the raw request body, hex-encoded, keyed with your secret. Recompute it and compare before trusting the payload:

```js theme={null}
import { createHmac, timingSafeEqual } from "node:crypto";

const expected = createHmac("sha256", process.env.QUERYFUL_WEBHOOK_SECRET)
  .update(rawBody) // the raw request body, before JSON parsing
  .digest("hex");
const received = request.headers["x-queryful-signature"] ?? "";
const valid =
  received.length === expected.length &&
  timingSafeEqual(Buffer.from(received), Buffer.from(expected));
```

Sign the raw request body bytes, before any JSON parsing, so they match what Queryful signed.

## When it stops working

If your endpoint answers with anything other than a `2xx`, or can't be reached, the run is recorded as not delivered in [run history](https://docs.queryful.app/user-guide/schedules/history.md), with the status your endpoint returned.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.