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

# comment.created

> Sent when someone comments on a selected profile’s post.

`comment.created` is sent to the author of a post when another profile publishes a comment on that post.

The event covers top-level comments and nested comments. For a nested comment, the embedded comment’s `parent_comment_id` identifies the comment being replied to.

## Delivery target

The envelope’s `profile_id` is the profile that authored the post. `workspace_id` is the workspace that owns that profile.

No event is sent when the post author comments on their own post.

## Data object

`data` contains exactly one field:

| Field     | Type   | Description                                               |
| --------- | ------ | --------------------------------------------------------- |
| `comment` | object | Complete public comment snapshot that triggered the event |

### `data.comment` fields

| Field               | Type                     | Description                                            |
| ------------------- | ------------------------ | ------------------------------------------------------ |
| `id`                | UUID                     | Newly created comment ID                               |
| `post_id`           | UUID                     | Post receiving the comment                             |
| `profile_id`        | UUID                     | Profile that authored the comment                      |
| `parent_comment_id` | UUID or `null`           | Parent comment for a nested reply; otherwise `null`    |
| `body`              | string                   | Complete comment body                                  |
| `status`            | `published` or `removed` | Comment status; `published` when this event is created |
| `replies_count`     | integer                  | Direct reply count at event creation                   |
| `reactions_count`   | integer                  | Reaction count at event creation                       |
| `viewer_reaction`   | `like` or `null`         | Viewer reaction in the snapshot                        |
| `created_at`        | ISO 8601 string          | Comment creation time                                  |
| `updated_at`        | ISO 8601 string          | Comment update time                                    |

## Example delivery

This example represents a nested comment. A top-level comment has `parent_comment_id: null`.

```http theme={null}
POST /webhooks/wircle HTTP/1.1
Content-Type: application/json
User-Agent: Wircle-Webhooks/1.0
Webhook-Id: 019b2ab7-71a0-7d7c-b6fc-2709eebccf8f
Webhook-Timestamp: 1786881858
Webhook-Signature: v1,SIGNATURE
```

```json theme={null}
{
  "id": "019b2ab6-dfe4-7cf4-8f01-a9abebc3aa0d",
  "type": "comment.created",
  "api_version": "2026-08-16",
  "created_at": "2026-08-16T12:04:18.320Z",
  "workspace_id": "019b2ab0-3534-79f3-8a20-3ce33a24d2ae",
  "profile_id": "019b2ab1-8911-75b8-976a-c2319bba02f3",
  "data": {
    "comment": {
      "id": "019b2ab6-5582-7ce1-8ae8-ce65866356a1",
      "post_id": "019b2ab5-288a-7f26-b56f-d3c842537e36",
      "profile_id": "019b2ab3-4878-7c66-bf78-fcd14293aa2f",
      "parent_comment_id": "019b2ab5-ea65-7214-8e14-fb938a27f874",
      "body": "This is the new comment.",
      "status": "published",
      "replies_count": 0,
      "reactions_count": 0,
      "viewer_reaction": null,
      "created_at": "2026-08-16T12:04:18.320Z",
      "updated_at": "2026-08-16T12:04:18.320Z"
    }
  }
}
```

## Retrieve related resources

The new comment is already available as `data.comment`. Retrieve the post and current discussion only when needed:

```http theme={null}
GET /v1/posts/{data.comment.post_id}
GET /v1/posts/{data.comment.post_id}/comments
```

The comment list includes author profiles and the parent comment when one exists.

## Respond as the post author

Reply directly to the new comment:

```http theme={null}
POST /v1/posts/{data.comment.post_id}/comments
Authorization: Bearer wrc_live_...
X-Profile-Id: {profile_id}
Content-Type: application/json
```

```json theme={null}
{
  "body": "Thanks for joining the discussion.",
  "parent_comment_id": "{data.comment.id}"
}
```

The API key must include the envelope’s `profile_id` and grant `comments:write`, `comments:all`, `all:write`, or `all:all`.

## Relationship to `comment.reply`

If the new comment directly replies to a comment written by the post author, that profile receives the more specific [`comment.reply`](/webhooks/comment-reply) event instead of a duplicate `comment.created` event.
