🔵 Create a Signature Package
POST /document/save
This service allows you to generate a package of documents from an Auco template or a PDF file. Once the process is completed, you will receive each document with its own signature certificate.
Before integrating this endpoint, you may need to see how to define signature positions and identity validation settings.
Steps to create a document package through an automated template:
- Query available templates or custom documents.
- Obtain the
_id
of the base document. - Query required variables of the selected document.
- Construct and send the creation request.
If you want to do it using a PDF, it is not necessary to send the file in the initial request. At the end, a signed URL will be returned for each document in the package.
Below are the required parameters for this service, along with examples and possible system responses.
Authentication
Include your private key in the Authorization
header.
Authorization: prk_xxx...
Creation Parameters
Name | Type | Required | Description |
---|---|---|---|
email | String | Required | Email address of the process creator. |
document | String | Conditional | ID of the custom document or Auco template. Only required if you want to use a template. |
name | String | Required | Name of the document signing process. Required if the process includes document signing. |
message | String | Required | Message that will be sent in the body of the email notifying signers or approvers of the document. |
subject | String | Required | Subject with which the notification email will be sent to signers or approvers. |
folder | String | Conditional | If you want to save this process in a specific folder, specify the path here. The folder must exist and belong to the process creator. |
remember | Number | Conditional | Enables automatic reminders with the time interval (in hours) between each notification. Must be a multiple of 3. |
expiredDate | Date | Optional | Expiration date of the document. Must be at least 3 days after the process creation date and is sent in JSON Date format. |
camera | Boolean | Optional | Indicates if photo validation is required. Default is false . |
otpCode | Boolean | Optional | Indicates if OTP code validation is required. Default is false . |
options | Object | Optional | Specifies identity validation settings. See more |
notification | Boolean | Optional | Defines whether participants will be notified once the process is created. Default is true . |
data | Array | Conditional | Contains all the data required by the template to generate the document. Only required if using a template. |
data[x].key | String | Required | Name of the parameter registered in the template. |
data[x].value | String | Required | Value assigned to the parameter. |
documents * | Array | Required | List of objects, each representing a document in the package. |
documents[0].name | String | Required | Name of the document. |
documents[0].readers | Array | Optional | List of objects defining participants who are not part of the signing process but should observe each phase of the signing process. |
documents[0].readers[x].name | String | Required | Name of the reader. |
documents[0].readers[x].email | String | Required | Email address of the reader. |
documents[0].signProfile | Array | Required | List of objects containing information for each signer or approver for notification and signing. |
documents[0].signProfile[x].name | String | Required | Name of the signer. |
documents[0].signProfile[x].email | String | Required | Email address of the signer. |
documents[0].signProfile[x].phone | String | Required | Phone number of the signer. |
documents[0].signProfile[x].role | String | Conditional | Defines the participant's role, can be 'APPROVER' or 'SIGNER' . |
documents[0].signProfile[x].order | String | Conditional | Defines the order in which the notification process for signing or approval will occur. |
documents[0].signProfile[x].position | Array | Conditional | Signature positions for this signer on each page. Signature positions can be preloaded in templates. See more in how to define signature positions. |
documents[0].signProfile[x].type | Array | Conditional | Name used to identify the signer type if pre-saved in a template, e.g.: 'co-signer' . |
documents[0].signProfile[x].label | Boolean | Conditional | Indicates if signature positioning will be done using labels in the PDF. |
documents[0].signProfile[x].options | Object | Optional | Allows defining custom validations for a specific signer. To apply validations individually per signer, see more. |
documents[0].signProfile[x].camera | Boolean | Optional | If you want individual validations per signer and require photo or video validation, set this parameter to true . Default is false . |
documents[0].signProfile[x].otpCode | Boolean | Optional | If you want individual validations per signer and require OTP validation, set this parameter to true . Default is false . |
documents[0].signProfile[x].both | Boolean | Optional | If you want individual validations per signer and require the signing process to be possible via WhatsApp and/or email, set this parameter to true . Default is false . |
🧪 Usage Examples
You can copy any of the examples according to your preferred programming language.
- Email addresses and phone numbers among signers must not repeat.
- Readers will receive notifications for every update in the signature process.
- Date format:
'DD/MM/YYYY'
- Phone numbers must include the country code, e.g.:
+57, +1, +52...
Document Package via PDF
- curl
- Python
- Node.js
curl --location 'https://dev.auco.ai/v1/ext/document/many' \
--header 'Authorization: prk_e1cd6a01ecdb4b4ea72ec118e33b18de' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Prueba paquete 2 documentos",
"email": "example@auco.ai",
"message": "Hola a todos, les comparto el paquete de documentos para la firma",
"options": {
"camera": "identification",
"whatsapp": true
},
"camera": true,
"otpCode": false,
"documents": [
{
"name": "Documento 1",
"signProfile": [
{
"type": "solicitante",
"name": "Firmante 1",
"phone": "+573000000000",
"email": "example1@auco.ai"
}
]
},
{
"name": "Documento 2",
"signProfile": [
{
"type": "solicitante",
"name": "Firmante 1",
"phone": "+573000000000",
"email": "example2@auco.ai"
}
]
}
]
}
import requests
import json
url = "https://dev.auco.ai/v1/ext/document/many"
payload = json.dumps({
"name": "Prueba notification2",
"email": "example@auco.ai",
"message": "Hola a todos, les comparto el paquete de documentos para la firma",
"options": {
"camera": "identification",
"whatsapp": True
},
"camera": True,
"otpCode": False,
"documents": [
{
"name": "Documento 1",
"signProfile": [
{
"type": "solicitante",
"name": "Firmante 1",
"phone": "+573000000000",
"email": "example1@auco.ai"
}
]
},
{
"name": "Documento 2",
"signProfile": [
{
"type": "solicitante",
"name": "Firmante 1",
"phone": "+573000000000",
"email": "example2@auco.ai"
}
]
}
]
})
headers = {
'Authorization': 'prk_e1cd6a01ecdb4b4ea72ec118e33b18de',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let data = JSON.stringify({
name: 'Prueba notification2',
email: 'example@auco.ai',
message: 'Hola a todos, les comparto el paquete de documentos para la firma',
options: {
camera: 'identification',
whatsapp: true,
},
camera: true,
otpCode: false,
documents: [
{
name: 'Documento 1',
signProfile: [
{
type: 'solicitante',
name: 'Firmante 1',
phone: '+573000000000',
email: 'example1@auco.ai',
},
],
},
{
name: 'Documento 2',
signProfile: [
{
type: 'solicitante',
name: 'Firmante 1',
phone: '+573000000000',
email: 'example2@auco.ai',
},
],
},
],
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://dev.auco.ai/v1/ext/document/many',
headers: {
Authorization: 'prk_e1cd6a01ecdb4b4ea72ec118e33b18de',
'Content-Type': 'application/json',
},
data: data,
};
axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Document Package via Custom Templates
- curl
- Python
- Node.js
curl --location 'https://dev.auco.ai/v1/ext/document/many' \
--header 'Authorization: prk_e1cd6a01ecdb4b4ea72ec118e33b18de' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Prueba notification2",
"email": "example@auco.ai",
"message": "Hola a todos, les comparto el paquete de documentos para la firma",
"options": {
"camera": "identification",
"whatsapp": true
},
"camera": true,
"otpCode": false,
"documents": [
{
"name": "Documento 1",
"document": "documentId",
"data": [
{"key": "signer_nombre", "value":"firmante 1"},
{"key": "signer_identification", "value":"cc"},
{"key": "signer_phone", "value":"+573000000000"},
{"key": "manager_name", "value":"manager 1"}
]
},
{
"name": "Documento 2",
"document": "documentId",
"data": [
{"key": "signer_nombre", "value":"firmante 1"},
{"key": "signer_identification", "value":"cc"},
{"key": "signer_phone", "value":"+573000000000"},
{"key": "manager_name", "value":"manager 1"}
]
}
]
}'
import requests
import json
url = "https://dev.auco.ai/v1/ext/document/many"
payload = json.dumps({
"name": "Prueba notification2",
"email": "example@auco.ai",
"message": "Hola a todos, les comparto el paquete de documentos para la firma",
"options": {
"camera": "identification",
"whatsapp": True
},
"camera": True,
"otpCode": False,
"documents": [
{
"name": "Documento 1",
"document": "documentId",
"data": [
{
"key": "signer_nombre",
"value": "firmante 1"
},
{
"key": "signer_identification",
"value": "cc"
},
{
"key": "signer_phone",
"value": "+573000000000"
},
{
"key": "manager_name",
"value": "manager 1"
}
]
},
{
"name": "Documento 2",
"document": "documentId",
"data": [
{
"key": "signer_nombre",
"value": "firmante 1"
},
{
"key": "signer_identification",
"value": "cc"
},
{
"key": "signer_phone",
"value": "+573000000000"
},
{
"key": "manager_name",
"value": "manager 1"
}
]
}
]
})
headers = {
'Authorization': 'prk_e1cd6a01ecdb4b4ea72ec118e33b18de',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
const axios = require('axios');
let data = JSON.stringify({
name: 'Prueba notification2',
email: 'example@auco.ai',
message: 'Hola a todos, les comparto el paquete de documentos para la firma',
options: {
camera: 'identification',
whatsapp: true,
},
camera: true,
otpCode: false,
documents: [
{
name: 'Documento 1',
document: 'documentId',
data: [
{
key: 'signer_nombre',
value: 'firmante 1',
},
{
key: 'signer_identification',
value: 'cc',
},
{
key: 'signer_phone',
value: '+573000000000',
},
{
key: 'manager_name',
value: 'manager 1',
},
],
},
{
name: 'Documento 2',
document: 'documentId',
data: [
{
key: 'signer_nombre',
value: 'firmante 1',
},
{
key: 'signer_identification',
value: 'cc',
},
{
key: 'signer_phone',
value: '+573000000000',
},
{
key: 'manager_name',
value: 'manager 1',
},
],
},
],
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://dev.auco.ai/v1/ext/document/many',
headers: {
Authorization: 'prk_e1cd6a01ecdb4b4ea72ec118e33b18de',
'Content-Type': 'application/json',
},
data: data,
};
axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
📥 Response Examples
Document Package via PDF
{
"id": "packageId",
"documents": [
{
"url": "https://signed_url_to_upload_PDF",
"name": "Documento 1",
"code": "CODEDOC1"
},
{
"url": "https://signed_url_to_upload_PDF",
"name": "Documento 2",
"code": "CODEDOC2"
}
]
}
The signed URL provided in the response is single-use and available only for 5 seconds. It must be used to upload the PDF document in binary format via an HTTP PUT request.
Via Custom Templates
{
"id": "packageId",
"documents": [
{
"name": "Documento 1",
"code": "CODEDOC1"
},
{
"name": "Documento 2",
"code": "CODEDOC2"
}
]
}
⚠️ Error Responses
Code | Description |
---|---|
400 | Missing parameters, or one or more validations do not meet the applicability conditions. |
401 | Invalid or missing authentication. |