Webhook
I webhook notificano il vostro server quando succede qualcosa in Meetingize, così non dovete eseguire il polling.
Ogni consegna è una POST HTTPS con un evento JSON, firmato con un secret noto solo a voi e a Meetingize.
Registrare un endpoint
Sezione intitolata “Registrare un endpoint”Nell’app web: Impostazioni > Sviluppatori > Aggiungi un endpoint. Oppure tramite l’API con lo scope webhooks:
curl -s -X POST "$MEETINGIZE_API/webhook_endpoints" \ -H "Authorization: Bearer $MEETINGIZE_API_KEY" -H "Content-Type: application/json" \ -d '{"url": "https://hooks.example.com/meetingize", "events": ["transcription.completed", "document.generated"]}'La risposta contiene il secret di firma (whsec_...), mostrato una sola volta. Gli URL devono usare https e
risolversi in un indirizzo pubblico (gli indirizzi privati e loopback vengono rifiutati). Per testare in locale,
esponete il vostro endpoint con un tunnel (ad esempio ngrok o Cloudflare Tunnel).
| Tipo | Quando | data.object |
|---|---|---|
transcription.completed | la trascrizione con diarizzazione è disponibile | job (+ meeting) |
transcription.failed | la trascrizione è fallita | job con error |
processing.completed | il report IA della riunione è pronto | job (+ meeting) |
processing.failed | il report IA è fallito dopo una trascrizione riuscita | job con error |
document.generated | una generazione di documento è riuscita | job (+ document) |
document.failed | una generazione di documento è fallita | job con error |
usage.threshold_reached | il consumo API del mese ha raggiunto il 50, l’80 o il 100 % del wallet, oppure l’80 o il 100 % del tetto di spesa | usage_alert |
ping | pulsante “invia un test” o POST /webhook_endpoints/{id}/test | { "message": "..." } |
Sottoscrivete "*" per ricevere tutti gli eventi tranne ping.
{ "id": "evt_7d1f...", "object": "event", "type": "transcription.completed", "created": "2026-10-11T14:03:22Z", "api_version": "2026-10-01", "livemode": false, "data": { "object": { "id": "job_9b0c...", "object": "job", "kind": "transcription", "status": "running", "stage": "processing", "meeting_id": "1b9e...", "metadata": { "crm_id": "42" }, "meeting": { "id": "1b9e...", "object": "meeting", "title": "RDV client", "status": "transcribed" } } }}Intestazioni
Sezione intitolata “Intestazioni”Content-Type: application/jsonUser-Agent: Meetingize-Webhooks/1.0Meetingize-Event-Id: evt_7d1f...Meetingize-Event-Type: transcription.completedMeetingize-Delivery-Id: whd_...Meetingize-Signature: t=1760191402,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bdVerificare la firma
Sezione intitolata “Verificare la firma”v1 è l’HMAC-SHA256 in esadecimale di "{t}.{raw_body}" con il vostro secret completo (whsec_...) come chiave. Per
verificare:
- leggete il corpo grezzo della richiesta (prima di qualsiasi parsing JSON);
- ricalcolate l’HMAC e confrontatelo in tempo costante con ciascun valore
v1=dell’intestazione; - rifiutate l’evento se
tdista più di 5 minuti da adesso (protezione da replay); - deduplicate su
Meetingize-Event-Id(le consegne avvengono almeno una volta).
Durante una rotazione del secret, il vecchio secret resta valido per 24 ore e l’intestazione contiene due valori
v1=.
import hashlib, hmac, time
def verify_meetingize_signature(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> bool: items = [p.split("=", 1) for p in header.split(",") if "=" in p] timestamps = [v for k, v in items if k == "t"] signatures = [v for k, v in items if k == "v1"] if not timestamps or not signatures: return False t = int(timestamps[0]) if abs(time.time() - t) > tolerance: return False expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest() return any(hmac.compare_digest(expected, s) for s in signatures)
# Flask examplefrom flask import Flask, request, abortapp = Flask(__name__)
@app.post("/meetingize")def meetingize_webhook(): if not verify_meetingize_signature(request.get_data(), request.headers.get("Meetingize-Signature", ""), secret="whsec_..."): abort(400) event = request.get_json() # enqueue work, return fast return "", 204Node.js
Sezione intitolata “Node.js”import crypto from 'node:crypto';import express from 'express';
function verifyMeetingizeSignature(rawBody, header, secret, toleranceSec = 300) { const parts = (header || '').split(',').map((p) => p.split('=')); const t = Number((parts.find(([k]) => k === 't') || [])[1]); const sigs = parts.filter(([k]) => k === 'v1').map(([, v]) => v); if (!t || !sigs.length || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false; const expected = crypto.createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest('hex'); return sigs.some((s) => s.length === expected.length && crypto.timingSafeEqual(Buffer.from(s), Buffer.from(expected)));}
const app = express();// Keep the raw body: verification must run on the exact bytes receivedapp.post('/meetingize', express.raw({ type: 'application/json' }), (req, res) => { if (!verifyMeetingizeSignature(req.body, req.get('Meetingize-Signature'), process.env.MEETINGIZE_WEBHOOK_SECRET)) { return res.sendStatus(400); } const event = JSON.parse(req.body.toString('utf8')); res.sendStatus(204);});Shell (debug)
Sezione intitolata “Shell (debug)”BODY_FILE=event.json # raw body as receivedHEADER='t=1760191402,v1=5257a8...'SECRET='whsec_...'T=$(echo "$HEADER" | tr ',' '\n' | sed -n 's/^t=//p')EXPECTED=$( { printf '%s.' "$T"; cat "$BODY_FILE"; } | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //')echo "$HEADER" | tr ',' '\n' | grep -q "^v1=$EXPECTED$" && echo "valid" || echo "INVALID"Anche la CLI meetingize dispone di meetingize webhooks verify.
Consegna, nuovi tentativi e disattivazione
Sezione intitolata “Consegna, nuovi tentativi e disattivazione”- Il vostro endpoint deve rispondere
2xxentro 10 secondi. I reindirizzamenti non vengono seguiti. Eseguite il lavoro in modo asincrono e rispondete rapidamente. - Le consegne fallite vengono ritentate dopo 1 min, 5 min, 30 min, 2 h, 6 h, 12 h e 24 h (8 tentativi in totale), poi
contrassegnate come
failed. - Dopo 15 tentativi falliti consecutivi l’endpoint viene disattivato (
disabled_reason: "too_many_failures") e il proprietario riceve un’email. Riattivatelo conPATCH /v1/webhook_endpoints/{id}{"enabled": true}o dall’app web. - Il registro delle consegne (stato, codice HTTP, primo 1 KB della vostra risposta, durata, prossimo tentativo) è
visibile nell’app web e con
GET /v1/webhook_endpoints/{id}/deliveries, conservato 30 giorni. - L’ordine non è garantito. Usate
createde lo stato del job, non l’ordine di arrivo.
Ruotare il secret
Sezione intitolata “Ruotare il secret”POST /v1/webhook_endpoints/{id}/rotate_secret restituisce un nuovo secret. Entrambi i secret firmano le consegne per
24 ore, il che vi lascia il tempo di distribuire quello nuovo.