> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heyoo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# post.published

> Occurs when a post is published via the platform.

export const WebhookResponseBodyParameters = ({type, children}) => <div>
    <h2>Response body parameters</h2>
    <p>
      All webhook payloads follow a consistent top-level structure with
      event-specific data nested within the <code>data</code> object.
    </p>
    <ParamField body="id" type="string">
      The event ID.
    </ParamField>
    <ParamField body="event" type="string">
      The event type that triggered the webhook (e.g., <code>{type}</code>).
    </ParamField>
    <ParamField body="timestamp" type="string">
      ISO 8601 timestamp when the webhook event was triggered.
    </ParamField>
    <ParamField body="data" type="object">
      Event-specific data containing detailed information about the event. The
      data object for the <code>{type}</code> event contains the following
      parameters:
      <Expandable defaultOpen title="object parameters">
        {children}
      </Expandable>
    </ParamField>
  </div>;

The `post.published` event is triggered when a post is successfully published to a social media platform. The payload includes the post details and the user who published it.

<WebhookResponseBodyParameters type="post.published">
  <ParamField body="post" type="object" required>
    <Expandable title="properties">
      <ParamField body="id" type="string" required>
        The unique ID of the post inside Heyoo.
      </ParamField>

      <ParamField body="title" type="string">
        The title of the post, if any.
      </ParamField>

      <ParamField body="content" type="string" required>
        The actual text content of the post.
      </ParamField>

      <ParamField body="type" type="string" required>
        The post type (e.g., `social`).
      </ParamField>

      <ParamField body="platform" type="string" required>
        The platform where the post is published (`linkedin`, etc).
      </ParamField>

      <ParamField body="status" type="string" required>
        The current status of the post (`published`, etc).
      </ParamField>

      <ParamField body="postedAt" type="string">
        ISO 8601 timestamp of when it was publicly posted.
      </ParamField>

      <ParamField body="externalPostId" type="string">
        The external ID assigned by the social platform.
      </ParamField>

      <ParamField body="postUrl" type="string">
        The direct URL to the published post.
      </ParamField>

      <ParamField body="campaignId" type="string">
        The associated campaign ID, if applicable.
      </ParamField>

      <ParamField body="workspaceId" type="string" required>
        The unique ID of the related workspace.
      </ParamField>

      <ParamField body="createdAt" type="string" required>
        ISO 8601 timestamp when the post record was created.
      </ParamField>
    </Expandable>
  </ParamField>

  <ParamField body="user" type="object" required>
    The user who published the post.

    <Expandable title="properties">
      <ParamField body="id" type="string" required>
        The unique ID of the user.
      </ParamField>

      <ParamField body="name" type="string">
        The full name of the user.
      </ParamField>

      <ParamField body="email" type="string" required>
        The email address of the user.
      </ParamField>

      <ParamField body="image" type="string">
        The avatar image of the user.
      </ParamField>
    </Expandable>
  </ParamField>
</WebhookResponseBodyParameters>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "evt_...",
    "event": "post.published",
    "timestamp": "2024-08-26T16:41:52.346Z",
    "data": {
      "post": {
        "id": "post_...",
        "title": "Check out our new campaign!",
        "content": "We just launched our summer referal push! Let us know what you think.",
        "type": "social",
        "platform": "linkedin",
        "status": "published",
        "postedAt": "2024-08-26T16:41:52.346Z",
        "externalPostId": "urn:li:share:123456789",
        "postUrl": "https://linkedin.com/posts/...",
        "campaignId": "cm11...",
        "workspaceId": "ws_...",
        "createdAt": "2024-08-26T16:00:00.000Z"
      },
      "user": {
        "id": "usr_...",
        "name": "Jane Smith",
        "email": "jane@example.com",
        "image": "https://example.com/avatar2.jpg"
      }
    }
  }
  ```
</ResponseExample>
