# Configurar formulario de plantilla

Al crear el documento a partir de una plantilla y no llenar todos los campos dinámicos, el firmante deberá completar la información para generar el documento y firmarlo. En este endpoint se configurá el formulario para facilitar la experiencia al firmante y reducir errores.&#x20;

<figure><img src="/files/Gq4HMwrgmHoYKd2inUaV" alt="" width="150"><figcaption></figcaption></figure>

### Configurar formulario&#x20;

<mark style="color:green;">**`POST`**</mark> `https://api.zapsign.com.br/api/v1/templates/update-form/`

#### Encabezado

<table><thead><tr><th width="175">Nombre</th><th width="103">Tipo</th><th>Descripción</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td>API token prefijo con la palabra "Bearer". Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23</td></tr></tbody></table>

#### Request Body

<table><thead><tr><th width="200">Nombre</th><th width="109">Tipo</th><th>Descripción</th></tr></thead><tbody><tr><td>template_id<mark style="color:red;">*</mark></td><td>string</td><td>Token de la plantilla creada. </td></tr><tr><td>custom_intro</td><td>string</td><td>Mensaje con las instrucciones al firmante (se mostrará al inicio del formulario). Default ""</td></tr><tr><td>youtube_video_code</td><td>string</td><td>Incluye un video de youtube al inicio del formulario. Si el video es https://www.youtube.com/watch?v=Fi0qJgEjYAw, el código es Fi0qJgEjYAw. Default ""</td></tr><tr><td>inputs [variable]</td><td>array &#x3C;input></td><td>Configuraciones de los campos dinámicos</td></tr></tbody></table>

**inputs**

Configuración de los campos del formulario para ayudar al firmante cuando los llene y evitar errores.&#x20;

* **variable** (string): el nombre del campo dinámico dentro del archivo DOCX. Ej: {{nombre}}.&#x20;
* **input\_type** (string): Tipo de campo para validar el formato. Default: "input"

<table><thead><tr><th width="200">input_type</th><th>Descripción</th></tr></thead><tbody><tr><td>input</td><td>Texto corto. </td></tr><tr><td>email</td><td>Correo electrónico</td></tr><tr><td>signer_fullname</td><td>Nombre y apellido. </td></tr><tr><td>radio</td><td>Opción múltiple. Se debe usar el parámetro "options" para definir las opciones. </td></tr><tr><td>dropdown-list</td><td>Lista desplegable para que el firmante seleccione una opción de la lista. Se debe usar el parámetro "options" para definir las opciones. </td></tr><tr><td>checklist</td><td>Checkbox. Se debe usar el parámetro "options" para definir las opciones. </td></tr><tr><td>date</td><td>Fecha en formato dd/mm/yyyy. </td></tr><tr><td>ext-date</td><td>Fecha de la firma por escrito. Al seleccionar esta opción, se llenará automáticamente con la fecha de firma del documento. </td></tr><tr><td>date-signature</td><td>Fecha de la firma en formato dd/mm/yyyy. Al seleccionar esta opción, se llenará automáticamente con la fecha de firma del documento</td></tr></tbody></table>

* **label** (string): Título del campo en el formulario. Ej: Nombre completo. Default: mismo nombre que variable sin los corchetes {{}}.
* **help\_text** (string): texto de ayuda que se mostrará debajo del titulo del campo. Ej: Maria Perez. Default: ""
* **options** (string): Son las opciones cuando se define el tipo de campo como opción múltiple o checkbox (input\_type "radio" o "checklist"). Ej: "Opcion A; Opcion B; Opcion C"
* **required** (boolean): Define si es obligatorio llenar el campo por parte del firmante. Default true.
* **order** (integer): Orden en que se muestra el campo en el formulario.&#x20;

### Solicitud

```javascript
{
    "template_id":"780c299e-8f2b-421a-941e-d130577f4968",
    "custom_intro": "Bienvenido. Por favor diligencia toda la informacion",
    "youtube_video_code": "",
    "inputs": [
        {
            "variable": "{{nombre completo}}",
            "input_type": "signer_fullname",
            "label": "Nombre completo",
            "help_text": "Pepito Perez",
            "options": "",
            "required": true,
            "order": 1
        },
        {
            "variable": "{{email firmante}}",
            "input_type": "email",
            "label": "Correo electrónico",
            "help_text": "email@email.com",
            "options": "",
            "required": true,
            "order": 2
        },
        {
            "variable": "{{fecha de nacimiento}}",
            "input_type": "date",
            "label": "Fecha de nacimiento",
            "help_text": "",
            "options": "",
            "required": false,
            "order": 3
        },
        {
            "variable": "{{cuidad de residencia}}",
            "input_type": "radio",
            "label": "Ciudad de residencia",
            "help_text": "Selecciona una opción",
            "options": "Bogota;Medellin;Cali",
            "required": true,
            "order": 4
        }
    ]
}
```

### Respuesta

```json
{
    "token": "780c299e-8f2b-421a-941e-d130577f4968",
    "template_type": "docx",
    "name": "Nombre de la plantilla",
    "active": true,
    "template_file": "https://zapsign.s3.amazonaws.com/dev/2025/1/api/e99a404a-15cd-482d-a4ac-79391ff46de1.docx?AWSAccessKeyId=AKIASUFZJ7JCTI2ZRGWX&Signature=YpD8LWxhK74T3EnHzRPCh1lavQI%3D&Expires=1738257648",
    "created_at": "2025-01-30T16:16:06.456597Z",
    "last_update_at": "2025-01-30T16:20:48.351407Z",
    "redirect_link": "",
    "folder_path": "/",
    "lang": "es",
    "signers": [
        {
            "name": "Firmante 1",
            "auth_mode": "assinaturaTela",
            "email": "",
            "phone_country": "57",
            "phone_number": "",
            "lock_name": true,
            "lock_phone": false,
            "lock_email": false,
            "hide_phone": false,
            "blank_phone": true,
            "hide_email": false,
            "blank_email": false,
            "require_selfie_photo": true,
            "require_document_photo": false,
            "selfie_validation_type": "none",
            "qualification": "Representante Legal"
        }
    ],
    "inputs": [
        {
            "variable": "{{nombre completo}}",
            "input_type": "signer_fullname",
            "label": "Nombre completo",
            "help_text": "Pepito Perez",
            "options": "",
            "required": true,
            "order": 1
        },
        {
            "variable": "{{email firmante}}",
            "input_type": "email",
            "label": "Correo electrónico",
            "help_text": "email@email.com",
            "options": "",
            "required": true,
            "order": 2
        },
        {
            "variable": "{{celular firmante}}",
            "input_type": "input",
            "label": "celular firmante",
            "help_text": "",
            "options": "",
            "required": true,
            "order": 3
        },
        {
            "variable": "{{fecha de nacimiento}}",
            "input_type": "date",
            "label": "Fecha de nacimiento",
            "help_text": "",
            "options": "",
            "required": false,
            "order": 3
        },
        {
            "variable": "{{cuidad de residencia}}",
            "input_type": "radio",
            "label": "Ciudad de residencia",
            "help_text": "Selecciona una opción",
            "options": "Bogota;Medellin;Cali",
            "required": true,
            "order": 4
        },
        {
            "variable": "{{fecha firma}}",
            "input_type": "input",
            "label": "fecha firma",
            "help_text": "",
            "options": "",
            "required": true,
            "order": 8
        }
    ],
    "extra_templates": [],
    "notify_extra_emails": "email@email.com",
    "custom_intro": "Bienvenido. Por favor diligencia toda la informacion",
    "youtube_video_code": ""
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zapsign.com.br/espanol/plantillas/create-template-docx/update-form.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
