# Update template

By using this endpoint with the model token, you can update data such as the model's name and language. It is also possible to toggle its state between enabled and disabled. Redefine the emails of contacts who will be notified about the model. And finally, edit configuration fields for the first signer defined in the model.

## Update template

<mark style="color:green;">`PUT`</mark>`https://api.zapsign.com.br/api/v1/templates/{{template_token}}/`

{% hint style="success" %}
In the above endpoint, replace `{{template_token}}` with the unique token of the model you want to update.
{% endhint %}

## Headers

<table><thead><tr><th width="200">Name</th><th width="90">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td><p>apiToken ahead of the "Bearer" text. </p><p>Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23</p></td></tr></tbody></table>

## Request Body

<table><thead><tr><th width="124">Name</th><th width="158">Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>string</td><td>Title of the document. String of up to 255 characters</td></tr><tr><td>lang </td><td>string</td><td>Document language. Possible values: "pt-br" (Portuguese), "es" (Spanish), "en" (English), "fr" (French). Default: "pt-br"</td></tr><tr><td>observers </td><td>array&#x3C;string></td><td>Represents document observers (limit 20), i.e. email addresses that will be notified upon completion of the signature flow. It's an array of strings.</td></tr><tr><td>first_signer</td><td>Object</td><td>Document signer configuration</td></tr><tr><td>folder_token</td><td>string</td><td>If provided, this field will take precedence over folder_path. It defines the directory based on the folder token, which can be obtained by accessing:<br>https://zapsign.com.br/conta/modelos?pasta=&#x3C;folder_token><br>If you don’t know the token yet, navigate to the desired folder starting from:<br>https://zapsign.com.br/conta/modelos<br>Then, copy the pasta parameter from the URL after opening the target folder.</td></tr><tr><td>folder_path</td><td>string</td><td>Path of the folder inside ZapSign where the template will be placed. If the folders do not exist, they will be created automatically.<br>Requirements:<br>folder_path can be up to 255 characters long<br>Each folder can be up to 50 characters long<br>There is a limit of 5 folder levels<br>Example: /api/ or /folder1/folder2/folder3/<br>Default value: / (no folder)</td></tr><tr><td>redirect_link</td><td>string</td><td>Allows you to configure a button displayed at the end of the signing process to redirect the signer to a specific URL, such as a thank-you page or any other page on your website.<br>Example: <a href="https://zapsign.com.br/">https://zapsign.com.br/</a></td></tr></tbody></table>

{% hint style="danger" %}
The parameter **url\_docx** or **base64\_docx** cannot be changed. If you need to modify the document of the model, a new model will need to be created.
{% endhint %}

### **Configuring the Signer**

These fields allow you to adjust the signing experience, such as the authentication method.

{% hint style="warning" %}
To learn more about the signer configuration fields, visit the model [creation page](https://docs.zapsign.com.br/english/templates/create-template-docx).
{% endhint %}

### Request

```javascript
{
    "name": "Template name",
    "lang": "en",
    "observers": [
        "email@email.com"
    ],
    "first_signer": {
        "blank_email": false,
        "blank_phone": false,
        "auth_mode": "assinaturaTela",
        "require_selfie_photo": false,
        "require_document_photo": false,
        "selfie_validation_type": "",
        "qualification": "Signer"
    }
}
```

### Response

{% tabs %}
{% tab title="200: OK - Model updated successfully " %}

```javascript
{
	"token": "152f8416-xxxx-xxxx-xxxx-1aaf785dd335",
	"template_type": "docx",
	"name": "Template name",
	"active": true,
	"template_file": "https://zapsign.s3.amazonaws.com/2022/1/docs/xxxxx-d66b-495f-9b51-xxxx.docx",
	"created_at": "2022-01-05T12:59:42.563218Z",
	"last_update_at": "2022-01-05T13:03:22.242003Z",
	"redirect_link": "",
	"folder_path": "",
	"lang": "en"
	"signers": [
		{
			"name": "{{FULLNAME}}",
			"auth_mode": "assinaturaTela",
			"email": "",
			"phone_country": "",
			"phone_number": "",
			"lock_name": true,
			"lock_phone": false,
			"lock_email": false,
			"hide_phone": false,
			"blank_phone": false,
			"hide_email": false,
			"blank_email": false,
			"require_selfie_photo": false,
			"require_document_photo": false,
			"selfie_validation_type": "none",
			"qualification": "Signer"
		}
	],
	"inputs": [
		{
			"variable": "{{FULLNAME}}",
			"input_type": "input",
			"label": "What is your fullname?",
			"help_text": "",
			"options": "",
			"required": false,
			"order": 1
		},
		{
			"variable": "{{CNPJ}}",
			"input_type": "input",
			"label": "CNPJ",
			"help_text": "",
			"options": "",
			"required": false,
			"order": 2
		},
		{
			"variable": "{{CPF}}",
			"input_type": "input",
			"label": "CPF",
			"help_text": "",
			"options": "",
			"required": false,
			"order": 3
		}
	],
    "extra_templates": [],
    "notify_extra_emails": "email@email.com",
    "custom_intro": "",
    "youtube_video_code": ""
}
```

{% endtab %}
{% endtabs %}

### Request

{% embed url="<https://www.postman.com/zapsign/workspace/zapsign-workspace/request/27495556-306f37a8-a815-4209-ae2c-fc1d1757b02b?ctx=documentation>" %}
