---
title: "Post target events"
method: POST
path: "postTargetEvents"
tags: ["Webhook Events"]
---

# Post target events

`POST postTargetEvents` (webhook)

- `post.platform.published`: One platform target of a post published; sent once per target.
- `post.platform.failed`: One platform target of a post failed with no further automatic retries; a retry that fails again emits it again.

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

- WebhookPostTargetEvent: Envelope for `post.platform.published`, `post.platform.failed`.
  - `id` string, required: Event id (`evt_…`). Stable across automatic retries and manual redeliveries; deduplicate on it.
  - `type` 'post.platform.published' | 'post.platform.failed', required
  - `apiVersion` string, required: Payload version.
  - `createdAt` string, date-time, required: When the event was created.
  - `data` WebhookPostTargetEventData, required
    - `post` WebhookPostTargetEventPost, required
      - `id` string, required: PostZen post id.
      - `profileId` string, required: The post's primary profile.
    - `target` WebhookPostTargetEventTarget, required
      - `id` string, required: PostZen target id.
      - `accountId` string, required: PostZen account id.
      - `profileId` string, required: The target 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).
      - `status` 'draft' | 'scheduled' | 'queued' | 'publishing' | 'published' | 'partially_failed' | 'failed' | 'canceled', required: Status of one platform target when the event was created.
      - `platformPostId` string: The platform's own id for the published post.
      - `platformPostUrl` string, uri: Public URL of the published post.
      - `publishedAt` string, date-time: When the target was published.
      - `errorCode` string: Present when the target failed.
      - `errorMessage` string: Human-readable failure detail, when available.
      - `platformError` object: The platform's own error envelope for the failure (Meta's code, subcode, fbtrace_id, and type), present only when the platform returned one. Fields the platform did not send are absent.
        - `code` integer: The platform's error code, for example Meta's `36003`.
        - `subcode` integer: The platform's error subcode, for example Meta's `2207009`.
        - `fbtraceId` string: Meta's trace id for the failed call. Quote it to Meta support; Meta expires it after a short time.
        - `type` string: The platform's error type, for example `OAuthException`.
      - `attemptCount` integer, required: Publish attempts made for this target so far.

## 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)
