Sume run webhook: two request_ids, which one to dedupe on

Dedupe a Sume run webhook on the envelope request_id, which equals run_id and is stable across retries. Ignore payload.request_id, a correlation id.

3 min readSume
All posts

Use the top-level request_id of the webhook envelope. It equals run_id and stays the same across retries. The receipt inside payload has its own request_id, which is a correlation id for the call that produced the receipt, and you should ignore it for deduping.

Why there are two

The payload is the same receipt that GET /v1/{family}-runs/{run_id} returns in data. When you poll, its request_id is an HTTP req_... id. Inside a webhook, Sume sets it to the run id. If you wrote one parser for both transports, a second dedupe key hidden in the receipt is a trap: it differs by transport.

Where each id appears, read 2026-10-07
FieldPoll responseWebhook
Envelope request_idNot presentRun id, stable across retries
run_idIn data.idSame run id
payload.request_idHTTP req_ idRun id (correlation)
Use for dedupeNoEnvelope request_id

Ordering and outcome

Retries repeat the same request_id, so it cannot order deliveries. created_at is the time Sume built each delivery body, so use it for order. Branch on outcome, not just status: ok, degraded or error.

A canceled run sends no webhook, so your dedupe table will never see one.

A minimal rule

Insert the envelope request_id into a unique column before doing work. If the insert conflicts, return success and stop. Then process payload with the same code you use for polled receipts.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume