> ## Documentation Index
> Fetch the complete documentation index at: https://sendforsign.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update template

> Update the name or text of an existing contract template via the Sendforsign API.

### Body parameters

**data** `object` *required*

**child attribute**

**action** `string` *required*

Action type.

**clientKey** `string` *required*

Key of the client.

**template** `object` *required*

Structure, use the fields that should be updated.

**child attribute**

**templateKey** `string` *required*

ID of the template.

**name** `string`

Name of the template.

**value** `string`

Content of the template, use HTML.

### Response

**template** `string`

Template structure.

**child attribute**

**createTime** `string`

Create time.

**changeTime** `string`

Change time.

**templateKey** `string`

ID of the template.

**code** `string`

The code of the answer.

**message** `string`

The message of the answer.

```bash cURL theme={null}
curl -X POST 'https://api.sendforsign.com/api/template' \
     -H 'X-Sendforsign-Key: YOUR_API_KEY' \
     -H 'Content-Type: application/json' \
     -d '{ 
		  "data": {
				   "action": "update",
				   "clientKey": "YOUR_CLIENT_KEY",
				   "template": {
							  "templateKey": "TEMPLATE_KEY", 
							  "name": "New template",
							  "value": "<p>Template text</p>"
						     }
				  }
       }'
```

```json Response theme={null}
	{
       "template": {
                "createTime": "2023-12-01 12:18:55",
                "changeTime": "2023-12-01 12:18:55",
                "templateKey": "TEMPLATE_KEY", 
		},
       "code": "201",
       "message": "Template updated"
    } 
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.