Black Friday in 1 day: will your customers be able to pay? 25% off the first year and free setup, until 30 NovemberSee the offer →
Integration
run.failed / run.recovered events, X-Pathly-* headers and signature verification.
Get my API keyOpenAPI contract
Full document, no authentication, ready for your client generator.
Supported events: run.failed, run.recovered, incident.opened, incident.resolved (the last two also by subscription, POST /v1/hooks, for Zapier or Make). Headers: X-Pathly-Id, X-Pathly-Event, X-Pathly-Timestamp, X-Pathly-Signature (HMAC-SHA256 of `${timestamp}.${rawBody}`, sha256= prefix). URL stays encrypted at rest; reads expose a fingerprint.
Verify the signature in constant time (timingSafeEqual). Reject stale timestamps (replay). Return 2xx quickly; process asynchronously.
Create
curl -X POST https://api.pathlyhq.com/v1/webhooks \
-H "Authorization: Bearer $PATHLY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.example.com/hooks/pathly",
"events": ["run.failed", "run.recovered"]
}'Node — verify the signature
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(secret, timestamp, rawBody, signature) {
const expected =
"sha256=" +
createHmac("sha256", secret)
.update(`${timestamp}.${rawBody}`)
.digest("hex");
const a = Buffer.from(signature);
const b = Buffer.from(expected);
return a.length === b.length && timingSafeEqual(a, b);
}Python — verify the signature
import hashlib, hmac
def verify(secret: str, timestamp: str, raw_body: bytes, signature: str) -> bool:
digest = hmac.new(
secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256
).hexdigest()
expected = f"sha256={digest}"
return hmac.compare_digest(expected, signature)