Your First Template in 5 Minutes
This guide takes you from zero to a working signable template. By the end you'll have a simple contract with one signer that the SDK can open, fill, and sign.
- Your Auco private key and public key (dashboard → Developers).
curlor an equivalent HTTP client.
Step 1 — Define the JSON
A minimal template needs: three questions (name, ID, email) and a signer that references them.
{
"name": "Mi Primera Plantilla",
"sign": ["nombre_firmante", "cedula_firmante", "correo_firmante"],
"config": [
{
"name": "nombre_firmante",
"description": "Ingrese su nombre completo",
"type": "name"
},
{
"name": "cedula_firmante",
"description": "Ingrese su cédula",
"type": "identification",
"country": "CO"
},
{
"name": "correo_firmante",
"description": "Ingrese su correo electrónico",
"type": "email"
}
],
"signatureProfile": [
{
"name": "nombre_firmante",
"identification": "cedula_firmante",
"email": "correo_firmante",
"phone": "correo_firmante",
"type": "firmante"
}
]
}
Step 2 — Write the Mask HTML
The Mask HTML is what the user sees while filling out the form. One <span name="..."> for each question in the JSON.
<!DOCTYPE html>
<html lang="es">
<head><meta charset="UTF-8" /><title>Mi Primera Plantilla</title></head>
<body>
<h1>Acuerdo Simple</h1>
<p>Yo, <span name="nombre_firmante">_____</span>, identificado con
<span name="cedula_firmante">_____</span>, confirmo mi identidad
con el correo <span name="correo_firmante">_____</span>.</p>
</body>
</html>
Step 3 — Write the Complete HTML
The Complete HTML is what prints into the final PDF. Same spans as Mask, plus a <div class="sign-margin"> where the signature will go.
<!DOCTYPE html>
<html lang="es">
<head><meta charset="UTF-8" /><title>Mi Primera Plantilla</title></head>
<body>
<h1>Acuerdo Simple</h1>
<p>Yo, <strong><span name="nombre_firmante">_____</span></strong>,
identificado con <strong><span name="cedula_firmante">_____</span></strong>,
confirmo mi identidad con el correo
<strong><span name="correo_firmante">_____</span></strong>.</p>
<p>Firmado el <span name="signDate">_____</span>.</p>
<div id="firmante" class="sign-margin"></div>
</body>
</html>
The id="firmante" on the <div> must match the type in the JSON's signatureProfile.
Step 4 — Create the template
Send the JSON to the API. The response returns two signed URLs (valid for 5 minutes) where you'll upload the HTMLs.
curl -X POST https://dev.auco.ai/v1.5/ext/template \
-H "Content-Type: application/json" \
-H "Authorization: your_private_key" \
-d @plantilla.json
Response:
{
"id": "template_id",
"urls": {
"mask": "https://...signed_mask",
"complete": "https://...signed_complete"
}
}
Save the id — you'll use it from the SDK.
Step 5 — Upload the HTMLs
Both files upload as binaries with PUT to the signed URLs from the previous step.
curl -X PUT "https://...signed_mask" \
-H "Content-Type: text/html" \
--data-binary @mask.html
curl -X PUT "https://...signed_complete" \
-H "Content-Type: text/html" \
--data-binary @complete.html
If the URLs expire before you upload, you need to call POST /template again (there is no endpoint to regenerate them).
Step 6 — Try it from the SDK
With the id you received, open the template in the SDK. See the SDK documentation for the full integration.
Next steps
- JSON Configuration — all 17 question types, validations, and conditionals.
- HTML Configuration — conditional clauses, multiple signers, automatic fields like
signDate. - Request Type — pre-fill fields from your own service.
- Updating a template — change questions or HTML without recreating it.