Add a document

You can add up to 20 documents to your transaction. We accept PDF, Word and images as input format in a maximum size limit of 25MB for each document (50MB if the Big Files feature is activated on your workspace). The output document (the document that is signed) is always a PDF.

Adding a document to a transaction is a two-step process.

Upload your file to Universign servers

Before you can add the document to your transaction, you must upload your it on our servers. To do so, send a multipart/form-data request to POST /v1/files and pass the document (in PDF, Word or image format) in the file argument:

curl
https://api.universign.com/v1/files \
-F [email protected]

You must send one document per request.

A file ID is returned:

{
  "object" : "file",
  "id" : "file_d0bDo8LgEkEA",
}

Note that we keep the file for 24 hours so you can reuse the file ID during this period.

Add the file ID to your transaction request

To add the file ID to your transaction, send a request to POST /v1/transactions/{transaction_id}/documents and pass the file ID as the document argument.

Note: You must send one request per document.

curl
https://api.universign.com/v1/transactions/tx_aA5g6yzYVYW8/documents \
-d document=file_0Y6rOeYJ6qOBxCZ012yY1LrBeg \
-d name=DocName

You can set other optional arguments:

  • archiving_configuration_id: the ID of the signed documents archiving configuration. To be retrieved from your workspace. For more details about archiving configuration, refer to Archive signed documents.
  • compliance_policy: set to pdfa to force the signing/sealing operation to respect PDF/A standard. If not set, if you import a PDF/A document, it will be signed/sealed but no longer as PDF/A compliant as it was beforehand.

PDF/A is an ISO standardized format (ISO 19005) with strict rules to eliminate anything that could break over time.

PDF/A is commonly required when documents must be archived, exchanged, or legally preserved.

You may need to seal/sign a PDF/A document and guarantee the same level of compliance once sealed/signed.

The API returns a document ID. By default, the document name is the imported file name:

{
    "id": "doc_wWz6",
    "name": "myDocument.pdf",
    "updatable": true,
    "deletable": true,
    "fields": []
}

Import a document from a URL (Full transaction request only)

If you send a full transaction request, you can import a document directly from a URL. This feature allows you to bypass document uploads constraints.

Note that this feature needs to be activated on your workspace. If you wish to activate it, you must contact your account manager at Universign.

You need first to authorize the URL in your workspace. For more details, visit Document URLs.

Then, in your full transaction request, pass the URL in the URL argument. Note that the URL argument must not be passed if the document content or file_id is set.

Important: Make sure the URL leads to the document itself and not to its location.

"documents" : [{
    "url" : "https://getsamplefiles.com/download/pdf/sample-1.pdf",
    "name" : "MyDoc", 
    "fields" : [
        {
      "id" : "field_id_1",
      "name" : "signature field",
      "page" : 1,
      "x" : 150,
      "y" : 275,
      "type" : "signature",
      "consents" : [ "I hereby accept the terms and conditions stated in this document!" ],
      "optional_consents" : [ "I accept to fill a satisfaction form once the signature process is completed!" ] 
    },{
      "id" : "field_id_2",
      "name" : "signature field 2",
      "page" : 1,
      "x" : 175,
      "y" : 200,
      "type" : "signature"
    }]
  }]

Set sender name display
Delete a document
Developer tools
Guides
Services
API reference