Inkling
All docs

Integrating

Receiving Inkling webhooks

Receiving workspace events on your own endpoint.

Rendered from docs/WEBHOOKS.md in the repository. Markdown source

A workspace owner can send workspace events to any https endpoint: n8n, Zapier, Make, a serverless function or your own server. This guide is for the person writing the receiving side. Slack and Discord webhooks are configured in the same place but get a chat message, not the JSON described here. 한국어: WEBHOOKS.ko.md.

Decisions behind this design: ADR 1190 (payload, signature, secrets, SSRF), ADR 1191 (delivery list, resend), ADR 1192 (auto-disable). Delivery itself goes through the transactional outbox (ADR 1081).

Setting one up

Workspace settings → Webhooks → type Generic (JSON), enter the URL, pick the events, Add webhook. The signing secret (whsec_…) is shown once, right after it is created. Store it with the receiver; Inkling never shows it again (you can create a new one, see Rotating the secret).

The URL must be https:// on the default port (443), without a user name, password or #fragment. A query string is allowed. The host must resolve only to public internet addresses: loopback, private (10/8, 172.16/12, 192.168/16), link-local (169.254/16, cloud metadata), CGNAT, IPv6 ULA and similar addresses are refused when you save the webhook and again on every delivery (the connection is made to the address that was checked, so a DNS change between check and connect cannot redirect it).

Send test event posts a type: "test" event right away, so you can check the signature code before real events arrive.

The request

POST /your/path HTTP/1.1
Content-Type: application/json
User-Agent: Inkling-Webhooks/1
X-Inkling-Delivery: 48213
X-Inkling-Event: comment
X-Inkling-Signature: t=1762500000,v1=5f2b…c9e1
HeaderMeaning
X-Inkling-DeliveryId of this delivery. The same value on every retry and when an owner sends it again by hand. Equal to the body's id. Use it to drop duplicates.
X-Inkling-EventThe event type (comment, mention, …, or test). Equal to the body's type.
X-Inkling-Signaturet=<unix seconds> and one or more v1=<hex> signatures (see below). t is the time of this attempt, so a retry carries a new t.

Inkling waits at most 8 seconds for the response (3 seconds to connect) and reads at most 16 KiB of it. Redirects are not followed: a 3xx response counts as a failed delivery.

The body (version 1)

{
  "version": 1,
  "id": "48213",
  "type": "comment",
  "occurredAt": "2026-11-07T09:12:44.512Z",
  "workspace": { "id": "6b1d…", "name": "Product" },
  "actor": { "id": "2f0a…", "name": "Alice", "via": null },
  "page": { "id": "9c3e…", "title": "Launch plan", "url": "https://notes.example.com/w/6b1d…/p/9c3e…" },
  "comment": { "id": "d41a…" }
}

Common fields:

FieldTypeNotes
version1Fields may be added within a version; a removal or a change of meaning bumps it. Ignore fields you do not know.
idstringDelivery id, same as X-Inkling-Delivery. Test events use test_<uuid>.
typestringOne of the events below, or test.
occurredAtISO 8601When the event was queued (not when this attempt was made).
workspace{ id, name }
actor{ id, name, via } or nullWho caused the event. via is the name of the AI connection (MCP / OAuth client) when an agent did it. null for reminders, digests and when the person no longer exists.

Links (url) are present when the server has APP_URL or PUBLIC_URL set, otherwise null. They open in Inkling and need a signed-in member like any page link.

Events (the same list as for Slack and Discord; a webhook receives only the ones ticked):

typeWhenExtra fields
commentA comment on a shared pagepage, comment: { id }
mentionA comment @mentions memberspage, comment: { id }, users: [{ id, name }] (mentioned members)
reminderA page's due date is todaypage
page_createdA page was created in the shared section (sent 20 s later; dropped if it was moved to private or deleted meanwhile)page
assignedA member became a document owner or was put in a person cellpage, users: [{ id, name }], field (the person field's name, or owner)
review_dueDaily: shared documents past their review datepages: [{ id, title, url, owner }] (≤ 50), total, url (review screen)
agent_digestDaily: shared pages AI connections edited in the last daypages: [{ id, title, url, owner: null }] (≤ 50), total, url (activity screen)
testSend test eventactor = the owner who pressed it, url (workspace)

What is never sent:

Verifying the signature

v1 is the lowercase hex HMAC-SHA256 of the string <t>.<raw request body>, keyed with the whole secret string (whsec_…, as UTF-8 bytes). To verify:

  1. Read the raw body bytes. Do not parse and re-serialise the JSON first: any change of whitespace or key order breaks the signature (in Express use express.raw({ type: 'application/json' }) for this route, not express.json()).
  2. Split the header on ,; take t and every v1.
  3. Reject when t is more than 5 minutes away from your clock (replay protection; keep the receiver's clock synchronised with NTP).
  4. Compute the HMAC of t + "." + body and compare it with each v1 in constant time. Accept if any matches (there are two while a rotated secret is still valid).
  5. Then drop the request if you already processed its X-Inkling-Delivery id (see below).

Node.js (no dependencies):

import { createHmac, timingSafeEqual } from 'node:crypto'

export function verifyInkling(header, rawBody, secret, toleranceSeconds = 300) {
  const parts = String(header ?? '').split(',').map((p) => p.split('='))
  const t = Number(parts.find(([k]) => k === 't')?.[1])
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false
  const expected = createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest()
  return parts.some(([k, v]) => {
    if (k !== 'v1') return false
    const got = Buffer.from(v ?? '', 'hex')
    return got.length === expected.length && timingSafeEqual(got, expected)
  })
}

// node:http: collect the raw body, verify, then parse.
// const raw = Buffer.concat(chunks)
// if (!verifyInkling(req.headers['x-inkling-signature'], raw, process.env.INKLING_WEBHOOK_SECRET)) return res.writeHead(401).end()
// const event = JSON.parse(raw.toString('utf8'))

Python (standard library):

import hashlib, hmac, time

def verify_inkling(header: str, raw_body: bytes, secret: str, tolerance: int = 300) -> bool:
    parts = [p.split("=", 1) for p in (header or "").split(",") if "=" in p]
    t = next((v for k, v in parts if k == "t"), None)
    if t is None or not t.isdigit() or abs(time.time() - int(t)) > tolerance:
        return False
    expected = hmac.new(secret.encode(), t.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    return any(k == "v1" and hmac.compare_digest(v, expected) for k, v in parts)

# Flask: verify_inkling(request.headers.get("X-Inkling-Signature"), request.get_data(), SECRET)

Responding, retries and duplicates

Delivery list

Each webhook has a Recent deliveries list (the latest 30 are shown, about the newest 100 are kept): event, result (HTTP status or error), time taken, attempts, the next retry time, and for non-2xx answers the first 200 printable characters of your response body (2xx bodies are never stored). Resend queues the delivery again with the same id; it is re-checked (privacy) and re-signed at that moment.

Rotating the secret

New secret creates a new secret and shows it once. For the next 24 hours every request carries two v1 signatures, one per secret, so you can deploy the new secret without missing events; after that only the new one is used. Tick Stop using the old secret at once first if the old secret leaked.

Secrets (and URLs) are encrypted in the database with APP_SECRET_KEY when the server has one (ADR 1111). If that key is removed or changed, deliveries fail with "Signing secret cannot be decrypted" until a new secret is created.

Automatic disabling

A generic webhook is turned off when its last five or more events all failed and the first of those failures is at least 24 hours old. A short outage (a deploy, a restart) therefore does not turn it off, while an endpoint that is gone stops being called after a day. Workspace owners get a notification; Enabled turns it back on and resets the count. Slack and Discord webhooks keep their rule: five failed events in a row.

Markdown sourceView on GitHubAll docs