A dedupe table that never caught anything
You built the receiver properly. Every Cint webhook goes through a processed_events table with a unique constraint on the envelope id. Insert first, process second, swallow the conflict. Code review loved it. In six months of production that constraint never fired once.
You took that as proof the sender was well behaved. It wasn't. Until November 9, 2026, a Cint retry carried a new envelope id. Every redelivery looked like a brand-new event to your table, sailed past the constraint and ran your side effects a second time. Your code did exactly what you wrote. You just keyed it on a value that was never the same twice for a retry.
Cint fixed this on the sending side. The story doesn't end there. Plenty of other senders have the same habit, and the same changelog documents two more fields that look like dedupe or ordering keys and aren't.
What Cint's changelog actually says
Cint's Demand API changelog has three webhook entries close together, and you should read them as a set.
On October 6, 2026, Cint corrected its webhook envelope documentation. The id field is a ULID, where the docs used to say UUID. Until November 9, 2026, retries carried a new id. From then on a retry keeps the id of the original attempt. The same entry clarifies that time is when the delivery was sent. It says nothing about when the event occurred.
On October 7, 2026, every webhook request started carrying a Cint-Request-Id header. Each delivery attempt gets a new one, retries included. The changelog says outright: don't use it to de-duplicate events.
On November 6, 2026, Cint added three events you can subscribe to: project-created, project-updated and report-ready. Envelope types are versioned strings like com.cint.project.updated.v1.2025-12-18. Project events carry a version that matches the project's ETag. Cint's advice: keep the highest one you've applied per project_id and ignore anything lower or equal. For project-created, version is always 0.
So you get one stable identifier, one identifier that is unstable on purpose, a timestamp that measures the wrong thing, and one field that actually tells you about ordering. Only the first and the last belong in your consistency logic.
Event identity and attempt identity are different things
Every webhook delivery has two identities. Senders don't always say which is which.
The event identity names the fact that happened in the sender's system. This project got updated. This report finished. It gets fixed when the event is created and should never change, however many times the sender tries to deliver it.
The attempt identity names the HTTP request. It changes on every try, and it exists for tracing and support. When you tell Cint support a delivery failed, the request ID is how they find that exact attempt in their logs.
You want both. Only the event identity can be a dedupe key, though. Key on the attempt identity and every retry counts as a new event. That is what happened to anyone who keyed on Cint's envelope id before November 9.
And here's the uncomfortable bit. Until the fix, Cint didn't give you a stable event identity at all. The id behaved like an attempt identifier while the docs called it an event identifier. You couldn't have picked a better field, because there wasn't one.
Why the constraint never fired
A dedupe layer that never triggers tells you nothing on its own. Maybe nobody sends duplicates. Maybe your key can't see them. From inside the receiver you can't tell which without testing.
It gets worse because retries are rare in a healthy integration. Your endpoint answers 200 in a few hundred milliseconds almost every time, so the sender almost never retries. The duplicates that slipped through came from the bad days. A deploy that briefly returned 502. A database failover that pushed a handler past the sender's timeout. A load balancer that cut the connection after your code had already committed. Those are the moments a duplicate does the most damage, and nobody is checking whether a project-updated ran twice while they fight the outage.
The argument in /blog/webhook-idempotency-keys-duplicate-processing still holds: the duplicate you never notice is the expensive one. Here your idempotency code exists and still can't do its job.
The time field is not event time
The second trap sits in the same changelog entry. time records when the delivery was sent, so on a retry it's the moment of the retry. When the project changed is a different question, and time can't answer it.
That bites anywhere you treat time as a fact about the business event. Say you run last-write-wins on time. A retry of an old update now carries a newer timestamp than a fresh update that arrived earlier, and the stale data wins.
Freshness checks break too. If you drop events older than some threshold, a retry sent today of yesterday's event passes, and so does an event that sat in a queue on Cint's side for an hour.
Latency charts lie as well. Measure "time from Cint to our system" off time and retries make your pipeline look faster than it is, because the clock started at the send.
Treat time as delivery metadata. It's fine in logs and handy for spotting a sender-side backlog. It can't tell you what happened first.
Use version for ordering, not timestamps
For project events Cint hands you the right tool: version, matching the project's ETag. That's a sequence number owned by the resource itself. Nothing else in the envelope survives retries, parallel deliveries and backlogs as an ordering signal.
The rule from the changelog is one sentence. Per project_id, keep the highest version you've applied and ignore anything lower or equal. One conditional write covers it.
INSERT INTO project_state (project_id, version, payload, updated_at)
VALUES ($1, $2, $3, now())
ON CONFLICT (project_id) DO UPDATE
SET version = EXCLUDED.version,
payload = EXCLUDED.payload,
updated_at = now()
WHERE project_state.version < EXCLUDED.version;
A retry with the same version hits the WHERE clause and changes nothing. So does an old update that turns up late. The state write is idempotent by itself, even without event-level dedupe in front of it. There's more on out-of-order delivery in /blog/webhook-ordering-out-of-order-delivery, but the short version is that a resource version beats any clock.
Treat "equal" as a duplicate. Cint's wording says lower or equal, and that is what lets a retry of the latest update land harmlessly.
What to key on now
After November 9 the envelope id does what the documentation always claimed, so it's a sound dedupe key for new deliveries. I'd still build the receiver in two layers.
Layer one is event dedupe on the envelope id. It stops a duplicate from running side effects that aren't state writes: sending an email, kicking off a report download, posting to a channel. A version check can't protect those.
Layer two is version-guarded state, as above, for anything that mirrors Cint resources. It catches duplicates the first layer misses, replays you trigger yourself, and out-of-order arrival. An event id does nothing for ordering.
async function handleCintWebhook(req: Request, db: Db) {
const event = await verifyAndParse(req); // signature check first
const requestId = req.headers.get("cint-request-id");
log.info("cint webhook", { eventId: event.id, requestId, type: event.type });
const inserted = await db.query(
"INSERT INTO processed_events (source, event_id) VALUES ('cint', $1) ON CONFLICT DO NOTHING RETURNING 1",
[event.id]
);
if (inserted.rowCount === 0) return new Response(null, { status: 200 });
await enqueue(event); // side effects run off the request path
return new Response(null, { status: 200 });
}
Look at where Cint-Request-Id ends up. In the log line, next to the event ID. It stays out of every table and every key. When something looks off, those two values side by side tell you whether you're looking at one event attempted three times or three separate events. You will ask that question in almost every webhook incident.
Retries already stored under the old ids
If you received Cint webhooks before November 9, your processed_events table holds rows keyed on per-attempt IDs. Two things follow.
First, any duplicates from that period already ran. The fix doesn't reach back. If an outage, a slow deploy or a timeout on your side made Cint retry before the 9th, go check the side effects from that window: doubled notifications, doubled downstream jobs, doubled rows anywhere your mirrored state had no version guard.
Second, don't assume the boundary was sharp. The changelog gives a date. It gives no time of day and makes no promise about attempts already queued. An event first attempted on November 8 and retried on November 10 might carry a new id on the retry, or it might keep the old one. I wouldn't bet on either. Treat the days around the cutover as a window where the envelope id may still fail you, and lean on version for state during it.
The ULID correction deserves a look too. If you validated id as a UUID, typed a column as uuid or ran it through a UUID library, a ULID fails. It's 26 Crockford base32 characters, against a UUID's 36 characters with hyphens. What happens next depends on your stack. A rejected insert. A parse error that returns 500 and triggers yet another retry. Or, worst, a validator that quietly drops the event.
How to tell whether your dedupe key works
This part applies far beyond Cint. Any sender can ship an ID that changes per attempt, whether by design, by bug, or because a gateway in the middle re-mints it. That gateway case is covered in /blog/webhook-gateway-webhook-id-deduplication. The docs won't warn you, and a quiet unique constraint won't either.
So make the sender retry on purpose, in a test environment. Return a 500 for one specific event type, let the sender retry, then return 200. Compare what arrived:
- Did the envelope
idmatch across attempts? If not, it's an attempt identifier, whatever the docs call it. - Did the request ID change? It should.
- Did any timestamp in the payload move? Then it's a send time.
- Did your dedupe constraint fire on the retry? If it didn't, your duplicate protection is decoration.
Run this again whenever a sender publishes a changelog entry that touches the envelope. Cint's correction arrived as a documentation fix plus a date. That's exactly the kind of entry people skim past.
Log both identifiers, alert on the gap
Once you store event ID and request ID together, you can measure retry behaviour from your side. Count distinct request IDs per event ID per day. In a healthy integration that ratio sits just above 1. A jump means the sender is retrying, which usually means your endpoint was slow or failing while you thought it was fine.
Watch for the opposite too. If the ratio is exactly 1.000 for months and you know you had a bad deploy last Tuesday, then either the sender doesn't retry or your event ID changes per attempt. The second one was Cint before November 9.
Frequently asked questions
Can I use Cint-Request-Id as an idempotency key? No. Cint documents that every delivery attempt, retries included, gets a new Cint-Request-Id, and says explicitly not to use it for de-duplication. Log it next to the envelope id so you can trace a specific attempt with Cint support.
Is the envelope id safe to deduplicate on now? For deliveries after November 9, 2026, Cint says retries keep the same id, so yes. Around the cutover date, and for anything that mirrors project state, back it up with the per-project version check, which also handles out-of-order arrival.
Why is a ULID a problem if I only store the id as text? If you store it as text and compare it as a string, it isn't. It bites when a column is typed as uuid, when a validator expects the 8-4-4-4-12 hyphenated form, or when a library tries to parse it. Grep your receiver for UUID validation on that field.
Does version help with report-ready events? The changelog describes version for the project events, and for project-created it is always 0. A report-ready event carries report_id, account_id and report_type, so deduplicate it on the envelope id, or make the report download itself idempotent on report_id.
Should I sort events by the time field? Not for business logic. Cint defines time as when the delivery was sent, so a retry gets a later time than the original attempt. Use it for logging and backlog detection, and use version where the event carries one.