Vai al contenuto principale

Webhook & automazione

Eventi InTransparency in qualunque strumento

Cinque eventi firmati HMAC-SHA256, consegnati al tuo endpoint HTTPS. Funzionano oggi con Zapier, Make, n8n o qualunque ricevitore custom.

Eventi disponibili

match.created

Una ricerca talenti che hai avviato ha restituito questo candidato: un evento per ogni candidato nei risultati. Il candidato è identificato solo da uno pseudonimo e dal nome con l'iniziale del cognome, mai dal cognome per intero né dall'email.

Arriva alle sottoscrizioni webhook del recruiter che ha avviato la ricerca

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

credential.issued

È stata emessa una credenziale firmata (W3C Verifiable Credential) per un progetto, un tirocinio concluso o la valutazione di un docente.

Arriva alle sottoscrizioni webhook dello studente interessato

data: { credentialId, credentialType, issuerName, issuedAt }

credential.revoked

Una credenziale emessa in precedenza è stata revocata; l'evento ne riporta il motivo.

Arriva alle sottoscrizioni webhook dello studente interessato

data: { credentialId, credentialType, revokedAt, reason }

stage.completed

Il tutor aziendale ha inviato la valutazione finale di un tirocinio.

Arriva alle sottoscrizioni webhook dello studente interessato

data: { stageExperienceId, placementId, companyName, completedAt }

exchange.completed

L'università ospitante ha segnato come concluso uno scambio.

Arriva alle sottoscrizioni webhook dello studente interessato

data: { exchangeEnrollmentId, completedAt }

  1. 1. Crea la subscription

    Serve una API key (gratuita, dal tuo workspace). La subscription accetta qualunque URL HTTPS — incluso un Catch Hook di Zapier o un Custom Webhook di 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. Ricevi le consegne

    Ogni evento arriva come POST JSON e aspettiamo la risposta al massimo 5 secondi. Per ora ogni consegna viene tentata una sola volta (dopo uno stato di errore o un timeout non riproviamo), quindi rispondi subito con un 2xx e gestisci l'evento in un secondo momento. Per scartare i duplicati usa come chiave event più eventId; X-InTransparency-Delivery identifica la singola consegna.

    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. Verifica la firma

    Ogni consegna è firmata con il secret della subscription. Verifica prima di fidarti del payload (su Zapier/Make puoi saltare la verifica se l'URL del hook resta segreto).

    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))
    }

Ricette per i tool no-code

  • Zapier

    Webhooks by Zapier

    1. Nuovo Zap → trigger "Webhooks by Zapier" → Catch Hook
    2. Copia l'URL del hook
    3. Crealo come subscription (step 1 sopra)
    4. Collega le action: Slack, Sheets, CRM…
  • Make

    Custom webhook

    1. Nuovo scenario → modulo "Webhooks" → Custom webhook
    2. Copia l'URL generato
    3. Registralo come subscription
    4. Make rileva la struttura al primo evento
  • n8n

    Webhook node

    1. Aggiungi un nodo "Webhook" (POST)
    2. Usa l'URL di produzione del nodo
    3. Registralo come subscription
    4. Verifica la firma HMAC in un nodo Function

Ti serve una API key?

Le chiavi API e la gestione delle subscription sono incluse in tutti i piani. Scrivici e ti attiviamo l'accesso.