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

# post_created

> Fired when a new post is published in the community — main feed or inside a group.

This event fires **every time a post is successfully published**, whether on the community feed or inside a specific group. Use it to index content in external systems, feed search engines, or trigger additional moderation.

<Note>
  The internal event name (used when subscribing webhooks in the Console) is `post_created`.
</Note>

## When it fires

* User publishes a post on the community's main feed
* User publishes a post inside a group
* You create a post via API

## When it does NOT fire

* Edit of an existing post
* Comment on a post (that's a separate event)
* Reaction (like) on a post
* Post rejected by automated moderation before being published
* User not found while enriching the payload (delivery is skipped)
* Creation fails (validation, locked group, banned user, etc.)

## Payload

The payload is serialized in **PascalCase** and delivered in the body of the `POST` with `Content-Type: application/json`:

```json theme={null}
{
  "CustomerId": "01HQ0ABCDEF1234567890XYZ",
  "PostId": "01HQ8POST1234567890ABCDEFG",
  "GroupId": "01HQ2GROUP1234567890XYZAB",
  "User": {
    "Id": "01HQ7Z3X4Y5Z6A7B8C9D0E1F2G",
    "Email": "mary@example.com",
    "FirstName": "Mary",
    "LastName": "Smith",
    "DisplayName": "Mary Smith",
    "Username": "mary.smith",
    "PhoneNumber": "+15551234567",
    "CreatedAt": "2026-04-12T14:32:01Z",
    "BadgeId": "01HQ4ABCDEF1234567890XYZ",
    "Badges": [
      "01HQ4ABCDEF1234567890XYZ"
    ]
  },
  "Content": "Just finished module 3 of the course — highly recommend!",
  "ImageUrl": "https://cdn.cativalab.digital/posts/01HQ8POST.../original.jpg",
  "CreatedAt": "2026-05-08T14:32:01Z"
}
```

### Payload fields

| Field              | Type           | Description                                                                                                                                                                  |
| ------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CustomerId`       | GUID           | ID of the tenant that emitted the event. Use it to route when your endpoint receives webhooks from multiple tenants.                                                         |
| `PostId`           | GUID           | ID of the newly created post.                                                                                                                                                |
| `GroupId`          | GUID \| null   | ID of the group where the post was published. When `null`, the post was published on the community's main feed (outside of any group).                                       |
| `User.Id`          | GUID           | ID of the post author.                                                                                                                                                       |
| `User.Email`       | string         | Author email.                                                                                                                                                                |
| `User.FirstName`   | string         | First name.                                                                                                                                                                  |
| `User.LastName`    | string         | Last name.                                                                                                                                                                   |
| `User.DisplayName` | string         | Display name.                                                                                                                                                                |
| `User.Username`    | string         | Username.                                                                                                                                                                    |
| `User.PhoneNumber` | string         | Phone, when provided.                                                                                                                                                        |
| `User.CreatedAt`   | ISO 8601       | When the author was created in the tenant.                                                                                                                                   |
| `User.BadgeId`     | GUID \| null   | Author's primary badge at the time of the post.                                                                                                                              |
| `User.Badges`      | GUID\[]        | Full list of badges held by the author at the time of the post.                                                                                                              |
| `Content`          | string \| null | Post text. May be `null` for posts that contain only media (image or video).                                                                                                 |
| `ImageUrl`         | string \| null | URL of the **first image** attached to the post (original resolution). `null` when the post has no images. Posts with video or other media types do not populate this field. |
| `CreatedAt`        | ISO 8601       | Moment when the post was created.                                                                                                                                            |

## Request headers

| Header                   | Description                                                                                                            |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `X-Cativa-Signature`     | HMAC-SHA256 signature of the delivery, in the format `t=<unixTs>,v1=<hex>`. **Verify it before processing the event.** |
| `X-Cativa-Execution-Id`  | Unique ID of this event. Stable across retries — use it as your idempotency key.                                       |
| `X-Cativa-Automation-Id` | ID of the listener configured in the Console (same value across all deliveries from the same subscription).            |

The full explanation of how to verify `X-Cativa-Signature`, handle retries and ensure idempotency (with examples in Node, Python, Go and C#) lives in [Subscribing and verifying webhooks](/en/webhooks/subscribing-and-verifying).

## Use cases

* **Index in external search** — push `PostId` + `Content` into an index (Algolia, Elasticsearch, Meilisearch) for cross-group search inside your own app.
* **Notify a moderation channel** — forward posts in sensitive groups to an internal channel (Slack, Discord) where the moderation team reviews them in parallel.
* **Sync to newsletter / social media** — take `Content` + `ImageUrl` and automatically republish on LinkedIn, Twitter, or in a newsletter, attributing authorship via `User.DisplayName`.

## Related events

<CardGroup cols={2}>
  <Card title="user_joined_group" icon="users" href="/en/webhooks/events/user-joined-group">
    Fired when a user joins a group — useful complement to understand the context of who is posting.
  </Card>

  <Card title="user_received_badge" icon="shield-check" href="/en/webhooks/events/user-received-badge">
    Fired when the user earns a badge — useful to correlate engagement (post) with permission.
  </Card>

  <Card title="Subscribing to webhooks" icon="webhook" href="/en/webhooks/subscribing-and-verifying">
    How to register listeners, verify HMAC and handle retries.
  </Card>

  <Card title="Webhooks (overview)" icon="rectangle-history" href="/en/concepts/webhooks">
    Why webhooks, delivery guarantees and payload format.
  </Card>
</CardGroup>
