Document with attachments

Modified on Tue, 15 Sep at 11:53 AM

You can attach files to the main document — they are signed together in a single envelope, but each is a separate file with its own signatures.

How to do it

In the JSON instructions, add the attachments field. Each attachment has its own list of people and its own file:

{
    "people": [
        { "is_proposer": true, "email": "vas@email.cz", "contract_role": "approve" },
        { "is_proposer": false, "email": "protistrana@email.cz", "contract_role": "sign",
          "first_name": "Jan", "last_name": "Novák", "person_type": "nature",
          "positions": [ { "x": 50, "y": 80, "page": 0 } ] }
    ],
    "file": "uploaded_file_key",
    "attachments": [
        {
            "people": [
                { "email": "vas@email.cz", "contract_role": "approve" },
                { "email": "protistrana@email.cz", "contract_role": "sign",
                  "positions": [ { "x": 50, "y": 80, "page": 0 } ] }
            ],
            "file": "priloha_1"
        }
    ]
}

Note: in each attachment's people, all people from the document must be assigned — otherwise the API returns the error “People must be assigned to all attachments”.

The file value of an attachment is the name of the field in which you send the file — one field per file:

curl -X POST "https://api.signi.com/api/v1/contract/" \
  -H "x-api-key: VAS_API_KLIC" \
  -F "data=@dokument.json;type=application/json" \
  -F "uploaded_file_key=@hlavni-dokument.pdf" \
  -F "priloha_1=@priloha.pdf"

What you get back:

{
    "contract_id": 1234567,
    "state": "pending",
    "attachments": [
        { "contract_id": 1234568 }
    ],
    "notifications": [
        { "email": "vas@email.cz",
          "links": { "contract": "https://app.signi.com/dashboard/workspace/…/documents/1234567" } },
        { "email": "protistrana@email.cz",
          "links": { "contract": "https://app.signi.com/signing/…/received" } }
    ]
}

The links in notifications apply to the entire envelope — in the signing wizard the signer goes through the main document and the attachments all at once.

Each attachment has its own contract_id — you can use it to download it or check its status.

An attachment can also be hidden from a particular signer — see Hiding an attachment from a signer.

Where to next

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article