Create Template
POSThttps://a.klaviyo.com/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.
- Revision header
revision: 2023-01-24required- Scopes
Templates Write- Rate limits
- Burst:
10/sSteady:150/m
Headers
API endpoint revision (format: YYYY-MM-DD[.suffix])
2023-01-24
Request body
Content type: application/jsonrequired
Show 2 fields
Responses
201
Content type: application/json
Show 4 fields
The ID of template
Show 7 fields
The ID of the company the template belongs to
The name of the template
editor_typehas a fixed set of values:- SYSTEM_DRAGGABLE: indicates a drag-and-drop editor template
- SIMPLE: A rich text editor template
- CODE: A custom HTML template
- USER_DRAGGABLE: A hybrid template, using custom HTML in the drag-and-drop editor
The rendered HTML of the template
The template plain_text
The date the template was created in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
The date the template was updated in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
Show 1 field
4XXClient Error
Content type: application/json
5XXServer Error
Content type: application/json