Articles in this section
Category / Section

How to send signature request with QES enabled via BoldSign API?

Published:
2 mins read

Qualified Electronic Signature (QES) offers the highest level of trust and legal validity for electronic documents, fully aligning with the eIDAS regulations across the European Union. It guarantees strong identity verification through certified Trust Service Providers (TSPs) like Evrotrust, ensuring that signed documents are both secure and legally binding.

Enable QES

To use Qualified Electronic Signature (QES) in your API requests, you must first enable it on the Business Profile page. Once enabled, you can use QES when preparing documents and templates. QES operates on a Pay-As-You-Go basis, with each verification attempt billed at $3. For step-by-step instructions on how to enable QES in your Business Profile, refer to this guide: Enable QES in Business Profile.

Send documents with QES enabled

To send a signature request with Qualified Electronic Signature (QES) enabled using the BoldSign API, simply set the enableQes property to true in your request payload.

Example code snippets

cURL

curl -X 'POST' \
  'https://api.boldsign.com/v1/document/send' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {your API key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "DisableExpiryAlert": false,
    "ReminderSettings": {
        "ReminderDays": 5,
        "ReminderCount": 3,
        "EnableAutoReminder": true
    },
    "EnableReassign": true,
    "Message": "",
    "Signers": [
        {
            "Name": "Alex",
            "EmailAddress": "alexgayle@boldsign.dev",
            "SignerType": "Signer",
            "EnableQes":"true",
            "FormFields": [
                {
                    "Id": "string",
                    "Name": "string",
                    "FieldType": "Signature",
                    "PageNumber": 1,
                    "Bounds": {
                        "X": 50,
                        "Y": 50,
                        "Width": 125,
                        "Height": 25
                    },
                    "IsRequired": true
                }
                
            ],
            "Locale": "EN"
        }
    ],
    "ExpiryDays": 30,
    "Files": [
        "data:application/pdf;base64,JVBERi0xLjcKJcfs..."
    ],
    "Title": "Sampledocument",
    "ExpiryDateType": "Days",
    "ExpiryValue": 60,
    "DisableEmails": false,
    "MetaData": {
    "DocumentType": "new",
    "DocumentCategory": "Software"
  }
  }'

.NET

var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var documentClient = new DocumentClient(apiClient);

List<FormField> formField = new List<FormField>
{
    new FormField(
        id: "Signature",
        type: FieldType.Signature,
        pageNumber: 1,
        bounds: new Rectangle(x: 50, y: 50, width: 200, height: 30))
};

var documentDetails = new SendForSign
{
    Title = "Agreement",
    Signers = new List<DocumentSigner>
    {
        new DocumentSigner(
            signerName: "David",
            signerType: SignerType.Signer,
            signerEmail: "david@cubeflakes.com",
            formFields: formField)
        {
            EnableQes = true
        }
    },
    Files = new List<IDocumentFile>
    {
        new DocumentFilePath
        {
            ContentType = "application/pdf",
            FilePath = "YOUR_FILE_PATH",
        }
    },
};

var documentCreated = documentClient.SendDocument(documentDetails);

Python

import boldsign

configuration = boldsign.Configuration(api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:

    document_api = boldsign.DocumentApi(api_client)
    
    form_field = boldsign.FormField(
        fieldType="Signature",
        pageNumber=1,
        bounds=boldsign.Rectangle(x=50, y=50, width=200, height=25)
    )

    document_signer = boldsign.DocumentSigner(
        name="David",
        emailAddress="david@cubeflakes.com",
        signerType="Signer",
        formFields=[form_field],
        enableQes=True  
    )

    send_for_sign = boldsign.SendForSign(
        title="Document SDK API",
        files=["YOUR_FILE_PATH"],
        signers=[document_signer]
    )
    
    document_created = document_api.send_document(send_for_sign)

PHP

<?php
require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\{FormField, Rectangle, DocumentSigner, SendForSign, FileInfo};

$config = new Configuration();
$config->setApiKey('YOUR_API_KEY');

$document_api = new DocumentApi($config);

$form_field = new FormField();
$form_field->setFieldType('Signature');
$form_field->setPageNumber(1);
$bounds = new Rectangle([100, 100, 100, 50]);
$form_field->setBounds($bounds);

$document_signer = new DocumentSigner();
$document_signer->setName("David");
$document_signer->setEmailAddress("david@cubeflakes.com");
$document_signer->setSignerType("Signer");
$document_signer->setFormFields([$form_field]);
$document_signer->setEnableQes(true); 

$send_for_sign = new SendForSign();
$files = 'YOUR_FILE_PATH';
$send_for_sign->setFiles([$files]);
$send_for_sign->setSigners([$document_signer]);
$send_for_sign->setTitle('Document SDK API');

$document_created = $document_api->sendDocument($send_for_sign);

Java

ApiClient client = Configuration.getDefaultApiClient();
client.setApiKey("YOUR_API_KEY");

DocumentApi documentApi = new DocumentApi(client);

FormField signatureField = new FormField();
signatureField.setFieldType(FormField.FieldTypeEnum.SIGNATURE);
signatureField.setPageNumber(1);
Rectangle bounds = new Rectangle().x(100f).y(100f).width(100f).height(50f);
signatureField.setBounds(bounds);

DocumentSigner signer = new DocumentSigner();
signer.setName("David");
signer.setEmailAddress("david@cubeflakes.com");
signer.setSignerType(DocumentSigner.SignerTypeEnum.SIGNER);
signer.setFormFields(Arrays.asList(signatureField));
signer.setEnableQes(true); 

SendForSign sendForSign = new SendForSign();
File file = new File("YOUR_FILE_PATH");  
sendForSign.setFiles(Arrays.asList(file));
sendForSign.setSigners(Arrays.asList(signer));
sendForSign.setTitle("Document SDK API");

DocumentCreated documentCreated = documentApi.sendDocument(sendForSign);

Node.js

import { DocumentApi, DocumentSigner, FormField, Rectangle, SendForSign } from "boldsign";
import * as fs from 'fs';

const documentApi = new DocumentApi();
documentApi.setApiKey("YOUR_API_KEY");

const bounds = new Rectangle();
bounds.x = 100;
bounds.y = 50;
bounds.width = 100;
bounds.height = 100;

const formField = new FormField();
formField.fieldType = FormField.FieldTypeEnum.Signature;
formField.pageNumber = 1;
formField.bounds = bounds;

const documentSigner = new DocumentSigner();
documentSigner.name = "David";
documentSigner.emailAddress = "david@cubeflakes.com";
documentSigner.signerType = DocumentSigner.SignerTypeEnum.Signer;
documentSigner.formFields = [formField];
documentSigner.enableQes = true; 

const files = fs.createReadStream("YOUR_FILE_PATH");

const sendForSign = new SendForSign();
sendForSign.title = "Agreement";
sendForSign.signers = [documentSigner];
sendForSign.files = [files];

const documentCreated = documentApi.sendDocument(sendForSign);

In the code examples above, make sure to replace the placeholder values for the API Key and file path with your actual API Key and file location. Additionally, set the enableQes property to true.
Once executed, the document will be sent to the signer with QES verification enabled, requiring them to verify their identity before completing the signing process.

QES usage restrictions

  • Signing order must be enabled whenever QES is enabled for multiple signers. In this case, QES must be enabled for either all signers or only the last signer.
  • Total combined size of all files (uploads + URLs) must be less than or equal to 30 MB.
  • QES cannot be used if any signer shares the same signing order as another signer. Each signer must have a unique signing order when QES is enabled.
  • QES is not available for self-signing, reviewers, or group signers.
  • Collaborative fields are not supported for QES-enabled signers.
  • Allow configure fields are not supported when QES is enabled with multiple signers.
  • The Combine Audit Trail option is not supported when QES is enabled. The audit trail will be downloaded separately, even if the option is selected.
  • The Combine Attachments option is not supported when QES is enabled. Attachments will be downloaded separately, even if the option is selected.
  • When QES is enabled with multiple signers, only the first signer can access all field types (e.g., textboxes, checkboxes). All other signers are limited to signature fields only, which are mandatory during signing.

For detailed instructions on signing the QES document using the Evrotrust app, please refer to this guide: How to sign a QES document?.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied