Skip to main content

✏️ Document Upload

POST /document/upload

This service allows initiating a process to request attachments for signature or just attachments without signature. Each attachment can be configured as mandatory or optional.

info

If you want to include a signature process, you can directly send a PDF document in base64 format. If you want the signature and attachment request to be part of a template, note that this flow cannot be configured directly through the endpoint; you must request support from our team.

info

Before integrating this endpoint, you may want to see how to define signature positions and identity validation settings.


Authentication

Include your private key in the Authorization header.

Authorization: prk_xxx...

Creation Parameters

NameTypeRequiredDescription
emailStringRequiredEmail address of the process creator.
documentStringConditionalIf you want to create the process using a template, you must send the template ID in this field. To view and obtain templates, access this documentation.
nameStringRequiredName of the document signing process, only if the attachments process includes document signing.
messageStringRequiredMessage that will be included in the body of the email notifying signers or approvers of the document.
subjectStringRequiredSubject line for the notification email sent to signers or approvers.
fileStringConditionalIf you want to upload the document in the same request, send the PDF file in Base64 in this parameter. (Only for small files)
compressBooleanConditionalIf the PDF file to be uploaded is too large, it is recommended not to send the file parameter; instead, use compress: true. This way, the service returns a signed URL to upload the PDF file in binary format via a PUT request.
folderStringConditionalIf you want to save this process in a specific folder, provide the path of that folder in this parameter. Note that the folder must exist and belong to the process creator.
rememberNumberConditionalParameter that enables automatic reminders with the time interval (in hours) between each notification. Must be a multiple of 3
expiredDateDateOptionalExpiration date of the document. This must be more than 3 days after the process creation date and is sent in JSON Date format.
cameraBooleanOptionalThis parameter indicates if photo validation is required. Default is false.
otpCodeBooleanOptionalThis parameter indicates if OTP code validation is required. Default is false.
optionsObjectOptionalThis parameter specifies the identity validation settings. See more
notificationBooleanOptionalThis parameter defines whether participants will be notified once the process is created. Default is true.
readersArrayOptionalThis parameter is a list of objects defining participants who are not part of the signing process but should be able to observe each phase of the signing process.
readers[x].nameStringRequiredName of the reader.
readers[x].emailStringRequiredEmail of the reader.
signProfileArrayRequiredThis field is a list of objects containing information for each signer or approver for their notification and signature.
signProfile[x].nameStringRequiredName of the signer.
signProfile[x].emailStringRequiredEmail of the signer.
signProfile[x].phoneStringRequiredPhone number of the signer.
signProfile[x].roleStringConditionalThis parameter defines the participant's role; it can be 'APPROVER' or 'SIGNER'.
signProfile[x].orderStringConditionalThis parameter defines the order in which the notification process for signing or approval will take place.
signProfile[x].labelBooleanConditionalParameter indicating if signature positioning will be done using labels in the PDF.
signProfile[x].positionArrayConditionalIn this parameter, the signature positions for this signer on each page are sent. Signature positions can be preloaded in templates. Obtain more information in the documentation.
signProfile[x].typeArrayConditionalName used to identify the signer type if pre-saved in a template, e.g., 'co-signer'.
signProfile[x].optionsObjectOptionalAllows defining custom validations for a specific signer. If you want to apply validations individually by signer, See more.
signProfile[x].cameraBooleanOptionalIf you want individual validations per signer and require photo or video validation, send this parameter as true. Default is false.
signProfile[x].otpCodeBooleanOptionalIf you want individual validations per signer and require OTP validation, send this parameter as true. Default is false.
signProfile[x].bothBooleanOptionalIf you want individual validations per signer and require the signing process to be possible via WhatsApp and/or email, send this parameter as true. Default is false.

🧪 Usage Examples

tip

You can copy any of the examples according to your preferred language.

  • Remember that email addresses and phone numbers between signers must not be repeated.
  • Readers will receive notifications for each update in the signing process.

Signing Process with Automatic Reminders (PDF Base64)

In this case, reminders will be sent every 3 hours.

curl --location 'https://dev.auco.ai/v1.5/ext/document/upload' \
--header 'Authorization: prk_private_key_company' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Documento de prueba",
"subject": "prueba auco",
"message": "prueba auco",
"remember": 3,
"email": "example@auco.ai",
"signProfile": [
{
"name": "Jhon Firma",
"email": "example@auco.ai",
"label": true
}
],
"readers":[{"email":"example2@auco.ai", "name":"Frimante 1"}],
"file": Base64
}'

Document Signing with Individual Validations (compress - PDF binary)

curl --location 'https://dev.auco.ai/v1.5/ext/package/upload' \
--header 'Authorization: prk_private_key_company' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Prueba de Anexos Compress y validaciones individuales",
"email": "owner@auco.ai",
"message": "Cargar adjuntos de prueba",
"subject": "Solicitud de adjuntos",
"packageName": "Adjuntos api prueba 2",
"signProfile": [
{
"type": "firmante1",
"name": "Nombre Firmante 1",
"email": "example @auco.ai",
"camera": true,
"otpCode": true,
"options": {
"camera": "identification",
"video": true,
"whatsapp": true,
"otpCode": "email"
},
"phone": "+573000000000",
},
{
"type": "firmante2",
"name": "Nombre Firmante 2",
"email": "example2@auco.ai",
"phone": "+573000000000",
"otpCode": true,
"options": {
"otpCode": "email"
},
}
],
"compress": true
}'

📥 Response Examples

🔹 Sending PDF in Base64 via the 'file' attribute

{
"package": "PROCESSID",
"code": "DOCUMENTCODE"
}

🔸 Sending the 'compress' attribute

info

The signed URL provided in the response is single-use and will only be available for 5 seconds. It must be used to upload the PDF document in binary format via an HTTP PUT request.

{
"package": "PROCESSID",
"code": "DOCUMENTCODE",
"url": "signed_url"
}

⚠️ Error Responses

CodeDescription
400Missing parameters, or some validations do not meet applicability conditions
401Invalid or missing authentication