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#

EventSent whenHas a comment
comment.createdSomeone leaves a new commentYes
comment.repliedYou, a teammate or a reviewer replies to a commentYes, with the reply's text
comment.resolvedA comment is marked resolvedYes
page.approvedA reviewer presses Approve this versionNo
page.changes_requestedA reviewer presses Ask for changesNo
testYou press Send a testNo

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

The request#

PartValue
MethodPOST
Content-Typeapplication/json
User-AgentHTMLAnnotate-Webhook/1
x-htmlannotate-eventThe event name, like comment.created
x-htmlannotate-signaturesha256= followed by the HMAC SHA-256 of the raw body, made with your signing secret, in hex
Timeout6 seconds. Reply quickly and do slow work afterwards. Failed deliveries aren't retried.

The body#

comment.created
{
  "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"
  }
}
FieldTypeWhat it is
eventstringOne of the events above.
atstringWhen it happened, ISO 8601 in UTC.
page.slugstringThe page's id in its review link. Empty for test.
page.titlestringThe page's name, or its file name.
page.reviewUrlstringThe review link.
bystringWho did it: the commenter, the person replying or resolving, or the reviewer who approved.
commentobject or nullFor comment events; null for page.approved, page.changes_requested and test.
comment.numberintegerThe comment number shown on the pin.
comment.textstringThe comment's text. For comment.replied, the reply's text.
comment.elementstringThe text or kind of element it's pinned to, up to 60 characters.
comment.screenstringdesktop, tablet or mobile.
page.approved
{
  "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.js
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));
}
Python
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 · Something unclear? Tell us