Skip to main content

Document Upload

POST/document/uploadprivate keyprk_

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

NameTypeDescription
emailString requiredEmail address of the process creator.
codeString optionalCode of a document previously put into edit. Sending it overwrites that process instead of creating a new one, keeping its code. Resend the full payload: whatever you leave out is removed. Read more
documentString conditionalIf 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.
nameString requiredName of the document signing process, only if the attachments process includes document signing.
messageString conditionalMessage that will be included in the body of the email notifying signers or approvers of the document. Required when any participant is notified by email.
subjectString conditionalSubject line for the notification email sent to signers or approvers. Required when any participant is notified by email.
fileString conditionalIf you want to upload the document in the same request, send the PDF file in Base64 in this parameter. (Only for small files)
compressBoolean conditionalIf 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.
folderString conditionalIf 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.
rememberNumber conditionalParameter that enables automatic reminders with the time interval (in hours) between each notification.
expiredDateDate optionalExpiration date of the document. This must be more than 3 days after the process creation date and is sent in JSON Date format.
cameraBoolean optionalThis parameter indicates if photo validation is required. Default is false.
otpCodeBoolean optionalThis parameter indicates if OTP code validation is required. Default is false.
optionsObject optionalThis parameter specifies the identity validation settings. See more
notificationBoolean optionalDefines whether Auco notifies participants once the process is created. Default is true. It is the default for every signer; each one can override it with signProfile[x].notification.
targetWebhooksArray[String] optionalIf you have several webhooks, you can send the name of the webhook to which you want the updates of this process to be notified.
tagsArray[String] optionalIf you want to classify processes with tags, you can send the names of the tags to relate the process to (They must exist).
customObject optionalFree-form object to send integrator-defined parameters (for example, internal identifiers or metadata). Auco stores it as-is and forwards it in webhook notifications and in the GET /document response, without interpreting or validating its contents.
readersArray optionalThis 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].nameString requiredName of the reader.
readers[x].emailString requiredEmail of the reader.
signProfileArray requiredThis field is a list of objects containing information for each signer or approver for their notification and signature.
signProfile[x].nameString requiredName of the signer.
signProfile[x].emailString requiredEmail of the signer.
signProfile[x].phoneString requiredPhone number of the signer.
signProfile[x].roleString conditionalThis parameter defines the participant's role; it can be 'APPROVER' or 'SIGNER'.
signProfile[x].orderString conditionalThis parameter defines the order in which the notification process for signing or approval will take place.
signProfile[x].labelBoolean(true) | String conditionalParameter indicating if signature positioning will be done using labels in the PDF.
signProfile[x].positionArray conditionalIn 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].typeString conditionalName used to identify the signer type if pre-saved in a template, e.g., 'co-signer'.
signProfile[x].optionsObject optionalAllows defining custom validations for a specific signer. If you want to apply validations individually by signer, See more.
signProfile[x].cameraBoolean optionalIf you want individual validations per signer and require photo validation, send this parameter as true. Default is false.
signProfile[x].otpCodeBoolean optionalIf you want individual validations per signer and require OTP validation, send this parameter as true. Default is false.
signProfile[x].notificationBoolean optionalOverrides the global notification for this signer, in either direction: false silences them even if the global is true, and true makes Auco notify them even if the global is false. Silenced signers get an id in the response.

🧪 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://api.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://api.auco.ai/v1.5/ext/document/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",
"signProfile": [
{
"type": "firmante1",
"name": "Nombre Firmante 1",
"email": "example @auco.ai",
"camera": true,
"otpCode": true,
"options": {
"camera": "identification",
"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

🔹 Normal mode (without compress or compress: false)

{
"document": "ABCDEF1234"
}
FieldTypeDescription
documentStringUnique code of the created document.

🔸 Compress mode (compress: true)

info

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

{
"document": "ABCDEF1234",
"url": "https://s3.amazonaws.com/...signed-url..."
}
FieldTypeDescription
documentStringUnique code of the created document.
urlStringPre-signed S3 URL to upload the PDF (expires in 300s).

🔹 Signers Auco does not notify

The response includes signProfile when any signer is silenced, that is, when their effective notification is false: their own if they carry one, otherwise the global one. Every silenced signer carries an id the integrator uses to take them to sign on their own. Signers Auco does notify appear without id: their access is generated when they are notified.

{
"document": "ABCDEF1234",
"signProfile": [
{
"id": "abc123",
"name": "Juan",
"email": "juan@email.com",
"phone": "+57300..."
}
]
}
FieldTypeDescription
documentStringUnique code of the created document.
signProfileArrayList of signers in the process.
signProfile[x].idStringUnique identifier of the signer.
signProfile[x].nameStringName of the signer.
signProfile[x].emailStringEmail address of the signer.
signProfile[x].phoneStringPhone number of the signer.
tip

This field is also included in compress mode along with the url.


⚠️ Error Responses

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