Aller au contenu principal

Webhooks & automatisation

Les événements InTransparency dans n'importe quel outil

Cinq événements signés HMAC-SHA256, livrés à votre endpoint HTTPS. Fonctionnent dès aujourd'hui avec Zapier, Make, n8n ou tout récepteur personnalisé.

Événements disponibles

match.created

Une recherche de talents que vous avez lancée a renvoyé ce candidat : un événement par candidat dans les résultats. Le candidat n'est identifié que par un pseudonyme et un prénom suivi de l'initiale du nom, jamais par son nom de famille ni par son e-mail.

Envoyé aux abonnements webhook du recruteur qui a lancé la recherche

data: { matchId, candidateId, candidatePseudonym, candidateName, matchScore, decisionLabel, jobId, url }

credential.issued

Une attestation signée (W3C Verifiable Credential) a été émise pour un projet, un stage terminé ou l'évaluation d'un enseignant.

Envoyé aux abonnements webhook de l'étudiant concerné

data: { credentialId, credentialType, issuerName, issuedAt }

credential.revoked

Une attestation émise précédemment a été révoquée ; l'événement en indique le motif.

Envoyé aux abonnements webhook de l'étudiant concerné

data: { credentialId, credentialType, revokedAt, reason }

stage.completed

Le tuteur en entreprise a envoyé l'évaluation finale d'un stage.

Envoyé aux abonnements webhook de l'étudiant concerné

data: { stageExperienceId, placementId, companyName, completedAt }

exchange.completed

L'université d'accueil a marqué un échange comme terminé.

Envoyé aux abonnements webhook de l'étudiant concerné

data: { exchangeEnrollmentId, completedAt }

  1. 1. Créez la subscription

    Il vous faut une clé API (gratuite, depuis votre workspace). La subscription accepte n'importe quelle URL HTTPS — y compris un Catch Hook Zapier ou un Custom Webhook Make.

    Shell

    # The key needs the agent:webhook scope (agent:write covers it too).
    # Tick "Webhooks" when you create it at /developers/keys.
    curl -X POST https://www.in-transparency.com/api/agents/webhooks \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
        "events": ["match.created"]
      }'
    
    # Response. The secret is shown exactly once, so store it now:
    # {
    #   "id": "cmh4p2x7k0002s8v3",
    #   "url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
    #   "events": ["match.created"],
    #   "active": true,
    #   "createdAt": "2026-05-03T14:20:51.000Z",
    #   "secret": "3f8a…64 hex characters…c1",
    #   "message": "Store the secret — we use HMAC-SHA256 to sign every delivery…"
    # }
  2. 2. Recevez les livraisons

    Chaque événement arrive en POST JSON, et nous attendons une réponse 5 secondes au plus. Pour l'instant, une livraison n'est tentée qu'une fois (après un statut d'erreur ou un délai dépassé, nous ne réessayons pas) : répondez donc tout de suite par un 2xx et traitez l'événement ensuite. Pour écarter les doublons, prenez event plus eventId comme clé ; X-InTransparency-Delivery désigne la livraison elle-même.

    HTTP

    POST <your-url>
    Content-Type: application/json
    User-Agent: InTransparency-Webhook/1.0
    X-InTransparency-Signature: sha256=<hex HMAC-SHA256 of the raw body>
    X-InTransparency-Delivery: <delivery id>
    
    {
      "event": "match.created",
      "eventId": "cmh3x9q2a0001k7w4",
      "occurredAt": "2026-05-03T14:22:08.000Z",
      "data": {
        "matchId": "cmh3x9q2a0001k7w4",
        "candidateId": "cmh1k7w4n0007p2r9",
        "candidatePseudonym": "stu_4f2a91c0b6e54d12",
        "candidateName": "Giulia M.",
        "matchScore": 89,
        "decisionLabel": "STRONG_MATCH",
        "jobId": "cmh2b8r1v0003x5q1",
        "url": "https://www.in-transparency.com/en/matches/cmh3x9q2a0001k7w4/why"
      }
    }
  3. 3. Vérifiez la signature

    Chaque livraison est signée avec le secret de la subscription. Vérifiez avant de faire confiance au payload (sur Zapier/Make, vous pouvez ignorer la vérification tant que l'URL du hook reste secrète).

    Node.js

    // Node.js — check the signature before trusting the payload.
    // rawBody is the body exactly as it arrived (a Buffer or a string):
    // parsing and re-serialising it changes the bytes, and the HMAC with them.
    import crypto from 'crypto'
    
    function isValid(rawBody, signatureHeader, secret) {
      const expected = 'sha256=' +
        crypto.createHmac('sha256', secret).update(rawBody).digest('hex')
      const received = Buffer.from(signatureHeader || '')
      // timingSafeEqual throws when the lengths differ, so compare them first.
      return received.length === expected.length &&
        crypto.timingSafeEqual(received, Buffer.from(expected))
    }

Recettes pour outils no-code

  • Zapier

    Webhooks by Zapier

    1. Nouveau Zap → déclencheur "Webhooks by Zapier" → Catch Hook
    2. Copiez l'URL du hook
    3. Enregistrez-la comme subscription (étape 1 ci-dessus)
    4. Branchez les actions : Slack, Sheets, CRM…
  • Make

    Custom webhook

    1. Nouveau scénario → module "Webhooks" → Custom webhook
    2. Copiez l'URL générée
    3. Enregistrez-la comme subscription
    4. Make détecte la structure du payload au premier événement
  • n8n

    Webhook node

    1. Ajoutez un nœud "Webhook" (POST)
    2. Utilisez l'URL de production du nœud
    3. Enregistrez-la comme subscription
    4. Vérifiez le HMAC dans un nœud Function

Besoin d'une clé API ?

Les clés API et la gestion des subscriptions sont incluses dans tous les plans. Contactez-nous et nous activerons votre accès.