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

# Activity and comments

> See what happened to an invoice, agreement, alert or claim, and discuss it with comments.

Every invoice, agreement, alert, claim and topic has a timeline: what changed, who changed it, and
the comments people have left.

## Read a timeline

```bash theme={null}
curl --get "$API_URL/v1/activity" \
  -H "Authorization: Bearer $API_KEY" -H "X-Organization-Id: $ORGANIZATION_ID" \
  --data-urlencode 'entity_type=alert' \
  --data-urlencode "entity_id=$ALERT_ID"
```

The newest entries come first. Follow `next_cursor` for older ones. Set `entry_type=comment` or
`entry_type=activity` to get only one kind. For an invoice, agreement, claim or
topic, `include_related_alerts=true` also includes what happened to its alerts.

## Comment and reply

Post a comment with `POST /v1/comments`:

```json theme={null}
{ "entity_type": "alert", "entity_id": "<alert-id>", "body": "Can we confirm this price?" }
```

To reply, add `parent_comment_id`. Replies go under a top-level comment, and you read them with
`GET /v1/comments/{id}/replies`.

* Comments are posted as the person who owns the API key.
* Posting a comment isn't safe to repeat. If you're unsure whether it went through, read the
  timeline before you try again.
* Only the author can edit or delete a comment. Deleting a comment also deletes its replies.
* Topics have a timeline but can't be commented on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.