# Webhooks (deprecated)

{% hint style="warning" %}
The registration of new webhook endpoints in the old format (deprecated) is no longer available. However, the endpoints that are already registered will continue to function normally.
{% endhint %}

To use Autentique’s API webhooks, you need to":

1. Access the API access settings page and register a callback URL. For testing, we recommend using [Beeceptor](https://beeceptor.com/) to receive webhooks.
2. Done! Now, you'll receive an event for all documents in the account whenever someone signs any of them.

> Rejected events don't send webhooks.

The request body sent when any party signs contains the document information in the following format:

{% hint style="info" %}
The format below is displayed in JSON for viewing purposes, but the webhook returns the data in `x-www-form-urlencoded`
{% endhint %}

```javascript
{
  "partes": [
    {
      "nome": "Cassiano Calegari",
      "email": "cassiano@autentique.com.br",
      "cpf": "36653414930",
      "nascimento": "1931-01-01",
      "empresa": "Autentique",
      "funcao": "sign",
      "visualizado": { // When the signer views the document
        "created": "2018-01-01 17:09:02",
        "ipv4": "170.233.43.253",
        "geotrack": {
          "country": "Brasil",
          "countryISO": "BR",
          "state": "Rio Grande do Sul",
          "stateISO": "RS",
          "city": "Erechim",
          "zipcode": "99700",
          "latitude": -22.8305,
          "longitude": -43.2192
        }
      },
      "assinado": { // When the signer signs the document
        "created": "2018-01-01 17:09:02",
        "ipv4": "170.233.43.253",
        "geotrack": {
          "country": "Brasil",
          "countryISO": "BR",
          "state": "Rio Grande do Sul",
          "stateISO": "RS",
          "city": "Erechim",
          "zipcode": "99700",
          "latitude": -22.8305,
          "longitude": -43.2192
        }
      },
      "rejeitado": { // When the signer rejects the document
        "created": "2018-01-01 17:09:02",
        "motivo": null, // or string, with a reason written by the signer for rejecting the document.
        "ipv4": "170.233.43.253",
        "geotrack": {
          "country": "Brasil",
          "countryISO": "BR",
          "state": "Rio Grande do Sul",
          "stateISO": "RS",
          "city": "Erechim",
          "zipcode": "99700",
          "latitude": -22.8305,
          "longitude": -43.2192
        }
      },
      "mail": {
        "sent": false, // or datetime: "2018-01-01 21:00:00"
        "opened": null, // or datetime: "2018-01-01 21:00:00"
        "refused": null, // or datetime: "2018-01-01 21:00:00"
        "delivered": null, // or datetime: "2018-01-01 21:00:00"
        "reason": null // or string, with an error returned by the email server
      }
    }
  ],
  "documento": {
    "uuid": "9ab23456325c40c2a5023051cf4bbf0e",
    "nome": "Contrato de Marketing",
    "rejeitavel": true,
    "created": "2018-01-01 17:09:00",
    "updated": "2018-01-01 17:09:00",
    "excluido": null, // or datetime: "2018-01-01 21:00:00",
    "transacao": false,
    "pendente": 0,
    "publicado": "2018-01-01 17:09:01",
    "disponivel": true
  },
  "remetente": {
    "nome": "Cassiano Calegari",
    "empresa": "Autentique",
    "email": "cassiano@autentique.com.br",
    "cpf": "36653414930",
    "nascimento": "1931-01-01"
  },
  "arquivo": {
    "original":"https:\/\/storage.googleapis.com\/d6e\/ca2485d9e4bc5e2e8d6c8f18b95d3141\/e808f22467bf2173760ca9a6d3addbefab49f978c67ab5987.original.pdf",
    "assinado":"https:\/\/api.autentique.com.br\/documentos\/e808f22467bfa973760cf7a6d3addbefab49f978c67ab5987\/assinado.pdf"
  }
}
```


---

# 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.autentique.com.br/api/integration-basics/webhooks-1.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.
