> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Reinvio webhook di sessione API

> Con Didit, reinvia un webhook di sessione registrato allo stesso URL, con nuove firme, e ottieni la nuova consegna con la risposta del tuo endpoint.



Prompt API per il reinvio della consegna webhook di sessione
        Copia il prompt negli appunti



      
      

\<pre>

\`Resend a webhook delivery of a Didit verification session through the API.

Endpoint:
POST https://verification.didit.me/v3/session/{session_id}/webhook/{webhook_uuid}/resend
(no trailing slash, no request body)

Authentication:
Send my Didit API key in the x-api-key header. A scoped key needs webhooks: write and decisions: read.

Goal:
\- Replay a webhook my endpoint missed or rejected, after I fixed the endpoint.

Behavior:
\- {webhook_uuid} is the uuid of an entry from GET /v3/session/{session_id}/webhooks/, and it must belong to the session in the path.
\- Didit sends the recorded payload again to the URL the delivery was first sent to. The payload keeps its event_id; Didit refreshes the timestamp field, the X-Timestamp header and the signatures, using the destination's current signing secret (the application-level secret for a delivery sent to the legacy webhook_url).
\- Synchronous: Didit waits up to 5 seconds for my endpoint, records the attempt as a new delivery and returns it. The original delivery is not changed.
\- The call returns 200 even when my endpoint answered with an error: read response_status in the returned delivery.
\- A failed resend is not retried automatically. Every call sends one more request to my endpoint, so my handler must be idempotent on event_id.

Example call:
curl -X POST "https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/webhook/9f8e7d6c-5b4a-4321-8fed-cba987654321/resend" \
-H "x-api-key: YOUR_API_KEY"

What to read from the response:
\- uuid: the new delivery id.
\- response_status: what my endpoint answered this time (504 timeout, 503 connection failure, 400 URL refused as unsafe).
\- request_header and request_body: the headers and body actually sent.

Failure modes:
\- 400 with code webhook_url_missing: the delivery has no recorded URL.
\- 400 with code webhook_resend_error: the recorded payload could not be re-signed or sent.
\- 401: the API key has expired.
\- 403: missing key (a wrong, revoked or expired key gets 401), a key of another application, a scoped key without the permissions above, or a request from outside the key's IP allowlist.
\- 404: the session does not exist, was deleted, or is outside a scoped key's limits, or the delivery does not belong to this session ({ "detail": "Webhook log not found" }).
\- 429: more than 300 writes per minute for this API key; honor Retry-After.

Side effects: sends one HTTP request to my webhook endpoint and adds one delivery to the session's webhook log.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

Incolla in

> [!NOTE]
>
> Il reinvio va all'URL memorizzato nella consegna, anche se nel frattempo hai modificato l'URL della destinazione. Poiché il payload mantiene il suo `event_id`, un sistema ricevente che [deduplica in base a `event_id`](https://docs.didit.me/it/integration/webhooks#struttura-generale) tratta il reinvio come l'evento che già conosce.Trova la consegna da reinviare con [Elenca le consegne webhook di sessione](https://docs.didit.me/it/management-api/sessions/list-webhooks.md).


## OpenAPI

````yaml it/openapi-25.json POST /v3/session/{sessionId}/webhook/{webhook_uuid}/resend
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API di verifica dell'identità. Autenticati con l'intestazione x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/session/{sessionId}/webhook/{webhook_uuid}/resend:
    post:
      tags:
        - Sessions
      summary: Reinvia la consegna del webhook della sessione
      description: >-
        Invia nuovamente un webhook di sessione registrato all'URL a cui era
        stato inviato inizialmente, con lo stesso payload ed `event_id` e un
        `timestamp`, un'intestazione `X-Timestamp` e firme aggiornati. Didit lo
        firma con il segreto attuale della destinazione a cui appartiene la
        consegna (o con il segreto a livello di applicazione per una consegna
        all'URL webhook legacy), attende fino a 5 secondi il tuo endpoint,
        registra il tentativo come una nuova consegna e lo restituisce con `200`
        indipendentemente dalla risposta del tuo endpoint: leggi
        `response_status`. Un reinvio non viene ritentato automaticamente e ogni
        chiamata invia nuovamente, quindi rendi il tuo endpoint idempotente su
        `event_id`. Il percorso non ha una barra finale e la richiesta non ha un
        corpo. Una chiave API con ambito limitato richiede `webhooks: write` e
        `decisions: read`.
      operationId: post_v3_session_webhook_resend
      parameters:
        - name: sessionId
          in: path
          required: true
          description: >-
            UUID della sessione di verifica, utente (KYC) o aziendale (KYB): il
            `session_id` restituito da `POST /v3/session/`. Il server lo risolve
            rispetto a entrambi i tipi di sessione.


            **Deve essere un UUID valido.** La route trova corrispondenza solo
            con UUID corretti, pertanto un valore non conforme viene rifiutato
            dal router degli URL prima dell'esecuzione del codice
            dell'applicazione e la risposta è una pagina **HTML** `404` anziché
            il wrapper JSON `{"detail": ...}` mostrato di seguito.
          schema:
            type: string
            format: uuid
          example: 22222222-3333-4444-5555-666666666666
        - name: webhook_uuid
          in: path
          required: true
          description: >-
            UUID della consegna da reinviare: lo `uuid` di una voce restituita
            da `GET /v3/session/{sessionId}/webhooks/`. Deve appartenere alla
            sessione indicata nel percorso.
          schema:
            type: string
            format: uuid
          example: 66666666-7777-8888-9999-000000000001
      responses:
        '200':
          description: >-
            La nuova consegna, già tentata. `response_status` è la risposta del
            tuo endpoint in questo tentativo. La consegna originale rimane
            invariata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionWebhookDelivery'
              examples:
                Accepted on resend:
                  value:
                    uuid: 66666666-7777-8888-9999-000000000004
                    session_id: 22222222-3333-4444-5555-666666666666
                    request_url: https://yourapp.com/webhooks/didit
                    response_status: 200
                    status: In Progress
                    webhook_type: status.updated
                    request_header: >-
                      {"Content-Type": "application/json", "X-Signature":
                      "b8eb1e376517ee0cad8ba98ff7f8fd35fc72eca231000963a96a335f82328835",
                      "X-Signature-V2":
                      "9efd2ce9ed1303e1d05273ef9608a59363ed9789a05253db4748b3e8e50cb109",
                      "X-Signature-Simple":
                      "bf3a9dc04b2c20ab539203b0cd5cca2a10f630bf62d8feb6d68d82af80f64774",
                      "X-Timestamp": "1792159542", "User-Agent":
                      "DiditWebhook/2.0 +https://didit.me"}
                    request_body: >-
                      {"application_id":"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee","created_at":1792056057,"environment":"live","event_id":"33333333-4444-5555-6666-777777777777","sandbox_scenario":null,"session_id":"22222222-3333-4444-5555-666666666666","status":"In
                      Progress","timestamp":1792159542,"vendor_data":"user-123","webhook_type":"status.updated","workflow_id":"44444444-5555-6666-7777-888888888888","workflow_version":3}
                    created_at: '2026-10-16T14:05:42.330981Z'
        '400':
          description: >-
            Impossibile inviare nuovamente la consegna. Esegui una diramazione
            in base a `code`: `webhook_url_missing` indica che la consegna non
            ha un URL registrato e non viene inviato nulla;
            `webhook_resend_error` indica che la consegna archiviata non ha
            potuto essere firmata di nuovo o che il tentativo non ha potuto
            essere completato. Dopo `webhook_resend_error`, `detail` inizia con
            `Error processing webhook resend:` seguito da un testo diagnostico
            che può variare.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Messaggio di errore di facile lettura.
                  code:
                    type: string
                    description: >-
                      Codice di errore stabile leggibile da macchina. Basa la
                      logica su questo, non su `detail`.
              examples:
                No recorded URL:
                  value:
                    detail: >-
                      The webhook delivery does not have a request URL
                      configured
                    code: webhook_url_missing
                Resend failed:
                  value:
                    detail: >-
                      Error processing webhook resend: Invalid webhook data
                      format
                    code: webhook_resend_error
        '401':
          description: >-
            La chiave API è scaduta: è stata creata con una data di scadenza
            ormai trascorsa. Anche una chiave errata o revocata riceve `401`;
            una chiave mancante riceve `403`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Messaggio di errore di facile lettura.
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            La richiesta non è consentita. L'assenza di `x-api-key`, o una
            chiave non valida o revocata, restituisce `Authentication
            credentials were not provided or are invalid.` La chiave di un'altra
            applicazione restituisce `You do not have permission to perform this
            action.` Una chiave con ambito senza l'accesso richiesto da questo
            endpoint restituisce un messaggio che indica l'accesso mancante,
            mentre una chiave utilizzata al di fuori della sua allowlist IP
            restituisce `This API key can't be used from this IP address.` Un
            `sessionId` sconosciuto restituisce `404` prima della verifica delle
            credenziali.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Messaggio di errore di facile lettura.
              examples:
                Missing or invalid key:
                  value:
                    detail: >-
                      Authentication credentials were not provided or are
                      invalid.
                Key of another application:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without webhooks write:
                  value:
                    detail: This API key has no write access to webhooks.
                Scoped key without decisions read:
                  value:
                    detail: This API key has no read access to decisions.
                Outside the IP allowlist:
                  value:
                    detail: This API key can't be used from this IP address.
        '404':
          description: >-
            La sessione non esiste o è stata eliminata (`Not found.`, restituito
            prima della verifica delle credenziali), oppure non rientra nei
            limiti di workflow o di stato di una chiave con ambito limitato
            (`Session not found.`). Una consegna che non esiste, appartiene a
            un'altra sessione o non è più disponibile restituisce `Webhook log
            not found`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Messaggio di errore di facile lettura.
              examples:
                Unknown session:
                  value:
                    detail: Not found.
                Outside the key's limits:
                  value:
                    detail: Session not found.
                Delivery not in this session:
                  value:
                    detail: Webhook log not found
        '429':
          description: >-
            Limite di frequenza superato: più di 300 richieste di scrittura
            (POST, PATCH, PUT, DELETE) nella finestra corrente di un minuto per
            questa chiave API. Attendi `Retry-After` secondi prima di riprovare.
          headers:
            Retry-After:
              description: Secondi da attendere prima di effettuare un nuovo tentativo.
              schema:
                type: integer
                minimum: 1
                example: 30
            X-RateLimit-Limit:
              description: Richieste consentite nell'intervallo di un minuto (300).
              schema:
                type: integer
                example: 300
            X-RateLimit-Remaining:
              description: Richieste rimanenti nell'intervallo corrente.
              schema:
                type: integer
                example: 0
            X-RateLimit-Reset:
              description: Ora Unix (secondi) in cui la finestra corrente si azzera.
              schema:
                type: integer
                example: 1792056120
            X-RateLimit-Scope:
              description: Nome del budget superato.
              schema:
                type: string
                example: generic-write
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Messaggio di errore di facile lettura.
              examples:
                Throttled:
                  value:
                    detail: >-
                      Write request rate limit exceeded. You can make up to 300
                      requests per minute.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/session/22222222-3333-4444-5555-666666666666/webhook/66666666-7777-8888-9999-000000000001/resend'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.sessions.webhooks.resend(
                "22222222-3333-4444-5555-666666666666",
                "66666666-7777-8888-9999-000000000001",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.sessions.webhooks.resend(
              "22222222-3333-4444-5555-666666666666",
              "66666666-7777-8888-9999-000000000001",
            );
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.Resend(ctx, \"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.sessions().webhooks().resend("22222222-3333-4444-5555-666666666666",
            "66666666-7777-8888-9999-000000000001");

            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->sessions->webhooks->resend('22222222-3333-4444-5555-666666666666',
            '66666666-7777-8888-9999-000000000001');

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.sessions.webhooks.resend(
              "22222222-3333-4444-5555-666666666666",
              "66666666-7777-8888-9999-000000000001"
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.Sessions.Webhooks.ResendAsync("22222222-3333-4444-5555-666666666666",
            "66666666-7777-8888-9999-000000000001");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    SessionWebhookDelivery:
      type: object
      description: >-
        Un singolo tentativo di consegna webhook registrato per una sessione di
        verifica, con le intestazioni e il corpo esatti della richiesta inviati
        da Didit.
      required:
        - uuid
        - session_id
        - request_url
        - response_status
        - status
        - webhook_type
        - request_header
        - request_body
        - created_at
      properties:
        uuid:
          type: string
          format: uuid
          description: >-
            ID consegna. Utilizzalo come `{webhook_uuid}` per recuperare o
            inviare nuovamente questa consegna.
        session_id:
          type: string
          format: uuid
          description: La sessione a cui appartiene la consegna (la sessione nel percorso).
        request_url:
          type: string
          format: uri
          nullable: true
          description: URL a cui è stata inviata la consegna.
        response_status:
          type: integer
          nullable: true
          description: >-
            Stato HTTP restituito dal tuo endpoint. `null` finché la consegna è
            in coda e non è ancora stata tentata. Quando non è stata ricevuta
            alcuna risposta HTTP, Didit registra un proprio stato: `504` se il
            tuo endpoint non risponde entro 5 secondi, `503` in caso di errore
            di connessione, `400` se l'URL viene rifiutato perché non sicuro (ad
            esempio un indirizzo privato o interno) e `404` per qualsiasi altro
            errore della richiesta. Un codice `400` o superiore è considerato
            una consegna non riuscita.
        status:
          type: string
          nullable: true
          description: >-
            Stato della sessione al momento della generazione dell'evento, ad
            esempio `In Progress`, `Approved` o `Declined`.
        webhook_type:
          $ref: '#/components/schemas/WebhookEvent'
        request_header:
          type: string
          description: >-
            Testo JSON (una stringa) delle intestazioni della richiesta inviate
            da Didit: `Content-Type`, `X-Signature`, `X-Signature-V2`,
            `X-Signature-Simple`, `X-Timestamp` e `User-Agent`. Analizzalo con
            un parser JSON. Contiene le firme, mai il segreto di firma.
        request_body:
          type: string
          description: >-
            Testo JSON (una stringa) del payload esatto inviato da Didit, con
            chiavi ordinate, inclusi `event_id` e `timestamp`. Analizzalo con un
            parser JSON; vedi [Payload
            shape](https://docs.didit.me/it/integration/webhooks#struttura-del-payload).
            Per una chiave con ambito limitato senza `media: read`, gli URL dei
            file multimediali al suo interno sono `null`; senza `sessions:
            write`, i token di sessione e i link di verifica ospitati sono
            `null`. Un corpo modificato in questo modo non corrisponde più alle
            sue firme. Didit non registra il corpo della risposta restituito dal
            tuo endpoint.
        created_at:
          type: string
          format: date-time
          description: Data e ora di creazione della consegna.
    WebhookEvent:
      type: string
      description: >-
        Nome dell'evento webhook supportato. Usa queste stringhe esatte in
        `subscribed_events`; i valori non supportati vengono rifiutati.
      enum:
        - status.updated
        - data.updated
        - user.status.updated
        - user.data.updated
        - business.status.updated
        - business.data.updated
        - activity.created
        - transaction.created
        - transaction.status.updated
        - travel_rule.status.updated
        - workflow.compliance_changed
        - transaction_rule_suggestions.created
        - auth.signup
        - auth.login
        - auth.login_failed
        - auth.password_reset_requested
        - auth.password_reset_completed
        - auth.mfa_changed
        - auth.new_device
        - auth.account_locked
        - investigator.report.ready
        - investigator.decision.automated
        - investigator.decision.overridden
        - investigator.decision.contested
        - investigator.question.raised
        - investigator.automation.paused
        - investigator.rfi.answered
        - investigator.rfi.overdue
        - investigator.drift.detected
        - investigator.sla.breached
        - investigator.qa.failed
        - investigator.external.report.ready
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        La chiave API della tua applicazione, da Developers -> API keys nella
        Business Console. La chiave primaria ha accesso completo. Una chiave con
        nome può avere un ambito definito: nessuno, lettura o scrittura per
        risorsa, limitata ad alcuni workflow o a sessioni approvate, a un elenco
        di indirizzi IP e a una data di scadenza. 401 indica che la chiave è
        errata, revocata o scaduta; 403 indica che non è stata inviata alcuna
        chiave, che la chiave non ha accesso a questa risorsa o azione, oppure
        che la richiesta proviene da un indirizzo non incluso nel suo elenco IP;
        404 su una route di sessione indica che la sessione non rientra nei
        workflow o negli stati previsti dalla chiave. Una chiave senza accesso
        ai media riceve gli URL di immagini, video e PDF come null, e una chiave
        senza permessi di scrittura sulle sessioni riceve link e token di
        sessione come null. Consulta https://docs.didit.me/console/api-keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.