Upload document for e-signature
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.
Responses
-
200 application/json
Successfully uploaded document for signature
-
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
}