---
title: "Email updated"
method: POST
path: "email.updated"
tags: ["Webhook Events"]
---

# Email updated

`POST email.updated` (webhook)

A message in the mailbox changed: it was read or marked unread, starred or flagged, labelled or categorized, archived, trashed or moved. Covers the Inbox, and Sent on Gmail. A change can arrive more than once; key on `email.messageId`.

Gmail reports exactly what changed in `changes`. Outlook reports the message as it is now, with `changes: null`. A message deleted for good fires `email.deleted` instead. IMAP mailboxes do not send it.

## Payload

- WebhookPayloadEmailUpdated: Webhook payload for email.updated. Gmail sends `changes`; Outlook sends the message as it is now and `changes: null`.
  - `id` string, required
  - `profiles` object[]: The profiles this event belongs to, each with the externalId you set on it (null when none is set). Use it to route the event to your tenant without storing Zernio profile ids. Present on every event tied to a profile, absent on events that belong to none. Events spanning several profiles (a post published to accounts of different profiles) list each once.
    - `id` string, required
    - `externalId` string, nullable, required
  - `test` boolean: Always true when present: only a sample sent by POST /v1/webhooks/test with an event carries it. Real deliveries never do.
  - `event` 'email.updated', required
  - `account` object, required
    - `accountId` string
    - `profileId` string
    - `platform` string
    - `username` string
    - `displayName` string, nullable
  - `email` object, required: The message as it is after the change.
    - `messageId` string
    - `threadId` string, nullable
    - `folder` string, nullable: `inbox`, `sent`, `archive`, `trash`, `spam`, `drafts`, or the provider folder id for any other folder.
    - `unread` boolean, nullable
    - `starred` boolean, nullable: Gmail star or Outlook flag.
    - `labels` string[], nullable: Gmail user label ids or Outlook category names.
  - `changes` object, nullable, required: What changed. Gmail only; null on Outlook.
    - `unread` boolean
    - `starred` boolean
    - `folder` string
    - `labelsAdded` string[]
    - `labelsRemoved` string[]
  - `timestamp` string, date-time, required

## Acknowledgement `200`

Webhook received successfully

---

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