Skip to content

Farkitect is in early access. New features arrive most weeks, and these pages are updated with them. See What's New for the latest.

Webhooks

A webhook posts each event to an address of yours as it happens, so your program hears about a change without asking. Events reach your address about 15 seconds after the change at most.

On the website: owners and admins can do everything below without a program, under Organisation Settings › Developers › Webhooks: Add endpoint, then the row’s ⋯ menu for Send test, Switch off or on, Edit, Show secret, New secret and Remove. Each endpoint’s page lists its deliveries, with the receiver’s answer and Retry. The website and the API share the same rules, so an endpoint made in one can be managed in the other.

Through the API: webhooks are managed with a whole-organisation key that has May manage the organisation’s webhooks ticked (Organisation Settings › Developers). An organisation can have up to 5 endpoints.

Terminal window
curl https://api.farkitect.com/v1/webhook-endpoints \
-H "Authorization: Bearer $FARKITECT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/farkitect/webhooks", "types": ["element.created", "element.updated", "element.deleted"] }'
  • url: an HTTPS address on the internet. Farkitect never sends to a private or local address, and doesn’t follow redirects.
  • types: the event types to send; leave it out for all.
  • projectIds: only these projects; leave it out for every project of the organisation.

The answer includes the endpoint’s secret (whsec_…). The API shows it this once; keep it with your receiver to check each delivery’s signature. Owners and admins can look it up again on the website (Show secret, recorded each time).

Call What it does
GET /v1/webhook-endpoints Your endpoints, with when each last succeeded and failed
PATCH /v1/webhook-endpoints/{id} Change the address, types or projects; "enabled": false stops sending, true starts again
DELETE /v1/webhook-endpoints/{id} Remove it
POST …/{id}/rotate-secret A new secret. For 24 hours each delivery is signed with both, so you can change over without missing any
POST …/{id}/ping Send a ping event now, to test your receiver
GET …/{id}/deliveries What was sent in the last 30 days, newest first: status, attempts and the start of your receiver’s answer
POST …/{id}/deliveries/{deliveryId}/retry Send a failed delivery again

A POST with a JSON body: the event, as GET …/events?include=item gives it, with the item as it is when it’s sent under current (null if it has since been deleted).

{
"object": "event",
"id": "k97…",
"type": "element.updated",
"occurredAt": "2026-11-12T03:15:02.120Z",
"projectId": "k57…",
"item": { "kind": "element", "id": "jn7…" },
"changes": ["name"],
"actor": { "kind": "user", "name": "Rich Anderson" },
"current": { "object": "element", "id": "jn7…", "name": "Customer Portal", "…": "…" }
}

A ping has "type": "ping" and no item. Ignore types you don’t recognise.

Each delivery carries three headers, in the Standard Webhooks format:

  • webhook-id: the event’s id. The same event sent again has the same id.
  • webhook-timestamp: when it was sent, in seconds.
  • webhook-signature: v1, and an HMAC-SHA256, in base64, of id.timestamp.body made with your secret. After a rotation there are two, separated by a space.

The Standard Webhooks libraries check all of this in a line or two. Check the raw body, before any JSON parsing:

// npm install standardwebhooks
import { Webhook } from "standardwebhooks";
const wh = new Webhook(process.env.FARKITECT_WEBHOOK_SECRET!.replace(/^whsec_/, ""));
const event = wh.verify(rawBody, headers); // throws if it isn't from Farkitect, or is too old
# pip install standardwebhooks
from standardwebhooks.webhooks import Webhook
wh = Webhook(os.environ["FARKITECT_WEBHOOK_SECRET"].removeprefix("whsec_"))
event = wh.verify(raw_body, headers)
  • Answer with any 2xx within 10 seconds. Do the work afterwards: put the event in a queue and answer at once.
  • Anything else is retried: after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours (about a day and a half), then the delivery is marked failed. You can send it again with …/retry.
  • Expect repeats and any order. Use webhook-id to skip an event you’ve already handled, and occurredAt to put events in order.
  • An endpoint that fails for 5 days is switched off, and your organisation’s owners and admins are emailed. Fix the receiver, then switch it on (on the endpoint’s page, or with PATCH and "enabled": true). Nothing is lost while it’s off: catch up with GET …/events, which keeps 30 days.

Farkitect

Model anything.

“Welcome back — your diagrams have been plotting without you.”


Release 385 · 27 Nov 2026

Top packages: Inclusion and Sharing; Create New Version; Delete from Project

Release
385
Released
27 Nov 2026, 21:29 UTC
Built
27 Nov 2026, 21:30 UTC
Environment
Production
Surface
Docs
Commit
a5968f3
Branch
main