# Electronic Signature Validator

> **In simple terms:** Electronic Signature lets users sign documents digitally with legal validity. This guide explains how the validator works and how to integrate it into your flows.

{{<tags>}}

The Electronic Signature validation API provides a link for performing an electronic signature on a document created in [ZapSign](https://zapsign.com.br/) online.

We have 2 types of integrations available for this validator:

- You can use it in your DI Web or WhatsApp flows.
- You can integrate it via API.

**DI Web or WhatsApp flows:**

- It's necessary for you to set up the Zapsign integration in your Truora account. This procedure can be done through the Truora [platform](/guides/electronic_signature_web_flow/) or via API.
- You must create a [Web](/guides/electronic_signature_web_flow) or [WhatsApp](/guides/electronic_signature_wa_flow) DI flow.


## Create Zapsign and Truora Integration

Creates a new integration between Truora and Zapsing for your account.

**Note:** Follow this step only if you want to include the electronic signature validator in your [Web](/guides/electronic_signature_web_flow) or [WhatsApp](/guides/electronic_signature_wa_flow/) DI flow, and it only needs to be done once. Remember that the integration process between Zapsign and Truora is done only once per account.

To do it via API, you must follow these steps:

1. Create a **POST** request to the endpoint ``api.account.truora.com/v1/integrations``.
2. Set the following ``key : values`` within the request ``body`` and ``x-www-form-urlencoded`` format:
    - ``integration_type``: Represents how the services are going to be used. For example: zapsign.
    - ``config.token``: Represents Zapsign API Key [get ZapSign api key](https://docs.zapsign.com.br/v/english/).

###### Answer
{{<code lang="json" lang_title="Response 201">}}
{
    "integration": {
        "customer_integration_id:" "CINxxxxxxxxxx",
        "integration_type": "zapsign",
        "config": {},
        "status": "pending"
    }
}
{{</code>}}

3. Please make a **GET** request to the endpoint ``api.account.truora.com/v1/integrations/{{customer_integration_id}}``. It is important to validate that the ``status`` has been set to ``enabled``.

{{<code lang="json" lang_title="Response 200">}}
{
    "customer_integration_id": "CINxxxxxxxxxx",
    "integration_type": "zapsign",
    "config": {},
    "status": "enabled"
}
{{</code>}}


## API integration

### Create Validation

This request generate the link to sign the document 

To do it you must follow these steps:

1. Create a **POST** request to the endpoint ``api.validations.truora.com/v1/validations``.
2. Set the following ``key : values`` within the request ``body`` and ``x-www-form-urlencoded`` format:
   - ``type``: [Required] Validation type. Allowed: electronic-signature.
   - ``user_authorized``: [Required] Indicates whether the validation subject consents to be validated. Must be true for the validation to proceed.
   - ``zapsign_document_type``: template or document.
   - ``zapsign_id``: [Required] ID of the document/template created in ZapSign. You can find this ID in the URL of your browser when you create a document or template in ZapSign.
   
    {{<img width="60%" src="/images/illustrations/Zapsign_wa_images/zapsing_wa_18.png">}}

    - ``name``: [Required] Name of the person assigned as signer of the document created in ZapSign.
    - ``account_id``: ID of the account registered to this validation. If not provided a default value is generated in our API *.
    - ``var.NAME``: Name of the variable in the Zapsign template and its value.
   - ``face_validation_id``: ID of the Face Recognition. The **validation_status** must be **success** *.
   - ``document_validation_id``: ID of the document validation. The **validation_status** must be **success** *.
   - ``async``: [Optional] When set to ``true``, the validation is created asynchronously. This is useful when generating validations from large templates where document creation may take a significant amount of time. When ``async`` is ``true``, the response will **not** include the ``signer_link``; you must retrieve it later using the [Get Validation Result](#get-validation-result) endpoint once the document has been created.

* You must use the same **account ID** of the document and face recognition to ensure that they are linked properly. This will ensure that the validation process runs smoothly and that the results are accurate.

**Note:** In case you require the used inputs of document + face recognition, you must also send the validation identifiers in the ``face_validation_id`` and ``document_validation_id`` inputs. Keep in mind that the **validation_status** of those validations must be **success** in order to use this new functionality.

#### Answer *synchronous creation* (default, ``async`` not set or ``false``):

{{<code lang="json" lang_title="Response 200">}}
{
    "validation_id": "VLDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "ip_address": "190.000.000.000",
    "account_id": "ACCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "type": "electronic-signature",
    "validation_status": "pending",
    "creation_date": "2026-04-24T19:04:30.97937645Z",
    "instructions": {
        "signer_link": "https://app.zapsign.co/verificar/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
        "zapsign_document_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
        "zapsign_document_url": "https://zapsign.s3.amazonaws.com/...",
        "zapsign_document_name": "document name"
    }
}
{{</code>}}

#### Answer *asynchronous creation* (``async: true``):

**Note:** When using asynchronous mode, the ``signer_link``, ``zapsign_document_url`` and ``zapsign_document_name`` are not returned immediately since the document is still being generated. Once the document is ready, you can retrieve the full result — including the ``signer_link`` — by polling the [Get Validation Result](#get-validation-result) endpoint using the ``validation_id``.

{{<code lang="json" lang_title="Response 200">}}
{
    "validation_id": "VLDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "ip_address": "190.000.000.000",
    "account_id": "ACCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "type": "electronic-signature",
    "validation_status": "pending",
    "creation_date": "2026-04-24T18:58:22.013692703Z",
    "instructions": {
        "zapsign_document_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    }
}
{{</code>}}

### Get Validation Result
Validation result can be obtained by polling.

To do it you must follow these steps:

- Create a **GET** request to the endpoint ``api.validations.truora.com/v1/validations/{{validation_id}}``.

**Note:** Use the provided **validation_id** from the Validation Creation step. If you wish to inquire about all integrations associated with the account, simply make a GET request to the respective endpoint without sending the **validation_id**.

#### Answer *before signing* (``validation_status: pending``):

{{<code lang="json" lang_title="Response 200">}}
{
    "validation_id": "VLDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "ip_address": "190.000.000.000",
    "account_id": "ACCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "type": "electronic-signature",
    "validation_status": "pending",
    "creation_date": "2026-04-24T19:21:58.588265386Z",
    "details": {
        "electronic_signature_details": {
            "original_document_url": "https://zapsign.s3.amazonaws.com/...",
            "document_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "document_name": "document name",
            "name": "Juan Perez",
            "document_creation": {
                "status": "success"
            },
            "signature": {
                "status": "pending"
            },
            "signer_url": "https://app.zapsign.co/verificar/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
        }
    }
}
{{</code>}}

#### Answer *after signing* (``validation_status: success``):

**Note:** Once the document has been signed, the response includes additional fields such as ``signed_document_url``, ``signature_image_url``, ``email``, geolocation data, and ``signed_at`` timestamp.

{{<code lang="json" lang_title="Response 200">}}
{
    "validation_id": "VLDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "ip_address": "190.000.000.000",
    "account_id": "ACCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "type": "electronic-signature",
    "validation_status": "success",
    "creation_date": "2026-04-24T19:21:58.588265386Z",
    "details": {
        "electronic_signature_details": {
            "original_document_url": "https://zapsign.s3.amazonaws.com/...",
            "signed_document_url": "https://zapsign.s3.amazonaws.com/...",
            "signature_image_url": "https://zapsign.s3.amazonaws.com/...",
            "document_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "document_name": "document name",
            "name": "Juan Perez",
            "email": "signer@example.com",
            "geo_latitude": "6.037523",
            "geo_longitude": "-75.702888",
            "signed_at": "2026-04-24T19:23:38.448955Z",
            "signature": {
                "status": "success"
            }
        }
    }
}
{{</code>}}