# Reprocesando documentos y webhooks

En situaciones donde ocurren fallos de integración, errores de validación o la necesidad de actualizar el sistema receptor, reprocesar los webhooks puede ser crucial para garantizar una correcta entrega de los datos y mantener la consistencia entre los sistemas integrados.

***

### **Reprocesar Webhooks a través de la Interfaz Web**

Para reprocesar los documentos firmados mediante la interfaz web, sigue estos pasos:

1. Navega a la pestaña de documentos.
2. Busca tu documento.
3. Haz clic en el icono de engranaje (configuración) y selecciona **"Reprocesar Webhook"**.

<figure><img src="/files/SAJEOSnRxbFWmriFGZ6T" alt="Screenshot of a document management interface showing a signed document titled &#x22;Test document.&#x22; The options menu is open, displaying actions such as &#x22;Date limit,&#x22; &#x22;Add signer,&#x22; &#x22;Edit fields,&#x22; and &#x22;Reprocess webhook"><figcaption><p>Interface with options for managing a signed document, including adding signers, editing fields, and reprocessing the webhook.</p></figcaption></figure>

***

### **Reprocesar Documentos y Webhooks a través de la API**

En los casos en los que sea necesario regenerar el documento firmado—como cuando hay problemas de integridad con el archivo o una falla en la entrega del webhook—puedes utilizar el endpoint de reprocesamiento. Esto es útil, por ejemplo, cuando el documento final está dañado o el webhook asociado no se envió correctamente.

<mark style="color:green;">**`POST`**</mark>`https://api.zapsign.com.br/api/v1/docs/{{doc_principal_token}}/reprocess-doc/`

**Headers**

<table><thead><tr><th width="175">Nombre</th><th width="103">Tipo</th><th>Descripción</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td>API token prefijo con la palabra "Bearer". Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23</td></tr></tbody></table>

**Request Body**

```json
{
    "send_webhook": true,
    "resign_doc": false
}
```

<table data-header-hidden><thead><tr><th width="186"></th><th width="116"></th><th></th></tr></thead><tbody><tr><td>Nombre</td><td>Tipo</td><td>Descripción</td></tr><tr><td>send_webhook</td><td>boolean</td><td>Para activar el reenvio del webhook del documento seleccionado. Valor por defecto: false</td></tr><tr><td>resign_doc</td><td>boolean</td><td>Para reprocesar el documento seleccionado. Valor por defecto: false</td></tr></tbody></table>

#### Response <a href="#respostas" id="respostas"></a>

{% tabs %}
{% tab title="200-OK" %}
Document successfully reprocessed.&#x20;
{% endtab %}

{% tab title="404- Not found" %}
Check if the document token is correct in the URL.
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Dado que el proceso es asincrónico, es recomendable monitorear los webhooks o verificar manualmente el estado del documento después de unos minutos.
{% endhint %}

Reprocesar webhooks y documentos es una excelente manera de asegurar que todo el flujo de trabajo se mantenga en sincronía y sin errores. ¡No dudes en utilizar estas opciones si necesitas solucionar cualquier inconveniente!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zapsign.com.br/espanol/webhooks/reprocesando-documentos-y-webhooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
