Creates a new template object
POST {{baseUrl}}/templates
Creates a new template given information
Request Body
[{"name"=>"description", "value"=>"Sample Template", "datatype"=>"string"}, {"name"=>"html", "value"=>"<html><body><h1>Hello World</h1></body></html>", "datatype"=>"string"}, {"name"=>"metadata", "value"=>"{\"customer_id\": \"987654\"}", "datatype"=>"string"}, {"name"=>"engine", "value"=>"handlebars", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Idempotency-Key | string | A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our implementation guide. | |
Content-Type | string |
RESPONSES
status: OK
{"id":"tmpl_c94e83ca2cd5121","description":"Test Template","versions":[{"id":"vrsn_362184d96d9b0c9","description":"Test Template","html":"\u003chtml\u003eHTML for {{name}}\u003c/html\u003e","date_created":"2017-11-07T22:56:10.962Z","date_modified":"2017-11-07T22:56:10.962Z","object":"version"}],"published_version":{"id":"vrsn_362184d96d9b0c9","description":"Test Template","html":"\u003chtml\u003eHTML for {{name}}\u003c/html\u003e","date_created":"2017-11-07T22:56:10.962Z","date_modified":"2017-11-07T22:56:10.962Z","object":"version"},"metadata":{},"date_created":"2017-11-07T22:56:10.962Z","date_modified":"2017-11-07T22:56:10.962Z","object":"template"}