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énementQuand
call.startedDécroché d’un appel.
call.endedFin d’appel, métadonnées complètes.
lead.qualifiedAgent a qualifié un lead (critères atteints).
appointment.bookedRendez-vous confirmé.
conversation.taggedTag ajouté automatiquement ou manuellement.
emotion.spikePic é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

ℹ️
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