# account.ads.sync_failed

An ad account's ads stopped syncing: no success for 24 hours, or every live ad at the retry cap.

### When it fires

An hourly check covers every ad account with live ads on a connected account, on any ads platform. Fires once per ad account until `account.ads.sync_recovered`.

### Stale metrics

Metrics for the ad account are stale in between. Use this signal to flag the numbers in your UI rather than to poll.

### Payload notes

`adAccount.platformAdAccountId` names the ad account (`act_*` on Meta). `account.accountId` names its connection, so one connection with several ad accounts reports each separately.

### Sync fields

`sync.lastSuccessfulSyncAt` is the last good sync and `sync.failureCount` the consecutive failed attempts.

### Error categories

Branch on `sync.errorCategory`: `ad_account_not_listed` (access removed or platform change; check permissions, reconnect), `sync_error` (see `sync.error`) or `stale` (no error recorded; retries usually clear it). New values may be added.

### When it does not fire

A disconnected connection gets `account.disconnected` instead, and no recovery event follows. An ad account that never synced successfully, or whose last good sync is over 3 days old, is not announced.




**Payload for `account.ads.sync_failed`:**

- **id** (required) `string`: Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery.
- **profiles**: `WebhookProfiles` - See schema definition
- **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** (required) `string`: No description - one of: account.ads.sync_failed
- **account** (required): `WebhookAdsSyncAccount` - See schema definition
- **adAccount** (required): `WebhookAdsSyncAdAccount` - See schema definition
- **sync** (required) `object`: 
  - **lastSuccessfulSyncAt** (required) `string` (date-time): No description
  - **failureCount** (required) `integer`: Consecutive failed sync attempts on the ad account's ads.
  - **errorCategory** (required) `string`: ad_account_not_listed = the platform no longer returns the ad account to this
connection (access removed, or a platform-side change); sync_error = the platform
returned an error, see `error`; stale = no sync succeeded and no error was
recorded. New values may be added.
 - one of: ad_account_not_listed, sync_error, stale
  - **error** (required) `string`: Human-readable detail, for display and debugging. Branch on errorCategory.
- **timestamp** (required) `string` (date-time): UTC time at which Zernio generated this event. Retries and redeliveries keep the original value.