ZapSign API
English
English
  • General Information
  • Getting Started
  • ZapSign Environments
  • Ready-to-use requests!
  • Authentication
    • Static token
    • JWT Authentication
      • Get access token
      • Refresh your access token
  • Types of Tokens
  • API versioning
  • Rate Limit Policies
  • Incident alerts
  • How Payment Works
  • Status Code
  • Account
    • Plan Information
    • List account users
    • Create account users
    • Delete account user
  • Documents
    • Create document via Upload
    • OneClick (ClickWrap)
      • Create document (OneClick)
    • Create document via Template
    • Add attachment (extra document)
    • Add attachment (extra document) via Template
    • Detail document
    • List documents
    • Delete document
    • Document Audit Trail
    • Optional: Place signatures
    • Reject Documents
  • Signers
    • Detail signer
    • Update signer
    • Add signer
    • Delete signer
    • Batch sign via API
    • Reject Documents by User
  • Templates
    • Create template (DOCX)
      • Configure Template Form
    • List templates
    • Get template
    • Update template
    • Delete template
  • Partnerships
    • Update Payment Status
    • Create Account
  • TIMESTAMP
    • Add timestamp
  • Background Check
  • Introduction
  • Understanding the Result
  • Creating a Background Check
    • Person Check
    • Company check
  • Retrieve a Check
  • Check details
  • Webhooks
    • How webhooks works
    • Testing webhooks on ZapSign
    • Create Webhook
    • Webhooks logs
    • Events
      • Document
        • Doc created
        • Doc deleted
        • Created signer
      • Signer
        • Signature request send
        • Document viewed
        • Reading confirmation
        • Doc signed
        • Doc refused
        • Email bounce
        • Failed Validation
      • Background check
        • Background check completed
    • Reprocessing Documents and Webhooks
    • Delete Webhook
  • Widget
    • How widget works
Powered by GitBook
On this page
  • Create a webhook
  • Configuring headers for webhooks
  • Example of a request

Was this helpful?

  1. Webhooks

Create Webhook

PreviousTesting webhooks on ZapSignNextWebhooks logs

Last updated 7 months ago

Was this helpful?

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

Name
Type
Description

Authorization*

string

apiToken ahead of the "Bearer" text.

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

Request Body

Name
Type
Description

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//
}
Make sure your API TOKEN is correct.

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

Document Created
Document Signed
Document Refused;
Document Deleted;
Email Bounce;
Creating webhooks via the web interface;
Creating webhooks via the API;
Configuring Headers for webhooks;
https://www.postman.com/zapsign/workspace/zapsign-workspace/request/27495556-3413e0f8-be2d-4161-9ffa-b449443dc68d?ctx=documentationwww.postman.com