New Feature: Electronic Signature Using REST API (for PDF documents)

Continuing with our mission to bring accurate, reliable and easy to use Doc Conversion API, and provide a single stop location for all your document operations, we have now released our new electronic signature feature.

This new Electronic Signature feature enables end users to electronically sign your PDF documents, allowing you to fully digitalize and automate your business process, and eliminate unnecessary time and costs. Electronic Signature also enhances the security of the entire business process and improves user experience and satisfaction.

Doc Conversion API’s Electronic signature is fast, green, secure and extremely convenient, contributing to an improved overall experience.

 

Electronic Signature using REST API (Curl)

Doc Conversion API is compatible with all programming languages and frameworks, you can find a list of code examples here.

You can easily sign PDF documents using Doc Conversions’ REST API by making a simple POST request that contains the following elements:

  1. API endpoint: https://api.docconversionapi.com/sign
  2. Application ID and Secret Key: These are your app credentials that you get from your Doc Conversion API dashboard.
  3. Inputfile: This is the file you would like to sign
  4. Signature: The URL/file that directs to your signature file (.png, .svg, etc).
  5. Certificate: The URL/file that directs to your SSL certificate file (.pfx,).
  6. optionsJSON: a JSON object that contains values of your signature details, this can contain:
  • signatureX: An integer value that specifies the horizontal location of your signature.
  • signatureY: An integer value that specifies the vertical location of your signature.
  • signatureWidth: An integer value that specifies the width of your signature image.
  • signatureHeight: An integer value that specifies the height of your signature image.
  • Reason: This is a text string that specifies the reason for signing.
  • Contact: The person who authorized the signature.
  • signerLocation: The location of the signer.
  • Visible: A Boolean value that specifies whether or not the signature should be visible on the document.
  • certificatePassword: The password used to authenticate the certificate.

Once we have these values, we can combine now all elements together, to form our POST request in curl, the curl should look like the following:

curl --request POST \
  --url 'https://api.docconversionapi.com/convert?outputFormat=html' \
  --header 'X-ApplicationID: <Your_Application_ID>' \
  --header 'X-SecretKey: <Your_Application_SecretKey>' \
  --header 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  --form inputFile=undefined \
  --form optionsJSON={
               "signatureX":"400",
               "signatureY":"0",
               "signatureWidth":"180",
               "signatureHeight":"140",
               "reason":"Test signature",
               "contact":"YOUR_CONTACY",
               "signerLocation":"YOUR_SIGNER_LOCATION",
               "visible":"true",
               "certificatePassword":"YOUR_CERTIFICATE_PASSWORD"
                                 }' \
  --form signatureAppearance=undefined \
  --form certificate=undefined \

Please note that you would need to replace the values with your preferred values/details.

This request should return a sign PDF file that you can further use in your operations.

To demonstrate how the signature will look, we used a PDF test document that looks like this:

Document without electronic signature

After sending the above POST request, we received the signed document which now looks like this:

electronic signature

If you have any questions or need any further help, please contact us at [email protected]