Webhooks & API
Événements temps-réel, REST API, authentification, exemples cURL.
Événements temps-réel
Les webhooks VOCALIS envoient un POST HTTPS à votre endpoint dès qu’un événement se produit. Vous branchez n’importe quel système : CRM, data lake, Slack, workflow no-code (Make, n8n, Zapier).
Événements disponibles
| Événement | Quand |
|---|---|
call.started | Décroché d’un appel. |
call.ended | Fin d’appel, métadonnées complètes. |
lead.qualified | Agent a qualifié un lead (critères atteints). |
appointment.booked | Rendez-vous confirmé. |
conversation.tagged | Tag ajouté automatiquement ou manuellement. |
emotion.spike | Pic émotionnel détecté (colère, détresse). |
Exemple de payload
POST https://votre-endpoint.com/hooks/vocalis
Content-Type: application/json
X-Vocalis-Signature: sha256=... { "event": "call.ended", "call_id": "c_01HXYZ", "agent_id": "a_42", "duration_sec": 184, "result": "appointment_booked", "language": "fr-FR", "emotion_summary": {"satisfaction": 0.71, "anger": 0.02}, "transcript_url": "https://app.vocalis.pro/tr/c_01HXYZ.json"
} Signature HMAC
Chaque webhook est signé en HMAC-SHA256 avec votre secret. Exemple en Python :
import hmac, hashlib def verify(body: bytes, signature: str, secret: str) -> bool: expected = "sha256=" + hmac.new(secret.encode(), body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, signature) REST API — exemple cURL
curl -X POST https://api.vocalis.pro/v1/calls \ -H "Authorization: Bearer $VOCALIS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"agent_id":"a_42","to":"+33612345678","variables":{"prenom":"Paul"}}' Limites & retries
- Timeout : 10 s côté VOCALIS.
- Retries exponentiels : 5 tentatives sur 24 h en cas d’échec.
- Rate-limit par défaut : 60 requêtes/seconde par organisation.
ℹ️
Un endpoint de test (sandbox)
est fourni avec chaque organisation. Vous pouvez relancer manuellement n’importe quel webhook depuis
l’interface — utile pendant la phase de développement.
Besoin d’un coup de main ?
Notre équipe configure votre agent vocal avec vous — déploiement sur mesure, rythme adapté à vos équipes.
Parler à un expert VOCALIS