---
title: "Account events"
method: POST
path: "accountEvents"
tags: ["Webhook Events"]
---

# Account events

`POST accountEvents` (webhook)

- `account.connected`: An account was connected for the first time, or a disconnected or needs-reauth account was reconnected (`reason: reconnected`); re-authorizing an account that is already connected emits nothing.
- `account.needs_reauth`: An account's credentials stopped working and the account must be reconnected.
- `account.disconnected`: An account was disconnected because the platform revoked access, the user disconnected it in the dashboard or deleted it through the API (`reason: user_disconnected`), or its profile was deleted (`reason: profile_deleted`).

Delivered as a `POST` to every active endpoint that subscribes to the event and whose profile access covers it. Delivery is at least once and events are not ordered, so deduplicate by `id`.

## Payload

- WebhookAccountEvent: Envelope for `account.connected`, `account.needs_reauth`, `account.disconnected`.
  - `id` string, required: Event id (`evt_…`). Stable across automatic retries and manual redeliveries; deduplicate on it.
  - `type` 'account.connected' | 'account.needs_reauth' | 'account.disconnected', required
  - `apiVersion` string, required: Payload version.
  - `createdAt` string, date-time, required: When the event was created.
  - `data` WebhookAccountEventData, required
    - `account` WebhookAccountEventAccount, required
      - `id` string, required: PostZen account id.
      - `profileId` string, required: The account's profile.
      - `platform` 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'facebook' | 'youtube' | 'threads' | 'pinterest' | 'bluesky' | 'telegram', required: Platform of the account an event refers to. Webhook payloads use `x` for X (Twitter).
      - `username` string, required: Account username on the platform.
      - `status` 'connected' | 'needs_reauth' | 'disconnected', required
      - `reason` 'reconnected' | 'user_disconnected' | 'profile_deleted': `reconnected` on account.connected for an account that existed before. `user_disconnected` on account.disconnected when the user disconnected the account in the dashboard or deleted it through the API, `profile_deleted` when its profile was deleted. Omitted otherwise, including when the platform revoked access.

## Acknowledgement `2XX`

Acknowledges the delivery. Any other status, or no response within 10 seconds, schedules a retry.

---

[API](https://skmtc.dev/postzen/apis/postzen-public-api.md) · [All operations](https://skmtc.dev/postzen/apis/postzen-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postzen/apis/postzen-public-api/revisions/40863e3710ec?raw)
