A reader marked a passage of an article.
Personal by design, and the payload keeps it that way. A highlight is
never attributed to a named reader anywhere in Commune, so this event
carries the same opaque owner_key the REST resource does and no
user_id. It is the one topic whose payload cannot be resolved back to
a person.
Fires on a genuine insert only. The write is an upsert keyed on (user,
article, start_offset, end_offset), so re-marking the same span is
idempotent and silent. Attaching a chat message to an existing
highlight, which is how a passage becomes a discussion, updates that row
rather than inserting one, so it does not fire here either. What it does
fire is message.created for the message itself.
A highlight created together with its discussion carries
data.message_id from the start. One created silently carries null, and
never gains a value on this topic.
Article visibility is enforced before the write, so a passage of a tag-scoped article can only be marked by someone in its audience.
Delivered as a single HTTPS POST to the consumer's registered endpoint, with the message as the JSON request body. Respond 2xx to acknowledge. Anything else, or a timeout, is retried with backoff, so acknowledge fast and do the work afterwards.
Headers
-
API version the payload conforms to. Same value as
api_versionin the envelope. -
Same value as
idin the envelope. The dedupe key. -
Same value as
typein the envelope. The topic name. -
HMAC over the raw request body. Verify before parsing.
-
Unix seconds the signature was produced at. Reject anything outside your tolerance window.
-
1 on the first attempt, incremented on each retry. Informational only. A consumer must be idempotent regardless of its value.
Minimum value is
1.
Body
Required
A reader marked a passage of an article.
-
Unique id for this event. Stable across redeliveries, so it is the dedupe key. It is the primary key of the row the publisher wrote, which means it is assigned when the state change is recorded, not when the message is dispatched.
-
The topic name, identical to the channel address. Route on this.
Value is
highlight.created. -
The
Commune-Versionvalue this payload conforms to. Present on the message itself, not only on the request header, so an event persisted to a consumer's own store stays self-describing. -
RFC 3339 timestamp of the state change, not of the delivery attempt. Use it to order events, since delivery order is not guaranteed.
-
Who caused the change. ALWAYS
nulltoday and consumers must treat it that way: the public API is currently read-only, so nothing that reaches this catalog was triggered through it, and Commune does not backfill an actor for changes made in the product UI or by a cron. The field exists now so that populating it, once writes exist, is an additive change rather than a new envelope version.Additional properties are NOT allowed.
-
ALWAYS
nulltoday. Once the public API accepts writes this carries theIdempotency-Keyheader of the write that caused the change, so a consumer can tie an event back to its own request and collapse the duplicates a retried write would otherwise produce. Null stays a legitimate value even then: a change made in the product UI or by a cron has no originating request to key on.Maximum length is
255. -
Event-specific body. Narrowed by each concrete event schema below.
Responses
-
The consumer accepted the delivery. Any 2xx acknowledges the message and it is not sent again.
-
The consumer rejected the delivery. Handled exactly like a 5xx: the message is retried with backoff, because a rejection cannot be told apart from a consumer that is briefly misconfigured.
-
The consumer failed to handle the delivery. Retried with backoff. A timeout is the same case and is retried too.
{
"id": "018f2a92-3232-7000-8000-000000000032",
"type": "highlight.created",
"api_version": "2026-08-26",
"occurred_at": "2026-08-26T19:11:27Z",
"newsletter_id": "7d3f1c02-58a1-4a4e-9a0b-2f6d1c9e4411",
"actor": null,
"idempotency_key": null,
"data": {
"highlight_id": "d4e5f607-1829-4a31-b2c3-d4e5f6071829",
"article_id": "4c9e2f81-0b7a-4d13-8e55-1a2b3c4d5e6f",
"quote": "The moderation load is the product, not a tax on it.",
"start_offset": 4218,
"end_offset": 4271,
"owner_key": "4f2a9c1e7b3d6a05",
"message_id": null,
"created_at": "2026-08-26T19:11:27Z"
}
}
{
"id": "018f2a92-3333-7000-8000-000000000033",
"type": "highlight.created",
"api_version": "2026-08-26",
"occurred_at": "2026-08-26T19:14:50Z",
"newsletter_id": "7d3f1c02-58a1-4a4e-9a0b-2f6d1c9e4411",
"actor": null,
"idempotency_key": null,
"data": {
"highlight_id": "e5f60718-2930-4b42-c3d4-e5f607182930",
"article_id": "4c9e2f81-0b7a-4d13-8e55-1a2b3c4d5e6f",
"quote": "Community is a distribution channel that answers back.",
"start_offset": 812,
"end_offset": 860,
"owner_key": "9b1d0e6a3c4f27b8",
"message_id": "c2d3e4f5-0617-4829-93a4-b5c6d7e8f90a",
"created_at": "2026-08-26T19:14:50Z"
}
}