Configure Template Form

When creating a document from a template without pre-filling all dynamic fields, the signer will need to complete the required information to generate and sign the document. This endpoint configures the form to enhance the signer’s experience and minimize errors.

Configure Form

POST https://api.zapsign.com.br/api/v1/templates/update-form

Headers

Name
Type
Description

Authorization*

string

apiToken ahead of the "Bearer" text.

Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23

Request Body

custom_intro

string

Message with instructions for the signer (displayed at the beginning of the form). Default: ""

youtube_video_code

string

Adds a YouTube video at the start of the form. If the video URL is https://www.youtube.com/watch?v=Fi0qJgEjYAw, the code is Fi0qJgEjYAw. Default: ""

inputs [variable]

array <input>

Configuration of dynamic fields.

Dynamic Field Configuration (inputs)

Configures the form fields to assist the signer and prevent errors.

  • variable (string, required): The name of the dynamic field inside the DOCX file. Example: {{name}}.

  • input_type (string, optional): Field type to validate the format. Default: "input".

input type
Description

input

Short text.

email

Email address.

signer_fullname

Full name

radio

Multiple-choice option (requires "options" parameter).

checklist

Checkbox (requires "options" parameter).

date

Date in dd/mm/yyyy format.

ext-date

Written signature date (automatically filled with the document's signing date).

date-signature

Signature date in dd/mm/yyyy format (automatically filled with the document's signing date).

  • label (string, optional): Field title in the form. Example: Full Name. Default: Same as variable, without brackets {{}}.

  • help_text (string, optional): Help text displayed below the field title. Example: Maria Perez. Default: "".

  • options (string, optional): Options for multiple-choice (radio) or checkbox (checklist) fields. Example: "Option A; Option B; Option C".

  • required (boolean, optional): Defines whether the field is mandatory. Default: true.

  • order (integer, optional): Order in which the field appears in the form.

Request

{
    "template_id":"780c299e-8f2b-421a-941e-d130577f4968",
    "custom_intro": "Fill in the information",
    "youtube_video_code": "",
    "inputs": [
        {
            "variable": "{{full name}}",
            "input_type": "signer_fullname",
            "label": "First and last name",
            "help_text": "John DOe",
            "options": "",
            "required": true,
            "order": 1
        },
        {
            "variable": "{{email}}",
            "input_type": "email",
            "label": "Email",
            "help_text": "email@email.com",
            "options": "",
            "required": true,
            "order": 2
        },
        {
            "variable": "{{date}}",
            "input_type": "date",
            "label": "Date",
            "help_text": "",
            "options": "",
            "required": false,
            "order": 3
        },
        {
            "variable": "{{city}}",
            "input_type": "radio",
            "label": "City",
            "help_text": "Select an option",
            "options": "Bogota;Medellin;Cali",
            "required": true,
            "order": 4
        }
    ]
}

Response

{
    "token": "780c299e-8f2b-421a-941e-d130577f4968",
    "template_type": "docx",
    "name": "Template name",
    "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": "en",
    "signers": [
        {
            "name": "First signer",
            "auth_mode": "assinaturaTela",
            "email": "",
            "phone_country": "1",
            "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": "Witness"
        }
    ],
    "inputs": [
        {
            "variable": "{{name}}",
            "input_type": "signer_fullname",
            "label": "First and last name",
            "help_text": "John Doe",
            "options": "",
            "required": true,
            "order": 1
        },
        {
            "variable": "{{email}}",
            "input_type": "email",
            "label": "Email",
            "help_text": "email@email.com",
            "options": "",
            "required": true,
            "order": 2
        },
        {
            "variable": "{{Phone}}",
            "input_type": "input",
            "label": "Phone",
            "help_text": "",
            "options": "",
            "required": true,
            "order": 3
        },
        {
            "variable": "{{Date}}",
            "input_type": "date",
            "label": "Date",
            "help_text": "",
            "options": "",
            "required": false,
            "order": 3
        },
        {
            "variable": "{{city}}",
            "input_type": "radio",
            "label": "City",
            "help_text": "Selecciona una opción",
            "options": "Bogota;Medellin;Cali",
            "required": true,
            "order": 4
        },
        {
            "variable": "{{signature date}}",
            "input_type": "input",
            "label": "Date",
            "help_text": "",
            "options": "",
            "required": true,
            "order": 8
        }
    ],
    "extra_templates": [],
    "notify_extra_emails": "email@email.com",
    "custom_intro": "Fill in the information",
    "youtube_video_code": ""
}

Last updated

Was this helpful?