> For the complete documentation index, see [llms.txt](https://docs.zapsign.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zapsign.com.br/webhooks/como-funciona.md).

# Como funcionam os Webhooks

Webhooks **são notificações automáticas essenciais para a integração entre sistemas,** pois notificam diretamente o seu servidor, eliminando a necessidade de verificar constantemente o status de uma operação.

**Com os webhooks você pode:**

* <mark style="background-color:blue;">**Reduzir de Consultas Repetitivas à API**</mark> para saber o status de um documento (prática comumente chamada de polling;<br>
* <mark style="background-color:blue;">**Sincronizar Sistemas e Integrações**</mark><mark style="background-color:blue;">,</mark> garantindo que informações entre diferentes plataformas estejam sempre atualizadas e consistentes.<br>
* <mark style="background-color:blue;">**Automatizar Processos Pós-Evento**</mark><mark style="background-color:blue;">,</mark> para que tarefas subsequentes sejam feitas automaticamente!

{% hint style="info" %} <mark style="color:red;">**Preciso ter um Plano de API para usar webhooks?**</mark>**&#x20;Não**, os webhooks estão disponíveis **gratuitamente para todos os usuários.** No entanto, recomendamos fortemente que os usuários da API utilizem webhooks em vez de fazer polling.
{% endhint %}

***

**A Zapsign oferece suporte a webhooks para que você seja notificado de eventos** como criação, assinatura, documento rejeitado, conclusão de documentos ou falha na entrega de email. Quando um evento desse tipo ocorre, enviamos uma requisição HTTP POST para o URL configurado em sua aplicação, contendo detalhes sobre o evento em formato JSON.\ <br>

<figure><img src="https://3085168645-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4noMoX5ZGb2-RhWjjf-887967055%2Fuploads%2FTTzGxohuydFDbPse6nng%2Fimage.png?alt=media&amp;token=b25df71c-99ed-4f79-9e03-36311ab10ac3" alt="fluxograma em azul mostrando como é o fluxo básico de criação de um webhook. "><figcaption><p>O fluxo básico de um webhook.</p></figcaption></figure>

<br>

{% hint style="warning" %}
A sua aplicação deve retornar o status 200 quando receber um webhook, caso contrário a ZapSign irá retentar o envio, gerando duplicidades e/ou requisições desnecessárias.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zapsign.com.br/webhooks/como-funciona.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
