Developers
Your farm emits events. Point them at any URL you want.
Every farm eventually wants something no vendor ships: a dashboard on the barn TV, a home-grown irrigation controller that reacts to alerts, a county reporting script, a bridge to software we have never heard of. The usual answer is polling an API on a timer and hoping you did not miss anything between polls.
The better answer is the one production systems use with each other: when something happens, push it, sign it, and retry until it lands.
How it actually works
FarmHub POSTs signed JSON to any HTTPS URL you configure, whenever the events you care about occur.
- Six event types, pushed as they happen. Harvest recorded, alert raised, alert resolved, corrective action resolved, recall initiated, and report generated. Each event POSTs to your endpoint as JSON with the event name in a header.
- Every payload is HMAC-SHA256 signed. FarmHub generates a signing key for the connection and signs each request body, sending the signature in an X-FarmHub-Signature header. Recompute the HMAC over the raw body and compare. If it does not match, it is not from us.
- Delivery retries with backoff. If your endpoint is down or returns an error, FarmHub retries with backoff. Each delivery carries a unique delivery id header so your handler can deduplicate retries.
- Payloads are versioned, and you control the upgrade. When the payload shape changes, the version is bumped, and existing connections stay pinned to their version until you opt in. Your integration does not break because we shipped a field.
It is the same delivery machinery behind our Slack, Teams, and PagerDuty integrations, with the destination handed to you.
WHAT YOU CAN COUNT ON
What you can count on
The guarantees, precisely:
- FarmHub generates the signing key. The HMAC key is created at connect time and stored encrypted on the connection. There is no shared global secret, and rotating a connection’s key affects only that connection.
- Headers built for real handlers. Each request carries the signature, the event name, and a unique delivery id, so you can verify, route, and deduplicate without parsing the body first.
- Kill switch. Disable the connection instantly and deliveries stop. Useful when your endpoint is misbehaving or you are rotating infrastructure.
- Hash-chained audit rows. Every delivery attempt is recorded in an audit log whose rows are hash-chained, so the history of what was sent where is tamper-evident.
What we do not do
The honest boundaries:
- Delivery is at-least-once, not exactly-once. Retries mean your handler may see a delivery twice. Deduplicate on the delivery id.
- Webhooks are outbound only. This integration does not accept inbound data; it tells your systems what happened in FarmHub.
- The six event types above are what ships today. We would rather list six real events than promise a catalog we have not built.
Setup, honestly
You need an HTTPS endpoint that can receive a JSON POST.
- In FarmHub, open Integrations, choose Custom Webhook, and enter your endpoint URL. FarmHub generates the HMAC signing key.
- In your handler, verify the X-FarmHub-Signature header by recomputing HMAC-SHA256 over the raw request body with the signing key.
- Respond with a 2xx quickly; do heavy processing async. Non-2xx responses are retried with backoff.
- Trigger a test delivery and confirm your signature verification passes before relying on the feed.
Questions farmers ask
How do I verify a webhook came from FarmHub?
Compute HMAC-SHA256 over the raw request body using the connection’s signing key and compare it to the X-FarmHub-Signature header, which carries the hex digest prefixed with sha256=. Reject anything that does not match.
What events can I subscribe to?
Harvest recorded, alert raised, alert resolved, corrective action resolved, recall initiated, and report generated. The event name arrives in the X-FarmHub-Event header.
What happens if my endpoint is down?
FarmHub retries the delivery with backoff. Because delivery is at-least-once, your handler should deduplicate using the X-FarmHub-Delivery id header.
Will payload changes break my integration?
No. Payloads are versioned, and your connection stays pinned to its payload version until you opt into the new one.
Can I rotate the signing key?
Each connection has its own FarmHub-generated key stored encrypted. Reconnecting issues a fresh key, and the kill switch stops deliveries instantly while you rotate.
READY FOR THE NEXT SHIFT
Build the thing we did not think of
Point FarmHub\u2019s signed event stream at your own endpoint and wire the farm to whatever you can imagine: the barn dashboard, the controller, the report bot. You do not need our permission, just a URL.
Start free