---
title: "Webhooks"
description: "Webhook של עונים לי בתורים למערכת ניהול הלקוחות (Make, Zapier, n8n או שרת שלכם): אירועי שיחה ותור, אימות חתימת HMAC-SHA256 בפייתון וב-Node, וניסיונות חוזרים."
canonical: "https://onimli.com/docs/webhooks/"
last-updated: "2026-10-30"
language: "he"
source: "https://onimli.com"
---

# Webhooks

> Webhook של עונים לי בתורים למערכת ניהול הלקוחות (Make, Zapier, n8n או שרת שלכם): אירועי שיחה ותור, אימות חתימת HMAC-SHA256 בפייתון וב-Node, וניסיונות חוזרים.

מקור: https://onimli.com/docs/webhooks/

---

- [בית](https://onimli.com/)
- [עונים לי בתורים](https://onimli.com/agent/)
- Webhooks

כל שיחה ותור נשלחים לכתובת שלכם ב-POST, חתומים ב-HMAC-SHA256.

## עונים לי בתורים

בלוח הבקרה, ב«חיבורים», מדביקים כתובת: Make, Zapier, n8n או כל שרת. הסוד מוצג פעם אחת.

- **כתובת:** https בלבד. כל 2xx נחשב התקבל.
- **ניסיונות חוזרים:** אחרי דקה, 5 דקות, 30 דקות, שעתיים, 6 ו-24 שעות.
- זמן תשובה: 10 שניות. יומן המשלוחים נשמר 7 ימים.

| אירוע | מתי |
| --- | --- |
| `call.completed` | שיחה נגמרה, עם סיכום ותמלול |
| `appointment.booked` | נקבע תור |
| `appointment.rescheduled` | תור הוזז |
| `appointment.cancelled` | תור בוטל |
| `appointment.confirmed` | הלקוח אישר הגעה |
| `ping` | בדיקה מלוח הבקרה |

| כותרת | מה יש בה |
| --- | --- |
| `X-Onimli-Event` | שם האירוע |
| `X-Onimli-Delivery` | מזהה משלוח, קבוע בכל הניסיונות. לפיו מסננים כפילויות |
| `X-Onimli-Signature` | `t=…,v1=…` |

```json
{"id": "evt_…", "event": "call.completed", "created_at": "2026-11-03T09:12:40+02:00",
 "agent": {"id": 12, "name": "נועה"},
 "call": {"id": 991, "started_at": "2026-11-03T09:10:17+02:00", "seconds": 143,
          "caller": {"phone": "+972501234567", "name": "שירה"},
          "summary": "קבעה בדיקה כללית לשלישי 3.11 ב-10:00",
          "next_action": null, "outcome": "booked",
          "transcript": [{"who": "caller", "text": "…"}, {"who": "agent", "text": "…"}]},
 "appointment": {"id": 55, "service_name": "בדיקה כללית",
                 "starts_at": "2026-11-03T10:00:00+02:00", "ends_at": "2026-11-03T10:30:00+02:00",
                 "caller_phone": "+972501234567", "caller_name": "שירה",
                 "status": "booked", "source": "call", "call_id": 991}}
```

- `outcome`, אחד מאלה: `booked` · `rescheduled` · `cancelled` · `message`.
- או: `transfer` · `info` · `hangup`.
- אירועי `appointment.*` נושאים `appointment` ו-`agent`, בלי `call`.

## אימות חתימה

```text
X-Onimli-Signature: t={unix},v1={hex}
v1 = hex(HMAC_SHA256(secret, "{t}.{raw body}"))
```

בודקים על הגוף הגולמי, לפני פענוח ה-JSON, ודוחים `t` ישן מ-5 דקות.

```python
import hashlib, hmac, time

def verify(secret: str, header: str, body: bytes) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    if abs(time.time() - int(parts["t"])) > 300:
        return False
    want = hmac.new(secret.encode(), f"{parts['t']}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(want, parts["v1"])
```

```javascript
import crypto from "node:crypto";

export function verify(secret, header, rawBody) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
  const want = crypto.createHmac("sha256", secret)
    .update(`${parts.t}.`).update(rawBody).digest("hex");
  return want.length === parts.v1.length &&
    crypto.timingSafeEqual(Buffer.from(want), Buffer.from(parts.v1));
}
```

**עונים לי בתורים**[מה זה](https://onimli.com/agent/)[Webhooks](https://onimli.com/docs/webhooks/)[לוח הבקרה](https://onimli.com/app/#agent)

---

עוד על השירות: https://onimli.com/llms.txt · כל העמודים: https://onimli.com/sitemap.xml
