# Events

> What a Workwae event contains, how events reach you, how long they are kept, and every event type.

URL: https://docs.workwae.com/guides/events

An event announces one change: a message arrived, a send failed, a calendar event moved. Read this page to learn the envelope every event shares and to find the event types you need.

## The envelope

Every event has the same five fields. `type` says what `data` holds.

```json title="Event"
{
  "id": "1001",
  "type": "send.sent",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": { "outboxId": "7b9d1f3a-5c7e-4a9b-8d1f-3a5c7e9b1d3f", "...": "..." }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `id` | string of decimal digits | Stable event id. It is the `webhook-id` header and your dedupe key; replays keep it. |
| `type` | string | The event type, such as `message.created`. |
| `accountId` | string or `null` | The account the event concerns. Always `null` for `account.purged` and `webhook.test`; `null` for `export.*` when the export covers the whole tenant. |
| `createdAt` | timestamp | When the event was recorded. |
| `data` | object | The type's payload. An event's own account is `accountId` and is not repeated in `data`. |
| `isTest` | `true`, optional | Present, and `true`, only on a delivery sent by the webhook test action. Absent rather than `false`; never in the change feed. |

## How events reach you

The same event, with the same `id` and body, is available on two paths:

- **Webhooks** push each event to your endpoints as a signed POST. See [Webhooks](/guides/webhooks).
- **The change feed** lets you poll events in order from a cursor. See [Change feed](/guides/changes).

Because the `id` is the same on both paths and across retries and replays, one dedupe table covers both. MCP clients can subscribe to events too; see [MCP apps and events](/guides/mcp/apps-and-events).

## Retention

Events are kept for the tenant's `eventRetentionDays` setting: 14 days by default, adjustable from 7 to 30 (see [`/reference/settings`](/reference/settings)). Older events leave the change feed and cannot be replayed to webhooks.

## Initial sync

A new account's first sync is not announced item by item. When it finishes, one summary event fires instead: `account.initialized` for mail, `calendar.initialized` for calendars, `contacts.initialized` for contacts. Read existing data through the API, then rely on events for changes after it.

## Event types

| Type | Fires when | Sample |
| --- | --- | --- |
| `account.connected` | An account is connected, or an existing account signs in again. | [Accounts](/guides/events/accounts#event-account.connected) |
| `account.updated` | An account's status, `externalRef`, settings or connection changes. | [Accounts](/guides/events/accounts#event-account.updated) |
| `account.deleted` | An account is deleted. | [Accounts](/guides/events/accounts#event-account.deleted) |
| `account.reauth_required` | The provider refuses the account's grant. | [Accounts](/guides/events/accounts#event-account.reauth_required) |
| `account.initialized` | The account's first mail sync finishes. | [Accounts](/guides/events/accounts#event-account.initialized) |
| `account.purged` | A deleted account's data is gone for good. | [Accounts](/guides/events/accounts#event-account.purged) |
| `export.completed` | A data export is ready to download. | [Accounts](/guides/events/accounts#event-export.completed) |
| `export.failed` | A data export fails. | [Accounts](/guides/events/accounts#event-export.failed) |
| `meeting_connection.connected` | An account connects or reconnects Zoom or Webex. | [Accounts](/guides/events/accounts#event-meeting_connection.connected) |
| `meeting_connection.reauth_required` | The meeting service refuses the account's grant. | [Accounts](/guides/events/accounts#event-meeting_connection.reauth_required) |
| `webhook.test` | The webhook test action runs. | [Accounts](/guides/events/accounts#event-webhook.test) |
| `mailbox.created` | A mailbox (folder or label) appears. | [Mail](/guides/events/mail#event-mailbox.created) |
| `mailbox.updated` | A mailbox is renamed, moved or given another role. | [Mail](/guides/events/mail#event-mailbox.updated) |
| `mailbox.deleted` | A mailbox goes away. | [Mail](/guides/events/mail#event-mailbox.deleted) |
| `message.created` | A message is indexed. | [Mail](/guides/events/mail#event-message.created) |
| `message.updated` | A message is read, flagged, moved or linked to its outbox entry. | [Mail](/guides/events/mail#event-message.updated) |
| `message.deleted` | A message is removed. | [Mail](/guides/events/mail#event-message.deleted) |
| `message.bounced` | A bounce notice reaches the account. | [Mail](/guides/events/mail#event-message.bounced) |
| `message.classified` | AI classifies a reply to one of your sends. | [Mail](/guides/events/mail#event-message.classified) |
| `message.opened` | The open-tracking pixel of a send loads. | [Mail](/guides/events/mail#event-message.opened) |
| `message.clicked` | A tracked link of a send is followed. | [Mail](/guides/events/mail#event-message.clicked) |
| `send.sent` | The provider accepts a queued send. | [Mail](/guides/events/mail#event-send.sent) |
| `send.retrying` | A send attempt fails and is queued again. | [Mail](/guides/events/mail#event-send.retrying) |
| `send.failed` | A send fails for good. | [Mail](/guides/events/mail#event-send.failed) |
| `send.rescheduled` | A queued send gets a new `sendAt`. | [Mail](/guides/events/mail#event-send.rescheduled) |
| `send.cancelled` | A queued send is cancelled. | [Mail](/guides/events/mail#event-send.cancelled) |
| `suppression.created` | An address goes onto a suppression list. | [Mail](/guides/events/mail#event-suppression.created) |
| `calendar.initialized` | The account's first calendar sync finishes. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-calendar.initialized) |
| `calendar.created` | A calendar appears. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-calendar.created) |
| `calendar.updated` | A calendar changes. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-calendar.updated) |
| `calendar.deleted` | A calendar goes away. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-calendar.deleted) |
| `calendar_event.created` | A single event, series or exception appears. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-calendar_event.created) |
| `calendar_event.updated` | A single event, series or exception changes. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-calendar_event.updated) |
| `calendar_event.deleted` | A single event, series or exception goes away. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-calendar_event.deleted) |
| `booking.created` | A scheduling link is booked. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-booking.created) |
| `booking.cancelled` | A booking is cancelled. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-booking.cancelled) |
| `contacts.initialized` | The account's first contacts sync finishes. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-contacts.initialized) |
| `contact.created` | A contact appears. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-contact.created) |
| `contact.updated` | A contact changes. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-contact.updated) |
| `contact.deleted` | A contact goes away. | [Calendar and contacts](/guides/events/calendar-and-contacts#event-contact.deleted) |

The samples on the section pages are the same data a webhook test event sends.

- [Webhooks](https://docs.workwae.com/guides/webhooks): Receive events as signed POSTs.
- [Change feed](https://docs.workwae.com/guides/changes): Poll events from a cursor.
