# POST /v4/reallocations/report/{campaignId}/walk

_Merkl API_

> Start a reallocation walk job (BETA)

**Start a Reallocation Walk**
<p>Starts a background walk of the historical merkle trees and returns a job ID immediately. Poll <code>GET /v4/reallocations/jobs/{jobId}</code>; once <code>status</code> is <code>completed</code>, <code>result</code> holds the report with each sender's <code>settled</code> amount and <code>stagedAt</code> waves filled in.</p>
<p>Amounts come from each marker's <strong>positive jumps</strong> between consecutive roots — a marker goes <code>0 → staged → 0</code>, possibly over several waves, so only the rises are staging events.</p>
<p><strong>No window to position.</strong> It covers the campaign's whole root history: <code>settled + returned + inFlight</code> only ever grows, so equal endpoints prove nothing happened between them and the walk bisects straight to the roots where a wave landed. Cost is O(waves × log roots) tree reads rather than one per root — a few dozen for a typical campaign, however long the chain's history.</p>
<p>A walk that cannot account for every wave returns <code>walk.complete: false</code> with an <code>incompleteReason</code>, and omits per-sender <code>settled</code> rather than reporting an understated amount as exact. That happens if it exhausts its snapshot budget, if the markers disagree with the staged total (a reallocation leaf edited outside the producer), or if the tree service holds no tree for the older roots a wave landed in.</p>
<p><strong>Partly converted history.</strong> The tree service serves the roots its backfill has converted, so the walk covers the newest run of roots it can read and says in <code>incompleteReason</code> how many older ones it had to drop. When that run still starts before the campaign's first wave the report is exact all the same, and <code>walk.oldestRoot</code> names the oldest tree actually read.</p>
<p>The job ID is the campaign, so repeating a request joins the running or finished job instead of starting a second walk — that dedup runs before any tree read. A failed job is retried. Job state lives in Redis for 30 minutes.</p>
<p><strong>Authentication:</strong> Requires either a valid <code>x-api-key</code> header or the back-office bearer secret.</p>
<p>⚠️ <strong>Beta:</strong> this endpoint is in beta. The behavior, response shape and data format may change at any time without notice.</p>

### Path parameters

- `campaignId` (string) _(required)_

## Responses

- **200** Response for status 200

## Example request

```bash
curl -X POST "https://api.merkl.xyz//v4/reallocations/report/{campaignId}/walk" \
  -H "x-api-key: YOUR_API_KEY"
```