Zernio
Zernio
OverviewWebhooksPost webhooksInbox webhooksAutomation webhooksSupport run webhooksAccount webhooksAnalytics webhooksAds webhooksCall webhooksWhatsApp webhooksPhone number webhooksSMS registration webhooksBranded Calling webhooks
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Webhooks

Account webhooks

Receive an event when an account is connected to a profile or stops working, and know how fast each disconnect path reaches you.


Account events tell you when an account joins a profile and when it can no longer be used. Subscribe with POST /v1/webhooks/settings and the event names below (first event); delivery, retries and signatures are the same for every event (how webhooks behave).

Events

EventDescription
account.connectedAn account was connected to a profile.
account.disconnectedA connected account stopped working or was removed.

How it behaves

How disconnect detection works

Zernio sends account.disconnected through 4 paths, and the path decides how quickly you hear about it.

  • An API removal, for example DELETE /v1/accounts/{id}, emits immediately with disconnectionType: "intentional".
  • A phone-side WhatsApp disconnect (WhatsApp Business app, Settings, Account, Business Platform, Disconnect) emits within seconds of Meta's notification, with disconnectionType: "unintentional". reason carries Meta's own explanation where Meta gives one, which separates a deliberate disconnect (BUSINESS_DOWNGRADE, CHANGE_NUMBER, USER_RE_REGISTERED) from Meta dropping an idle number (PRIMARY_INACTIVITY after about 14 days, COMPANION_INACTIVITY after about 30), and says whether the user or Meta initiated it.
  • An expired or revoked grant on any platform surfaces the next time Zernio calls it: a publish or an analytics sync that gets a definitive auth error deactivates the account and emits with disconnectionType: "unintentional". The publish path tries a token refresh first, so the event means the refresh failed too. reason carries the platform's own message on that path, and Your linkedin access token is no longer valid. Please reconnect your account. when the sync path found it. Reconnect the account to clear it (connecting accounts).
  • Everything else (a number deleted in WhatsApp Manager, a revoked grant, a channel Meta silently stops serving) is caught by a periodic reconciliation against Meta, not a notification. That path confirms across more than one probe before acting, so it lags by anywhere from minutes to about a day.

Poll liveness for WhatsApp

Meta's notifications are best-effort, so a disconnect can still fall through to the slower reconciliation path. Do not read the absence of account.disconnected as proof a channel is alive. For WhatsApp, poll the liveness check (GET /v1/whatsapp/number-info) or account health, which runs a live Meta link probe for WhatsApp accounts.


account.connected

An account was connected to a profile, through OAuth or credentials. Reconnecting an account you already hold fires it again: the connect flow upserts the row for that profile and platform, so the repeat carries the same accountId rather than a new one. Key your own upsert on accountId and expect the event more than once per account.


Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Webhook payload for account connected events

Response Body

Example Requests

Webhook payload for account connected events

POST/account.connected


account.disconnected

A connected account stopped working or was removed. disconnectionType is intentional for removals you made and unintentional for the rest; see how disconnect detection works for what fills reason.


Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Webhook payload for account disconnected events

Response Body

Example Requests

Webhook payload for account disconnected events

POST/account.disconnected

Related

  • Webhooks: create an endpoint, retries, signatures.
  • Connecting accounts: what fires account.connected.
  • Account health: canPost and canFetchAnalytics per account, on demand.
  • Disconnect an account: the intentional path.
  • WhatsApp phone numbers: the liveness check.
Was this page helpful?

Support run webhooks

Receive an event when an Ana support run finishes or fails, instead of polling for the answer.

Analytics webhooks

Receive a cursor each time an account's analytics sync completes, then read every changed post in one call to the delta feed.

On this page

EventsHow it behavesHow disconnect detection worksPoll liveness for WhatsAppaccount.connectedaccount.disconnectedRelated
id*string

Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.

event*"account.connected"

Value in

  • "account.connected"
account*
timestamp*string

UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.

Formatdate-time
id*string

Stable webhook event ID: the dedupe key, also sent as the X-Zernio-Event-Id header and identical on every retry and redelivery. It identifies the event only, never an account or other resource.

event*"account.disconnected"

Value in

  • "account.disconnected"
account*
timestamp*string

UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.

Formatdate-time