Skip to main content

Create Attachments Process

POST /package/upload

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

info

If you want to include a signing process, you can upload the PDF document in the same request: in Base64 with file, or in binary (via a signed URL with PUT) using compress. If you want the signing and the attachment request to be part of a presaved flow template, it must be configured beforehand with our support team; once created, you reference it by its id in the document field.

info

Before integrating this endpoint, you may need 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

info
  • The file, compress and document fields are mutually exclusive: you can send at most one. If you send none, a collection-only attachments process without signing is created (no document is generated) and in that case name is not required either.
  • Each signProfile object must include exactly one of type, label or position (mutually exclusive and one required), even in attachment-only processes without signing.
NameTypeRequiredDescription
emailStringRequiredEmail address of the process creator.
documentStringConditionalId of a presaved flow template (created beforehand with the support team) used to create the process.
nameStringConditionalName of the document to be signed. Only required if the process includes a document (file, compress or document). In a collection-only attachments process without signing, it does not need to be sent.
packageNameStringRequiredName for the folder that will contain the attachments and the document to be signed (if included).
messageStringOptionalMessage that will be included in the body of the email notification sent to signers or approvers. If not sent, Auco uses a default value.
subjectStringOptionalSubject of the notification email sent to signers or approvers. If not sent, Auco uses a default value.
fileStringConditionalIf you want to upload the document in the same request, send the PDF file in Base64 format 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. The service will return 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 here. The folder must exist and belong to the process creator.
rememberNumberConditionalEnables automatic reminders with the time lapse (in hours) between each notification. Must be a multiple of 3.
expiredDateDateOptionalExpiration date of the document. Must be at least 3 days after the process creation date and should be sent in JSON Date format.
cameraBooleanOptionalIndicates if photo validation is required. Default is false.
otpCodeBooleanOptionalIndicates if OTP code validation is required. Default is false.
optionsObjectOptionalSpecifies the identity validation settings.
notificationBooleanOptionalDefines whether participants will be notified once the process is created. Default is true.
signProfileArrayRequiredList of objects containing information about each signer or approver for notification and signing.
signProfile[x].nameStringRequiredName of the attachment user.
signProfile[x].emailStringRequiredEmail address of the attachment user.
signProfile[x].phoneStringRequiredPhone number of the attachment user.
signProfile[x].roleStringConditionalDefines the participant's role; can be 'APPROVER' or 'SIGNER'.
signProfile[x].orderStringConditionalDefines the order in which the notification process for signing or approval will occur.
signProfile[x].labelBooleanConditionalIndicates whether signature positioning will be done using labels in the PDF.
signProfile[x].positionArrayConditionalSignature positions for this signer on each page. Signature positions can be preloaded in templates. Get more information in the documentation.
signProfile[x].typeStringConditionalIdentifier for 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 individual validations per signer, this parameter accepts the same fields as the global options. You can combine global and individual validations, applying global ones by default and individual ones where special treatment is required.
signProfile[x].cameraBooleanOptionalTo have individual validations per signer and require photo or video validation, set this parameter to true. Default is false.
signProfile[x].otpCodeBooleanOptionalTo have individual validations per signer and require OTP validation, set this parameter to true. Default is false.
signProfile[x].bothBooleanOptionalTo have individual validations per signer and allow the signing process to be completed via WhatsApp and/or email, set this parameter to true. Default is false.
signProfile[x].filesArrayRequiredList of attachment files that will be requested from the signer.
signProfile[x].files[x].nameStringRequiredName of the attachment file.
signProfile[x].files[x].optionalBooleanOptionalIf any attachment file is optional, send this parameter as true. Default is false.

🧪 Usage Examples

tip

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

Attachment Collection Only (no document or signing)

tip

No file, compress, document or name is sent: the process only requests attachments from the participants.

curl --location 'https://dev.auco.ai/v1.5/ext/package/upload' \
--header 'Authorization: prk_prk_tuLlavePrivada' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "owner@auco.ai",
"message": "Cargar adjuntos de prueba",
"subject": "Solicitud de adjuntos",
"packageName": "Adjuntos sin firma",
"signProfile": [
{
"type": "anexador1",
"name": "Nombre Anexador 1",
"email": "example@auco.ai",
"phone": "+573000000000",
"files": [
{
"name": "cedula de ciudadanía"
},
{
"name": "hoja de vida",
"optional": true
}
]
}
]
}'

Optional Attachments with Document Signature (PDF Base64)

curl --location 'https://dev.auco.ai/v1.5/ext/package/upload' \
--header 'Authorization: prk_prk_tuLlavePrivada' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Contratación de prueba upload 1",
"email": "owner@auco.ai",
"message": "Cargar adjuntos de prueba",
"subject": "Solicitud de adjuntos",
"packageName": "Adjuntos api prueba",
"file": Base64,
"signProfile": [
{
"name": "Nombre Firmante 1",
"email": "example@auco.ai",
"phone": "+573000000000",
"position": [
{
"page": 1,
"x": 0.5854166461564629,
"y": 0.8034861200774693,
"w": 100,
"h": 50
}
],
"files": [
{
"name": "cedula de ciudadanía"
},
{
"name": "hoja de vida"
},
{
"name": "pasaporte",
"optional": true
}
]
}
],
}'

Optional Attachments with Document Signature (PDF compress and individual validations)

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",
"files": [
{
"name": "cedula de ciudadanía"
},
{
"name": "hoja de vida"
},
{
"name": "pasaporte",
"optional": true
}
]
},
{
"type": "firmante2",
"name": "Nombre Firmante 2",
"email": "example2@auco.ai",
"phone": "+573000000000",
"otpCode": true,
"options": {
"otpCode": "email"
},
"files": [
{
"name": "certificado"
}
]
}
],
"compress": true
}'

📥 Response Examples

🔹 Sending PDF in Base64 using the 'file' attribute

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

🔹 Attachment-only process (no document)

info

Since no document is created, the response only includes the package.

{
"package": "PROCESSID"
}

🔸 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