Upload document for e-signature

POST /upload-sign

This endpoint allows you to upload a document to an e-sign element for signature. You can upload a remote file using the url parameter or a file encoded in base64 using the data parameter.

The file size is limited to 20Mb regardless of the upload method chosen.

application/json

Body

  • elementId string Required

    ID of the e-sign element you want to add the document to

  • url string

    URL of the remote file to sign. The file size is limited to 20Mb.

  • data string

    Base64 encoded file. The file size is limited to 20Mb.

  • name string Required

    Name of the file with the file extension.

Responses

  • 200 application/json

    Successfully uploaded document for signature

    Hide response attributes Show response attributes object
    • id string

      Element ID

    • itemId string

      Reference of the element in the campaign

    • name string

      Element name

    • order integer

      Element order

    • visibility boolean

      Visibility of the element on the portal

    • Whether the visibility is conditional

    • status string

      Status of the signature element

      Values are not-sent, sent, signed, or rejected.

    • type string

      Element type

      Value is sign.

    • request object

      Additional properties are allowed.

      Hide request attributes Show request attributes object
  • Bad Request -- Your request is invalid.

  • Unauthorized -- Your API key is wrong.

  • Forbidden -- The object requested is hidden for administrators only.

  • Not Found -- The specified object could not be found.

  • Too Many Requests -- You're requesting too many objects! Slow down!

  • Internal Server Error -- We had a problem with our server. Try again later.

  • Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

POST /upload-sign
curl \
 --request POST https://api.usecollect.com/v1/upload-sign \
 --header "Content-Type: application/json" \
 --data '{"data":"JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoTmV3IGRvYyB0byBzaWduKQovUHJvZHVjZXIgKFNraWEvUERGIG0xMTQgR29vZ2xlIERvY3MgUmVuZGVyZXIpPj4KZW5kb2JqCjMgMCBvYmoKPDwvY2EgMQovQk0gL05vcm1....","name":"partnership_agreement.pdf","elementId":"CdXhhTe59xPNqJDMh"}'
Request example
{
  "data": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoTmV3IGRvYyB0byBzaWduKQovUHJvZHVjZXIgKFNraWEvUERGIG0xMTQgR29vZ2xlIERvY3MgUmVuZGVyZXIpPj4KZW5kb2JqCjMgMCBvYmoKPDwvY2EgMQovQk0gL05vcm1....",
  "name": "partnership_agreement.pdf",
  "elementId": "CdXhhTe59xPNqJDMh"
}
Response examples (200)
{
  "id": "CdXhhTe59xPNqJDMh",
  "name": "Partnership Agreement",
  "type": "sign",
  "order": 0,
  "itemId": "a3qRLd684bWLt3a5s",
  "status": "not-sent",
  "request": {
    "_id": "3SBSzkmEMqitQY9ot",
    "campaignId": "SXwNhaTXzcjoYx9Ea"
  },
  "visibility": true,
  "visibilityConditionnal": true
}