# post.platform.failed

One platform target failed permanently.

### When it fires

Only on permanent failure; retryable errors stay silent. The rollup (`post.failed` or `post.partial`) fires separately once every platform ends.

### After a publish

It can fire for a target that already emitted `post.platform.published`, if background reconciliation finds the publish never completed.

### Payload notes

`platform.error` carries the platform's message. `platform.errorCategory` and `platform.errorSource` classify it, so a reconnect (`auth_expired`) separates from a content fix (`user_content`).




**Payload for `post.platform.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. It identifies the event only, never an account or other resource.
- **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: post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved
- **post** (required) `object`: 
  - **id** (required) `string`: No description
  - **content** (required) `string`: No description
  - **status** (required) `string`: Post-level status AT FIRE TIME. May still be `publishing`
if other platforms haven't terminated; check this field
rather than assuming.

  - **scheduledFor** (required) `string` (date-time): No description
  - **publishedAt** `string` (date-time): No description
  - **platforms** (required) `array[object]`: 
    - **platform** (required) `string`: No description
    - **status** (required) `string`: No description
    - **accountId** `string`: SocialAccount id this platform target published through. On post.platform.* events see also the top-level `account` block.
    - **platformPostId** `string`: No description
    - **publishedUrl** `string`: No description
    - **error** `string`: No description
    - **errorCategory** `string`: Present when this target failed. Same taxonomy as `platforms[].errorCategory` on GET /v1/posts. - one of: auth_expired, user_content, user_abuse, account_issue, platform_rejected, platform_error, platform_rate_limit, quota_exhausted, system_error, unknown
    - **errorSource** `string`: Present when this target failed. Who must act: user, platform or system (Zernio). - one of: user, platform, system
    - **platformError**: `PostPlatformError` - See schema definition
  - **metadata** `object`: The free-form `metadata` object supplied when the post was created, echoed back so you can map events onto your own records. Omitted when the post was created without it.
- **platform** (required) `object`: The specific platform that transitioned to a terminal state.
  - **name** (required) `string`: Platform name (e.g. `twitter`, `tiktok`, `instagram`).
  - **status** (required) `string`: Terminal status this event fires on. Matches the event suffix. - one of: published, failed, deleted
  - **platformPostId** `string`: Platform-native post id. Present on `published` and `deleted`, absent on `failed`.
  - **publishedUrl** `string`: Public URL to the platform-side post. Present on `published` (when the platform exposes one and it is not a draft) and on `deleted` (when one was recorded at publish time).
  - **error** `string`: Error message from the platform. Present on `failed` only.
  - **errorCategory** `string`: Error category for programmatic handling. Present on `failed` only. Same taxonomy as `platforms[].errorCategory` on GET /v1/posts. - one of: auth_expired, user_content, user_abuse, account_issue, platform_rejected, platform_error, platform_rate_limit, quota_exhausted, system_error, unknown
  - **errorSource** `string`: Who must act on the failure: user (fix content or reconnect), platform (outage or policy), system (Zernio). Present on `failed` only. - one of: user, platform, system
  - **deletedAt** `string` (date-time): When the platform-side deletion was detected by Zernio sync (ISO 8601). Present only on `post.platform.deleted`.
- **account** (required) `object`: The connected account the platform-write went through.
  - **accountId** (required) `string`: No description
  - **platform** (required) `string`: No description
  - **username** (required) `string`: No description
  - **displayName** `string`: No description
- **timestamp** (required) `string` (date-time): 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.