Creates a new template that can be used to generate documents and envelopes. Templates allow you to define predefined structures and fields, which can be reused across multiple documents, saving time and ensuring consistency in document creation. Once created, the template can be accessed and used to quickly generate new documents with the same configuration.
Request
Authorization
Add parameter in header
x-api-token
Example:
x-api-token: ********************
Body Params application/json
Example
{"vaultId":"0958abae-b037-4e2f-a6b1-d99944f06a91","name":"Contract Template","description":"A template description for contracts between parties.","payload":"{ \"key\": \"value\" }","fields":[{"name":"First Name","alias":"first_name","description":"The first name of the individual.","isRequired":true,"type":"Text","customRegex":null},{"name":"Age","alias":"age","description":"The age of the individual.","isRequired":false,"type":"Number","customRegex":null},{"name":"Score","alias":"score","description":"Score number.","isRequired":false,"type":"Custom","customRegex":"^[0-9]+$"}]}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.signater.com/v1/ecm/templates' \
--header'Content-Type: application/json' \
--header'x-api-token;' \
--data-raw'{
"vaultId": "0958abae-b037-4e2f-a6b1-d99944f06a91",
"name": "Contract Template",
"description": "A template description for contracts between parties.",
"payload": "{ \"key\": \"value\" }",
"fields": [
{
"name": "First Name",
"alias": "first_name",
"description": "The first name of the individual.",
"isRequired": true,
"type": "Text",
"customRegex": null
},
{
"name": "Age",
"alias": "age",
"description": "The age of the individual.",
"isRequired": false,
"type": "Number",
"customRegex": null
},
{
"name": "Score",
"alias": "score",
"description": "Score number.",
"isRequired": false,
"type": "Custom",
"customRegex": "^[0-9]+$"
}
]
}'