---
title: "Campaign reward diff between two trees (BETA)"
method: GET
path: "/v4/historical/campaign/{campaignId}"
tags: ["Historical"]
---

# Campaign reward diff between two trees (BETA)

`GET /v4/historical/campaign/{campaignId}`

## Request

- Base URL: `https://api.merkl.xyz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.merkl.xyz/v4/historical/campaign/{campaignId}`
- Auth: `apiKey` (a scheme the document does not define)

**Historical Campaign Diff**<p>Computes the difference in reward breakdowns for a given campaign between two merkle trees. Each tree is selected either by date (closest root on or before the date, via <code>startDate</code>/<code>endDate</code>) or by an explicit root hash (<code>startRoot</code>/<code>endRoot</code>). Returns per-recipient, per-reason breakdown diffs with non-zero changes only.</p><p><strong>Authentication:</strong> Requires a valid API key passed via the <code>Authorization</code> header.</p><p>⚠️ <strong>Beta:</strong> this endpoint is in beta. The behavior, response shape and data format may change at any time without notice. Historical data is only available from the configured cutoff date onwards.</p>

## Path parameters

- `campaignId` string, required

## Query parameters

- `chainId` union, required
  - string, numeric
  - number
- `startDate` string: ISO date or unix timestamp. One of startDate or startRoot required.
- `endDate` string: ISO date or unix timestamp. One of endDate or endRoot required.
- `startRoot` string: Start merkle root hash. One of startDate or startRoot required.
- `endRoot` string: End merkle root hash. One of endDate or endRoot required.

## Response `200`

Response for status 200

- object
  - `startRoot` object, required
    - `root` string, required
    - `timestamp` string, required
  - `endRoot` object, required
    - `root` string, required
    - `timestamp` string, required
  - `breakdowns` object[], required
    - `campaignId` string, required
    - `recipient` string, required
    - `reason` string, required
    - `rewardToken` string, required
    - `startAmount` string, required: Cumulative reward amount at startDate
    - `endAmount` string, required: Cumulative reward amount at endDate
    - `diff` string, required: Difference between endAmount and startAmount

---

[API](https://skmtc.dev/merkl/apis/merkl-api.md) - [All operations](https://skmtc.dev/merkl/apis/merkl-api/llms.txt) - [OpenAPI document](https://skmtc.dev/merkl/apis/merkl-api/revisions/60ffe2c7d887?raw)
