Skip to main content

Webhooks

Subscribe an HTTPS endpoint to iGuide events through the Portal API and receive an HTTP POST the moment something happens, instead of polling for it.

A webhook belongs to your account, not to an individual iGuide. You register an endpoint once and subscribe it to the event types you care about. Every matching event across the account is then delivered to it.

Coming from legacy webhooks?

Legacy webhooks are registered on each iGuide and deliver only the ready event. They keep working, but they do not receive the events described here. See how the two systems differ.

What you'll need:

  • An App ID and App Token—see Authentication
  • An HTTPS endpoint that can accept a POST and return a status code quickly

Setup​

Four calls take you from nothing to an endpoint receiving events. The order matters: enable the webhook last, once your endpoint is live with its secret.

All calls use the two authentication headers:

export APP_ID="your-app-id"
export APP_TOKEN="your-app-token"

1. Register the endpoint​

Register your endpoint URL (Create a webhook):

curl -X POST https://manage.youriguide.com/api/v1/webhooks \
-H "X-Plntr-App-Id: $APP_ID" \
-H "X-Plntr-App-Token: $APP_TOKEN" \
-H "User-Agent: YourCompany-Integration/1.0" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/hooks/iguide"}'

The webhook comes back disabled, with an id prefixed wh_:

{
"id": "wh_a84336a0-ed7d-43b3-917e-0d26d52faac9",
"url": "https://example.com/hooks/iguide",
"enabled": false,
"verifiedAt": null,
"createdAt": "2026-08-04T23:04:27.727494Z",
"updatedAt": "2026-08-04T23:04:27.727494Z"
}

Export that id. Every call below is scoped to it:

export WEBHOOK_ID="wh_a84336a0-ed7d-43b3-917e-0d26d52faac9"

2. Subscribe it to an event type​

Make one call per event type you want (Subscribe a listener):

curl -X POST https://manage.youriguide.com/api/v1/webhooks/$WEBHOOK_ID/listeners \
-H "X-Plntr-App-Id: $APP_ID" \
-H "X-Plntr-App-Token: $APP_TOKEN" \
-H "User-Agent: YourCompany-Integration/1.0" \
-H "Content-Type: application/json" \
-d '{"event": "iguide.created"}'

A webhook with no listeners is registered but receives nothing.

3. Mint a signing key​

Mint the key your endpoint uses to check our signatures (Create a signing key):

curl -X POST https://manage.youriguide.com/api/v1/webhooks/$WEBHOOK_ID/signing-keys \
-H "X-Plntr-App-Id: $APP_ID" \
-H "X-Plntr-App-Token: $APP_TOKEN" \
-H "User-Agent: YourCompany-Integration/1.0"
The secret is returned once

secret appears in this response and nowhere else. Capture it now and store it wherever your endpoint reads its configuration from. If you lose it, mint a new key and revoke the old one.

Deploy the secret to your endpoint before the next step. The endpoint must already answer the verification probes correctly.

4. Enable delivery​

Turn the webhook on (Update a webhook):

curl -X PATCH https://manage.youriguide.com/api/v1/webhooks/$WEBHOOK_ID \
-H "X-Plntr-App-Id: $APP_ID" \
-H "X-Plntr-App-Token: $APP_TOKEN" \
-H "User-Agent: YourCompany-Integration/1.0" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'

Enabling starts verification. We probe the endpoint within about five minutes, and a failed probe disables the webhook again.

Verification gates delivery

A webhook receives nothing until it has verified. Changing the URL clears verifiedAt and stops delivery again until the endpoint re-verifies.

What a delivery looks like​

Every delivery is a POST with a JSON body and a set of X-Plntr-* headers:

POST /hooks/iguide HTTP/1.1
Content-Type: application/json
X-Plntr-Delivery-Id: 8250cf7b-2b64-4dbd-b9ee-5f8bb3db4b3f
X-Plntr-Event-Id: 2f822d92-f15f-4534-b539-8d8962b51759
X-Plntr-Event-Type: iguide.created
X-Plntr-Timestamp: 1787924368
X-Plntr-Signature: t=1787924368,v1=aa172e4ab663...
{
"id": "8250cf7b-2b64-4dbd-b9ee-5f8bb3db4b3f",
"eventId": "2f822d92-f15f-4534-b539-8d8962b51759",
"type": "iguide.created",
"recordedAt": "2026-08-28T13:39:25Z",
"data": {
"iguideId": "igFKUNRGC5V8DD1"
}
}

Return 200 or 202 once you have durably recorded the delivery, and return it promptly. A delivery that is held open long enough to time out is retried as if it had failed. Anything else counts as a failure; see How your response is read.

The delivery contract​

These are the guarantees your endpoint has to be built against. They follow the same model as Stripe and Shopify.

Delivery ids and event ids​

The body carries both, each mirrored as a header:

FieldHeaderIdentifiesSame value across
idX-Plntr-Delivery-Idthis event to this webhookevery retry of that delivery
eventIdX-Plntr-Event-Idthe thing that happenedevery webhook the event reached

Delivery is at-least-once. The same delivery can arrive more than once: a retry after your endpoint already committed, or a crash between our POST and our recording of your response. Deduplicate on id and treat a repeat as already handled.

One event can also arrive more than once. An event fans out to every subscribed webhook, and two of your webhooks may point at the same endpoint. The same occurrence then arrives twice with different ids, so deduplicating on id will not catch it. Deduplicate on eventId when your handler should run once per occurrence rather than once per delivery.

eventId is also the id to quote in a support request. It identifies the event across every webhook it reached, while a delivery id only has meaning within a single webhook.

No ordering guarantee​

Deliveries are fanned out and sent concurrently, and retried independently, so events can arrive out of order. Do not infer order from arrival. Reconcile using the event timestamp (recordedAt in the body, mirrored by the X-Plntr-Timestamp header) and keep the latest state per entity.

Verifying the signature​

Every request carries an X-Plntr-Signature header:

X-Plntr-Signature: t=<unix-seconds>,v1=<hex HMAC-SHA256>

The HMAC is computed over the exact string "{t}.{raw_body}": the timestamp, a literal dot, then the raw request body bytes.

To verify:

  1. Recompute HMAC-SHA256 over "{t}.{raw_body}" with your signing secret.
  2. Constant-time compare against each v1 component.
  3. Reject a stale t outside whatever tolerance window you choose, to limit replay attacks.
Common mistakes

Verify the raw bytes. Compute the HMAC over the body exactly as received, before any JSON parse and re-encode. Re-encoding changes the bytes, so the signature will never match.

Use the secret exactly as we gave it to you. It looks like 64 hex characters, so it is tempting to decode it to 32 bytes first. Don't: the key is the 64-character string itself. Decoding it produces a valid-looking HMAC that never matches.

During a key rotation the header carries one v1= component per active signing key. Accept the request if any of them matches. This is what lets you rotate a secret without dropping traffic.

Verifying a delivery​

Both examples below implement the whole contract: signature verification, timestamp tolerance and the 200/403/401 statuses the verification handshake checks for.

Node.js (Express)
const crypto = require("crypto");
const express = require("express");

const SECRET = process.env.WEBHOOK_SECRET;
const TOLERANCE_SECONDS = 300;

const app = express();
// The raw bytes are what was signed. express.json() would parse and discard
// them, and re-encoding changes the bytes, so the HMAC would never match.
app.use(express.raw({ type: "application/json" }));

app.post("/hooks/iguide", (req, res) => {
const header = req.get("X-Plntr-Signature");
if (!header) return res.sendStatus(401);

let timestamp = null;
const signatures = [];
for (const part of header.split(",")) {
const i = part.indexOf("=");
if (i === -1) continue;
const key = part.slice(0, i);
const value = part.slice(i + 1);
if (key === "t") timestamp = value;
else if (key === "v1") signatures.push(value);
}
if (!timestamp || signatures.length === 0) return res.sendStatus(403);

// Reject a stale timestamp before spending anything on the HMAC.
const t = Number(timestamp);
if (!Number.isFinite(t) || Math.abs(Date.now() / 1000 - t) > TOLERANCE_SECONDS) {
return res.sendStatus(403);
}

const expected = crypto
.createHmac("sha256", SECRET)
.update(`${timestamp}.`)
.update(req.body) // the raw Buffer
.digest();

// One v1 per active signing key during a rotation: any match is a pass.
const ok = signatures.some((sig) => {
const given = Buffer.from(sig, "hex");
return given.length === expected.length &&
crypto.timingSafeEqual(given, expected);
});
if (!ok) return res.sendStatus(403);

const event = JSON.parse(req.body.toString("utf8"));

// Acknowledge before doing the work. A delivery held open too long times
// out and gets retried.
res.sendStatus(200);
process(event); // dedupe on event.id / event.eventId in here
});
Python (Flask)
import hashlib, hmac, os, time
from flask import Flask, request

SECRET = os.environ["WEBHOOK_SECRET"].encode()
TOLERANCE_SECONDS = 300

app = Flask(__name__)

@app.post("/hooks/iguide")
def hook():
header = request.headers.get("X-Plntr-Signature")
if not header:
return "", 401

timestamp, signatures = None, []
for part in header.split(","):
key, _, value = part.partition("=")
if key == "t":
timestamp = value
elif key == "v1":
signatures.append(value)
if not timestamp or not signatures:
return "", 403

try:
if abs(time.time() - int(timestamp)) > TOLERANCE_SECONDS:
return "", 403
except ValueError:
return "", 403

raw = request.get_data() # bytes, exactly as received
expected = hmac.new(
SECRET, timestamp.encode() + b"." + raw, hashlib.sha256
).hexdigest()

# One v1 per active signing key during a rotation: any match is a pass.
if not any(hmac.compare_digest(expected, s) for s in signatures):
return "", 403

event = request.get_json()
enqueue(event) # dedupe on event["id"] / event["eventId"] in here
return "", 200

How your response is read​

You returnWhat happens
200, 202Delivered. No retry.
408, 429, 5xxTransient. Retried on the retry schedule.
No response (connection error or timeout)Transient. Retried on the retry schedule.
410 GoneYour webhook is disabled. Nothing is delivered to it again until you re-enable it.
any other 4xxPermanent. The delivery is dropped and never retried.
3xxRedirects are not followed. Retried on the retry schedule, like a 5xx.

Retries carry the same id, which is what makes dedupe on it work.

Retry schedule​

Each delivery gets five attempts in total. After a transient failure we wait before trying again, and each wait doubles, up to a 6-hour cap:

AttemptSent
1As soon as the event is queued for your webhook
21 hour after attempt 1
32 hours after attempt 2
44 hours after attempt 3
56 hours after attempt 4

The last attempt goes out about 13 hours after the first. If it fails too, the delivery is dropped. Each wait is a minimum, so an attempt can go out a little later than shown.

Do not answer a transient problem with a 4xx

A 4xx other than 408 or 429 tells us the delivery will never succeed, and the event is dropped. If your database is down, or a parse failed for a reason that might not recur, return a 5xx so the delivery is retried. Reserve 410 for an endpoint you are permanently retiring, since it switches the webhook off.

Endpoint verification (required)​

Verification proves your endpoint validates our signatures correctly. It is a precondition for delivery. An unverified webhook receives nothing.

Events recorded while you are unverified are dropped

They are not queued and not replayed. Verifying later delivers events from that point on, never the ones you missed. Deliveries already queued before verification lapsed are held and resume once you re-verify, but that only covers the handful in flight.

We send a batch of sample deliveries: some correctly signed, some deliberately mis-signed and some unsigned. Only the response status is checked; bodies are ignored. A correctly-implemented endpoint answers:

ProbeExpected status
Valid signature200 or 202
Invalid signature403
No signature header401

verifiedAt is stamped only when every probe is answered correctly. A webhook starts out unverified, and verifiedAt is cleared again whenever you change its URL. Delivery stops for as long as it is null.

We re-verify each webhook about once a week.

A failed verification disables your webhook

Any wrong answer to a probe sets enabled to false and clears verifiedAt. A timeout, a connection error or a 5xx counts as a wrong answer too, on the first verification and on every re-verification. Nothing is delivered until you fix the endpoint and re-enable the webhook with PATCH /webhooks/{id} and {"enabled": true}. Re-enabling starts a fresh verification.

Managing a webhook​

ActionCall
List your webhooksGET /webhooks
Inspect oneGET /webhooks/{id}
Move the endpointPATCH /webhooks/{id} with {"url": "..."}, which clears verifiedAt and pauses delivery until you verify again
Pause deliveryPATCH /webhooks/{id} with {"enabled": false}
Resume after a failed verificationPATCH /webhooks/{id} with {"enabled": true}, which starts a fresh verification
List subscriptionsGET /webhooks/{id}/listeners
Unsubscribe from an eventDELETE /webhooks/{id}/listeners/{event}
List signing keysGET /webhooks/{id}/signing-keys
Revoke a signing keyDELETE /webhooks/{id}/signing-keys/{keyId}
Delete the webhookDELETE /webhooks/{id}

Pausing stops fanout to that webhook. Events still occur and are still recorded, but they are not queued for this endpoint, and they are not replayed when you re-enable it.

Unsubscribe takes the event name

The path segment is the event string, not the listener's id: DELETE /webhooks/wh_.../listeners/iguide.created.

Full request and response schemas are in the API reference, and the payload of each event type in the event reference.

Rotating a signing key​

Because the signature header carries one v1 per active key, both keys stay valid during a rotation, so there is no hard cutover:

  1. Mint a new key. Deliveries now carry v1 for both keys.
  2. Deploy the new secret to your endpoint. Either key verifies, so nothing drops.
  3. Revoke the old key once the new secret is live everywhere.