# Account events

> Events for account lifecycle, data exports, meeting service connections and webhook tests, with sample payloads.

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

These events track an account's connection and lifecycle, data exports, meeting service grants, and webhook test deliveries. For the envelope fields see [Events](/guides/events#envelope).

## Account lifecycle

**account.connected**

Fires when an account is connected, or when an existing account signs in again.

- `provider`, `cloud`: the mail provider; `cloud` is the Microsoft cloud, else `null`.
- `externalRef`: your reference for the account, or `null`.
- `reauthorized`: `true` when an existing account took the new sign-in rather than a new account being made.

```json
{
  "id": "1001",
  "type": "account.connected",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "email": "ada@example.com",
    "provider": "gmail",
    "cloud": null,
    "externalRef": "user_42",
    "reauthorized": false
  }
}
```

**account.updated**

Fires when an account's status, `externalRef`, settings or connection changes.

`fields` names what changed: `status`, `externalRef`, `settings`, `imap` or `dav` (the IMAP or DAV connection settings), or `credentials` (the password).

```json
{
  "id": "1001",
  "type": "account.updated",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "fields": ["status"]
  }
}
```

**account.deleted**

Fires when an account is deleted. Its data is purged after the retention period, or at once when the deletion asked for a purge (`purge: true`); `account.purged` follows.

```json
{
  "id": "1001",
  "type": "account.deleted",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "email": "ada@example.com",
    "externalRef": "user_42",
    "purge": false
  }
}
```

**account.reauth_required**

Fires when the provider refuses the account's grant. The account must sign in again.

`reason` is the provider's refusal, for example `invalid_grant`. The other fields match `account.connected`, without `reauthorized`.

```json
{
  "id": "1001",
  "type": "account.reauth_required",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "email": "ada@example.com",
    "provider": "gmail",
    "cloud": null,
    "externalRef": "user_42",
    "reason": "invalid_grant"
  }
}
```

**account.initialized**

Fires when the account's first mail sync finishes. Nothing before it is announced message by message; `mailboxes` and `messages` count what the sync found.

```json
{
  "id": "1001",
  "type": "account.initialized",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "mailboxes": 12,
    "messages": 1284
  }
}
```

**account.purged**

Fires when a deleted account's data is gone for good, after retention or an immediate purge.

The envelope's `accountId` is always `null`, since the event outlives the account. The purged account is `data.accountId`.

```json
{
  "id": "1001",
  "type": "account.purged",
  "accountId": null,
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
    "externalRef": "user_42"
  }
}
```

## Data exports

`accountId` is the exported account, or `null` for an export of the whole tenant. See [Exports](/guides/exports).

**export.completed**

Fires when a data export finishes.

| Field | Description |
| --- | --- |
| `exportId` | The export. |
| `bytes` | Size of the archive. |
| `sha256` | SHA-256 hex of the `.tar.gz`, to check a download. |
| `expiresAt` | The download is available until then. |

```json
{
  "id": "1001",
  "type": "export.completed",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "exportId": "5e7a9c1b-3d5f-4b7e-9a1c-5e7b9d1f3a5c",
    "bytes": 48213771,
    "sha256": "9f2c4e6a8b0d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a",
    "expiresAt": "2026-05-11T09:30:00.000Z"
  }
}
```

**export.failed**

Fires when a data export fails. `error` describes the failure.

```json
{
  "id": "1001",
  "type": "export.failed",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "exportId": "5e7a9c1b-3d5f-4b7e-9a1c-5e7b9d1f3a5c",
    "error": "The export could not be built; try again"
  }
}
```

## Meeting connections

An account's own grant at a meeting service (`zoom` or `webex`). See [Meetings](/guides/meetings).

**meeting_connection.connected**

Fires when an account connects, or reconnects, a meeting service.

- `email`: the service user the grant acts as.
- `reconnected`: `true` when the account already had a connection to the service.

```json
{
  "id": "1001",
  "type": "meeting_connection.connected",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "service": "zoom",
    "email": "ada@example.com",
    "reconnected": false
  }
}
```

**meeting_connection.reauth_required**

Fires when the service refuses the account's meeting grant. Meetings need a new connect; mail and calendar sync go on.

`reason` is the service's refusal, for example `invalid_grant`.

```json
{
  "id": "1001",
  "type": "meeting_connection.reauth_required",
  "accountId": "6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b",
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "service": "zoom",
    "email": "ada@example.com",
    "reason": "invalid_grant"
  }
}
```

## Webhook tests

**webhook.test**

Sent by the [test action](/guides/webhook-delivery) to the endpoint it names, whatever that endpoint's filters. It is the type the test action sends when given none.

`endpointId` is the endpoint tested. `accountId` is always `null`. The test delivery carries `isTest: true`.

```json
{
  "id": "1001",
  "type": "webhook.test",
  "accountId": null,
  "createdAt": "2026-05-04T09:30:00.000Z",
  "data": {
    "endpointId": "2b7e9d1c-4f6a-4b8e-8d2c-9e0f1a2b3c4d"
  }
}
```
