---
title: Webhooks: events and payloads · HTMLAnnotate Docs
url: https://htmlannotate.com/docs/integrations/webhooks
description: HTMLAnnotate webhooks send a signed JSON message for every comment, reply, resolve, approval and change request. Events, fields and signing.
---

# Webhooks

Give HTMLAnnotate an https address and it sends a JSON message there for every comment event on your pages. Each message is signed, so you can check it came from us.

Pro and Team

## Set up a webhook#

1.

In HTMLAnnotate, open **Integrations**, then **Webhooks**.

2.

Paste the https address that should receive the messages and press **Save**.

3.

Copy the **signing secret** shown under the address.

4.

Press **Send a test**. You get a message with the event `test`.

## Events#

| Event | Sent when | Has a comment |
|---|---|---|
| `comment.created` | Someone leaves a new comment | Yes |
| `comment.replied` | You, a teammate or a reviewer replies to a comment | Yes, with the reply's text |
| `comment.resolved` | A comment is marked resolved | Yes |
| `page.approved` | A reviewer presses Approve this version | No |
| `page.changes_requested` | A reviewer presses Ask for changes | No |
| `test` | You press Send a test | No |

Team only threads never send an event: not when the comment is posted, replied to or resolved.

## The request#

| Part | Value |
|---|---|
| Method | `POST` |
| Content-Type | `application/json` |
| User-Agent | `HTMLAnnotate-Webhook/1` |
| x-htmlannotate-event | The event name, like `comment.created` |
| x-htmlannotate-signature | `sha256=` followed by the HMAC SHA-256 of the raw body, made with your signing secret, in hex |
| Timeout | 6 seconds. Reply quickly and do slow work afterwards. Failed deliveries aren't retried. |

## The body#

comment.createdCopy

```
{
"event": "comment.created",
"at": "2026-11-23T10:42:07.512Z",
"page": {
"slug": "fernhill-home",
"title": "Fernhill · Home",
"reviewUrl": "https://htmlannotate.com/v/fernhill-home"
},
"by": "Maya Chen",
"comment": {
"number": 3,
"text": "The button text wraps onto two lines on my phone.",
"element": "Book a class",
"screen": "mobile"
}
}
```

| Field | Type | What it is |
|---|---|---|
| `event` | string | One of the events above. |
| `at` | string | When it happened, ISO 8601 in UTC. |
| `page.slug` | string | The page's id in its review link. Empty for `test`. |
| `page.title` | string | The page's name, or its file name. |
| `page.reviewUrl` | string | The review link. |
| `by` | string | Who did it: the commenter, the person replying or resolving, or the reviewer who approved. |
| `comment` | object or null | For comment events; `null` for `page.approved`, `page.changes_requested` and `test`. |
| `comment.number` | integer | The comment number shown on the pin. |
| `comment.text` | string | The comment's text. For `comment.replied`, the reply's text. |
| `comment.element` | string | The text or kind of element it's pinned to, up to 60 characters. |
| `comment.screen` | string | `desktop`, `tablet` or `mobile`. |

page.approvedCopy

```
{
"event": "page.approved",
"at": "2026-11-23T16:05:44.118Z",
"page": { "slug": "fernhill-home", "title": "Fernhill · Home", "reviewUrl": "https://htmlannotate.com/v/fernhill-home" },
"by": "Maya Chen",
"comment": null
}
```

## Check the signature#

Make the same HMAC on your side, from the raw request body before any JSON parsing, and compare.

Node.jsCopy

```
import crypto from "node:crypto";

function isFromHTMLAnnotate(rawBody, header, secret) {
const mine = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
return header.length === mine.length &&
crypto.timingSafeEqual(Buffer.from(header), Buffer.from(mine));
}
```

PythonCopy

```
import hmac, hashlib

def is_from_htmlannotate(raw_body: bytes, header: str, secret: str) -> bool:
mine = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(mine, header)
```

Messages are sent for pages you own while your plan is Pro or Team. Team only threads never send anything: no `comment.created`, `comment.replied` or `comment.resolved` for a Team only comment.

Written by the HTMLAnnotate team · Updated 23 November 2026 · [View as Markdown](https://htmlannotate.com/docs/integrations/webhooks.md)  · Something unclear? [Tell us](https://htmlannotate.com/help#contact)
