Events
| type | When |
|---|---|
| Issue.create | New card |
| Issue.update | Status / title / close comment |
| Issue.comment | Standalone comment |
| Issue.test | Sample from webhook_test |
json
{
"type": "Issue.update",
"key": "CC-12",
"status": "done",
"at": 1730000000000
}Register
- Desk → Workflow → Webhooks → paste an https URL → Add.
- Save the whsec_… secret (shown once).
- Hit Test. Check webhook_logs if delivery fails.
Header x-alien-pm-signature: t=<ms>,v1=<hex HMAC-SHA256 of "<t>.<body>">. Register via webhook_save (person OK).
bash
curl -sS -X POST 'https://pm-api.cloudcrew.si/actions/webhook_save' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"url":"https://hooks.example.com/pm"}'Verify (Node)
typescript
import { createHmac, timingSafeEqual } from "node:crypto";
export function verifyPmSignature(rawBody: string, header: string, secret: string) {
// header: t=<ms>,v1=<hex>
const parts = Object.fromEntries(header.split(",").map((p) => p.trim().split("=")));
const t = parts.t;
const v1 = parts.v1;
if (!t || !v1) return false;
const expect = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
try {
return timingSafeEqual(Buffer.from(expect), Buffer.from(v1));
} catch {
return false;
}
}