Create Webhook

There are two ways to create webhooks in ZapSign: via the web interface or by calling the API endpoint. This allows you to configure webhooks in a flexible and efficient way, ensuring that your system is notified in real-time about important events.

Remember: One webhook applies to all documents within your account. It’s not necessary to create more than one webhook. You will only need to perform the following setup once, not for each document.

In this section:


Creating webhooks via web interface

Step 1: In your account, go to Settings > Integrations > ZapSign API > Webhooks.

Step 2: Enter the endpoint (URL) of your server that will receive the webhook data. This endpoint must be ready to process POST requests and handle the JSON data that ZapSign will send.

Step 3: Choose which events you want to monitor. ZapSign allows you to select from five types of events:

You can also select "All" to be notified about every event.

Step 4: Click the "+" to confirm the webhook settings.

The "All" option only includes document-related events (created, signed, removed, and rejected). It does not include the "Email Bounce" event (for email delivery failures). To monitor that event, you will need to register it separately.


Creating webhooks via API

You can also create your endpoints via the API, adjusting the headers and events as needed for your workflow to ensure a seamless integration!

Attention: The "All" option includes only document events (created, signed, deleted, and refused). It does not include the "Email bounce" event (for email delivery failures). For this event, you need to register it separately.

Create a webhook

POST https://api.zapsign.com.br/api/v1/user/company/webhook/

Headers

NameTypeDescription

Authorization*

string

apiToken ahead of the "Bearer" text.

Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23

Request Body

NameTypeDescription

url*

string

Ex: ”https://api.yoursite.com/webhook-zapsign/”

type*

string

Types of events you want to receive: "" (all) | "doc_signed" | "doc_created" | "doc_deleted"

doc_token

string

Document`s token to associate with. When defined, all the webhooks triggered will be for this document only.

headers

Array<Header>

Headers to be sent when the webhook is triggered. The configuration for each header is above

{
    "id": // Você receberá um ID de resposta//
}

Configuring headers for webhooks

It is also possible to implement headers in webhooks, ensuring greater security in data transmission and optimizing performance between applications.

Webhook - JSON root:

  • headers - for each header:

    • name (string) - Name of the HTTP header to be sent.

    Ex: Authorization

    • value (string) - Value of the HTTP header to be sent.

    Ex: Bearer YOUR_AUTHENTICATION_TOKEN POST {{api_url}}/api/v1/user/company/webhook/header/

{
    "id": {{webhook_id}},
    "headers": [
        {
            "name": "Authorization",
            "value": "Bearer YOUR_AUTHENTICATION_TOKEN"
        }
    ]
}

Example of a request

Last updated