Back to Blog
Integration

EmailConnect's Webhook Payload v2 Is Live. Your Replays Still Speak v1.

On November 9, 2026, EmailConnect.eu put schemaVersion 2 on every new webhook delivery. Messages stored before the switch still replay in the old shape, with no version field at all. Why a payload's schema belongs to the event, not the calendar, and how to keep both parsers honest.

WebhookVault Team · Webhook Infrastructure Experts10 min read
Silver laptop at an angle on a light desk, its screen showing a dark code editor with a file tree and indented code, a black smartphone lying beside it and the edge of a second screen behind

A version number only some deliveries carry

You shipped the v2 parser the week before the cutover. The cutover came and went, every new delivery said "schemaVersion": 2, and the dashboards stayed green. Two weeks later someone replays a message from late October to sort out a support ticket. It arrives without schemaVersion and with the old attachment fields. Your handler, tidied up after the switch, reads attachments[0].status as undefined and files the email as if it had no usable attachments.

Nothing failed. The handler returned 200. The data is just wrong.

EmailConnect.eu receivers are in exactly this position right now, and EmailConnect is hardly the only sender that can put you there. Any sender that versions its payloads and also lets you replay stored events will hand you two schemas on one endpoint for as long as the old events exist. Most receivers are written as if a cutover date splits the world in two. It doesn't.

What EmailConnect changed on 9 November

EmailConnect.eu turns inbound email into webhook deliveries. On October 19, 2026 it announced a payload change for Monday, November 9, between 08:00 and 09:00 UTC. On November 9 it posted that payload v2 was live. Three things moved.

Attachments were restructured. Each entry lost storage, uploadType, excluded and excludeReason. The replacements are status, always present, reason, which shows up when a file was excluded or failed, and inline, also always present.

Inline images changed shape. An image shown in the message body now arrives once, as an attachment with inline: true, and the HTML keeps the sender's original cid: reference. The base64 copy is gone.

Spam data got smaller. spam.report was removed, and spam.symbols carries the same information.

Every new delivery carries "schemaVersion": 2 at the top level. Then comes the sentence that should change how you write the receiver: messages stored before the change replay in the old format, without schemaVersion.

Earlier, on October 13, EmailConnect started sending a webhook-id header on every delivery, and on October 22 signing became available on all plans.

The replay sentence is the one that matters

Skim the changelog and you walk away with a migration task: update the parser before November 9, done. The replay sentence makes it a permanent requirement. The old format was never retired. It was frozen, and it comes back whenever an old message is replayed.

For a sender, that's the honest choice. Rewriting stored messages into a new schema means re-deriving data that may no longer exist, like the base64 inline copies v2 doesn't produce. Replaying what was stored, as stored, is safe on their side. The compatibility work just moves to you.

And replays are what you reach for during an incident. Your endpoint was down, so you replay the batch you missed. Old v1 payloads come back exactly when you are under pressure and least likely to remember the old parser was deleted three weeks ago.

The schema belongs to the event, not the calendar

The model behind the bug goes like this: before the cutover we got v1, after it we get v2. Time decides the shape. That's wrong both ways.

Delivery time and event time are different things. A replay happens today, but the event happened in October. A message that failed just before 08:00 UTC on November 9 and got retried after 09:00 might arrive in whatever shape it was stored in. Even a sender with no replay feature has a retry backlog, and as we covered in the post on moving endpoints, retries already in flight ignore whatever changed in the meantime.

So the useful question is what shape this payload has. The date tells you nothing. EmailConnect gives you a field on new deliveries and no field on old ones. Both are signals.

In the Shopify Events change a field went from array to object with no marker at all. EmailConnect labelled the new shape, which is better, but the label only helps if your code reads it on every delivery, permanently.

Treat a missing version as version 1, out loud

The lazy way is if (payload.schemaVersion === 2) parseV2() else parseV1(). It works today. The day EmailConnect ships version 3, every v3 delivery falls through to the v1 parser, finds none of the fields it expects, and produces empty attachments without complaint. Same silent failure, one version later.

The correct way names every case. No field means version 1, because the sender said so. Version 2 means version 2. Anything else is a version you haven't seen, and guessing is off the table.

type RawPayload = Record<string, unknown> & { schemaVersion?: unknown }

function detectSchemaVersion(payload: RawPayload): 1 | 2 | 'unknown' {
  if (!('schemaVersion' in payload)) return 1
  if (payload.schemaVersion === 2) return 2
  return 'unknown'
}

Note the in check. A payload with "schemaVersion": null differs from one with no field at all, so don't collapse them. If the sender ever sends null, you want to hear about it. Filing it under v1 hides it.

Normalise at the edge, then forget the wire format

Once you know the version, convert the payload into your own internal model right away, in one place. Your business logic should contain zero if (version === 1) checks.

The attachment mapping below uses only what the changelog states. In v2, reason appears when a file was excluded or failed, so its presence is the skip signal. In v1, excluded and excludeReason carried the same idea. Inline images in v1 lived as base64 copies inside the HTML and were never flagged attachments, so a v1 attachment is never inline in your model.

interface Attachment {
  skipped: boolean
  skipReason?: string
  inline: boolean
  providerStatus?: string
}

function normaliseAttachmentV1(a: Record<string, any>): Attachment {
  return {
    skipped: a.excluded === true,
    skipReason: a.excludeReason ?? undefined,
    inline: false,
  }
}

function normaliseAttachmentV2(a: Record<string, any>): Attachment {
  return {
    skipped: a.reason !== undefined,
    skipReason: a.reason ?? undefined,
    inline: a.inline === true,
    providerStatus: a.status,
  }
}

Keep providerStatus as a raw string and log it. Look at which values actually show up before you branch on them. Handle spam the same way: read spam.symbols in both versions, and fall back to spam.report only on the v1 path, where it still exists.

The rest of your system now deals with one shape. When version 3 arrives you add one function and one case.

Where the v1 path breaks without a sound

A field that disappears usually throws somewhere, so you notice. The trouble comes from data that moved, or a field that still exists but means something else.

Inline images are the clearest case. In v1 the HTML body held base64 copies of inline images. In v2 the HTML keeps cid: references and the image arrives once as an attachment with inline: true. If you render or archive the HTML, the v2 path has to resolve cid: references against the attachment list. The v1 path has nothing to resolve. Push a replayed v1 message through v2 rendering and you'll probably get away with it. Push a v2 message through v1 logic and every inline image in your archive becomes a broken reference.

Attachment counts are the other trap. In v2 an inline image is an attachment, so a logo in the signature now counts as a file. Let your model ask for non-inline attachments explicitly.

None of this raises an error. You get plausible records that are wrong. That's why the version branch has to be explicit and tested, never inferred from whichever fields happen to be there.

Unknown versions go to quarantine, not to a 500

The instinct with 'unknown' is to reject it with a 4xx or 5xx and let it retry after you ship a fix. Think that through.

A retrying sender hammers you with every new delivery in the unknown shape. Some senders switch an endpoint off after enough consecutive failures, which we went through in the post on disabled endpoints. One surprise version bump turns into an outage for all your email intake.

Accept it. Verify the signature, store the raw body and headers in a quarantine table, return 2xx, and alert loudly. Once the parser for the new version ships, reprocess the quarantine from your own store. You decide the timing, and the sender's retry window stops mattering.

async function handleDelivery(rawBody: string, headers: Headers) {
  verifySignature(rawBody, headers)
  const payload = JSON.parse(rawBody) as RawPayload
  const version = detectSchemaVersion(payload)

  if (version === 'unknown') {
    await quarantine.insert({ rawBody, headers: Object.fromEntries(headers) })
    alerts.raise('emailconnect: unknown schemaVersion', { value: payload.schemaVersion })
    return new Response(null, { status: 202 })
  }

  const message = version === 1 ? normaliseV1(payload) : normaliseV2(payload)
  await process(message)
  return new Response(null, { status: 200 })
}

Your own replay store has the same problem

EmailConnect isn't the only system replaying old payloads at you. You do it too.

If you keep raw webhook bodies anywhere, whether a dead-letter queue, an inspection log, a reprocessing table or a bucket of failed deliveries, you hold a mixed-version archive. Reprocess a dead-letter entry from October and it's a v1 payload, whether or not EmailConnect ever replays anything. A receiver that only handles v2 breaks on its own backups.

Keep the raw bodies, not your parsed model. A raw body plus a version detector can always be reprocessed, while a model parsed by an older version of your code may have dropped the field your new code needs. Record the detected version next to each stored body, so "how many v1 payloads are still in our queues" is a query and not a guess. And if you keep those bodies for long, remember they are copies of someone else's data, with retention questions of their own.

Fixtures for both shapes, and a test for the next one

You need three fixtures. Teams usually skip the third.

First, a captured v1 payload from before November 9. If you didn't keep one, replay an old message to a test endpoint now and save it while the sender still has the stored messages.

Second, a captured v2 payload, ideally one with an inline image and one with an excluded attachment, so inline and reason both get exercised.

Third, a synthetic payload with "schemaVersion": 3. The test asserts it lands in quarantine and nothing downstream runs. This is what stops the lazy else branch from creeping back in during a refactor.

Run the same assertions on the normalised v1 and v2 output for an equivalent message. Different skipped or inline values mean a mapping bug.

When you can delete the v1 parser

Later than you think. Decide it from data, not from a date.

Two things keep v1 alive. One is the sender's store of pre-change messages, replayable as long as it exists. The other is your own stored raw bodies. You control the second. For the first, the changelog doesn't say how long old messages stay replayable, so assume they stay as long as EmailConnect keeps them.

Instrument the detector and emit a counter per version. When v1 has sat at zero for longer than any replay or retry window you can name, and your archives hold no v1 bodies, the v1 path is dead code. Until then it's the code that runs during your next incident. Versioning strategy usually gets written from the sender's side. From the receiving end it comes down to this: any version you ever accepted can show up again tomorrow.

Frequently asked questions

Does a replayed message keep its original webhook-id? The changelog doesn't say, and it matters for deduplication. EmailConnect added the webhook-id header on October 13, so messages stored before that date may have none. Replay a test message twice and compare the headers before you use webhook-id as an idempotency key for old events.

Can I infer the version from the fields instead of reading schemaVersion? You can, but don't. Field sniffing works until a later version reuses a field name or adds one that overlaps an old shape, and then it misclassifies without telling you. Use the explicit marker, treat its absence as version 1 because the sender documented that, and send anything else to quarantine.

Should I return an error for a payload version I do not recognise? Usually not. An error invites retries, and enough consecutive failures can get your endpoint disabled by the sender. Verify the signature, store the raw body, return a 2xx, alert, and reprocess from your own store once the new parser ships.

Do I need to convert my stored v1 payloads to v2? No. Converting means inventing data the old shape never had, such as the inline flag, and you lose the original. Keep raw bodies as they arrived, record their detected version, and let the normaliser handle each version when it reads them.

Related posts