Create Template

POST {{baseUrl}}/api/templates/

Create a new custom HTML template.

If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API.

Request specific fields using sparse fieldsets.

Rate limits:
Burst: 10/s
Steady: 150/m

Scopes: templates:write

Request Body

{"data"=>{"type"=>"template", "attributes"=>{"name"=>"<string>", "editor_type"=>"<string>", "html"=>"<string>", "text"=>"<string>"}}}

HEADERS

KeyDatatypeRequiredDescription
revisionstring(Required) API endpoint revision (format: YYYY-MM-DD[.suffix])
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;data&quot;:{&quot;type&quot;:&quot;template&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;attributes&quot;:{&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;editor_type&quot;:&quot;\u003cstring\u003e&quot;,&quot;html&quot;:&quot;\u003cstring\u003e&quot;,&quot;text&quot;:&quot;\u003cstring\u003e&quot;,&quot;created&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;updated&quot;:&quot;\u003cdateTime\u003e&quot;},&quot;links&quot;:{&quot;self&quot;:&quot;\u003curi\u003e&quot;}}}