Dasturchilar
Webhooklar
Yozuv oʻzgarganda URL manzilingizga imzolangan POST.
Sozlash
SettingsDevelopersWebhooksWorkspace egalari va adminlari
- 1
URL qoʻshing
Ochiq
https://manzil. Xususiy va ichki manzillar qabul qilinmaydi. - 2
Hodisalarni tanlang
Faqat siz tanlagan hodisalar yuboriladi.
- 3
Sirni saqlang
whsec_…imzo siri faqat bir marta koʻrsatiladi.
- Send test
pinghodisasini yuboradi. - Soʻnggi yetkazishlar: oxirgi 14 kun.
Hodisalar
| Yozuv | created | updated | deleted |
|---|---|---|---|
| contact | contact.created | contact.updated | contact.deleted |
| company | company.created | company.updated | company.deleted |
| deal | deal.created | deal.updated | deal.deleted |
| note | note.created | note.updated | note.deleted |
| task | task.created | task.updated | task.deleted |
Quyidagilardagi oʻzgarishlarda yuboriladiilovaAPIimportworkflowlar
Soʻrov
POST
https://your-app.example.com/webhooks/promptlab| Sarlavha | Misol |
|---|---|
PromptLab-Event | deal.updated |
PromptLab-Delivery | evt_… |
PromptLab-Signature | t=1700000000,v1=<hex> |
User-Agent | PromptLab-Webhooks/1.0 |
Content-Type | application/json |
{
"id": "evt_…",
"type": "deal.updated",
"createdAt": "2026-10-22T08:15:51.000Z",
"data": {
"id": "<record id>",
"object": "deal",
"name": "API deal",
"changes": [
{ "field": "stage", "from": "NEW", "to": "QUALIFIED" }
]
},
"actor": { "type": "user", "id": "<user id>" }
}changesfaqatupdatedhodisalarida keladi.changesfaqat API qaytaradigan maydonlarni oʻz ichiga oladi.namemaʼlum boʻlsa qoʻshiladi.- Hodisalar qisqa: toʻliq yozuvni API orqali oling.
- Shaxsiy vazifalar hamda loyihadagi eslatma va vazifalar uchun hodisa yuborilmaydi.
actor.typeuserintegrationsystemImzoni tekshiring
- 1
PromptLab-Signaturesarlavhasidantvav1qiymatlarini oling. - 2Siringiz bilan
<t>.<raw body>ning HMAC-SHA256 qiymati, hex koʻrinishida. - 3
v1bilan doimiy vaqtda solishtiring. - 4
t5 daqiqadan eski boʻlsa, rad eting.
import crypto from "node:crypto";
// rawBody: the request body exactly as received (a string or Buffer)
export function verify(rawBody, header, secret) {
if (typeof header !== "string") return false;
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 5 * 60) return false;
const expected = crypto
.createHmac("sha256", secret)
.update(`${t}.${rawBody}`)
.digest("hex");
const a = Buffer.from(expected);
const b = Buffer.from(parts.v1 ?? "");
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
// Express: read the body raw, so it is signed exactly as sent
// app.post("/webhooks/promptlab", express.raw({ type: "application/json" }), (req, res) => {
// if (!verify(req.body, req.get("PromptLab-Signature"), process.env.PROMPTLAB_WEBHOOK_SECRET)) return res.sendStatus(400);
// const event = JSON.parse(req.body);
// res.sendStatus(200);
// });import hashlib, hmac, time
# raw_body: the request body exactly as received (bytes)
def verify(raw_body: bytes, header: str, secret: str) -> bool:
try:
parts = dict(p.split("=", 1) for p in (header or "").split(","))
t = int(parts.get("t", 0))
except ValueError:
return False
if not t or abs(time.time() - t) > 5 * 60:
return False
signed = f"{t}.".encode() + raw_body
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts.get("v1", ""))Qayta urinishlar
10 s
Har bir urinish uchun kutish vaqti
6
Taxminan 30 daqiqa ichida urinishlar
20
Ketma-ket muvaffaqiyatsiz hodisalar webhookni oʻchiradi
- 2xx boʻlmagan har qanday javob yoki kutish vaqti tugashi eksponensial kechikish bilan qayta yuboriladi.
- Takrorlarni eʼtiborsiz qoldirish uchun hodisaning
idmaydonidan foydalaning. - Oʻchib qoldimi? Settings boʻlimida qayta yoqing.





