Build a theme
What you’ll learn
After completing this guide, you will know how to perform the following queries:
- Create a template
- Retrieve a template
- Update a template
Requirements
To define a model, you must use the Cryptr
- An account The fallback content to display on prerendering
- An The fallback content to display on prerendering
- Managed organizations
- An authentication method
- Authorized email The fallback content to display on prerendering
Default theme
Cryptr starter theme is the reference theme for your design, it is designed to be minimalist and **simple to customize. You can use it as a base to work on your own html and css design.
If you create a theme using the default theme as a starting point. We recommend that you submit a slightly different version that matches your brand's visual identity in order to have added value in your login
Liquid template
To set your theme, you need to use the
Create a template
To create a liquid template, you need to use the following
- cURL
curl --location -g --request POST \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/templates/{screen_name}" \
-d '<div><style>/* CSS style*/</style><div>{{cryptr:widget}}</div></div>' \
Retrieve a template
To retrieve a liquid template, you need to use the following
- cURL
curl --location -g \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/templates/{screen_name}" \
-d '<div><style>/* CSS style*/</style><div>{{cryptr:widget}}</div></div>' \
Update a template
If you want to update the code of an existing template. You must submit the complete code (with the changes) using the following
- cURL
curl --location -g --request PUT \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/templates/{screen_name}" \
-d '<div><style>/* CSS style*/</style><div>{{cryptr:widget}}</div></div>' \
Create a translation
To create a translation, you need to use the following
- cURL
curl --location -g --request POST \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/translation/{screen_name}" \
-d '<div><style>/* CSS style*/</style><div>{{cryptr:widget}}</div></div>' \
Retrieve a translation
To retrieve a translation, you need to use the following
- cURL
curl --location -g \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/translation/{screen_name} \
-d '<div><style>/* CSS style*/</style><div>{{cryptr:widget}}</div></div>' \
Update a translation
If you want to update the code of an existing translation. You must submit the complete code (with the changes) using the following
- cURL
curl --location -g --request PUT \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/translation/{screen_name}" \
-d '<div><style>/* CSS style*/</style><div>{{cryptr:widget}}</div></div>' \
Email template
To set your emails, you need to use the
If you want to localize your emails, you will have to create an mjml per language then configure them each with the
Create a mjml template
To create an email, you need to use the following
- cURL
curl --location -g --request POST \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/emails/{email_name}" \
-d '<mjml><mj-head><mj-body><mj-section><!-- Content --></mj-section></mj-body></mj-head></mjml>' \
Retrieve a mjml template
To retrieve an email, you need to use the following
- cURL
curl --location -g \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/emails/{email_name}" \
-d '<mjml><mj-head><mj-body><mj-section><!-- Content --></mj-section></mj-body></mj-head></mjml>' \
Update a mjml template
If you want to update the code of an existing email. You must submit the complete code (with the changes) using the following
- cURL
curl --location -g --request PUT \
"{{cryptr_service_url}}/api/v2/org/{org_domain}/emails/{email_name}" \
-d '<mjml><mj-head><mj-body><mj-section><!-- Content --></mj-section></mj-body></mj-head></mjml>' \
Next steps
- Learn more about theme architecture
- Explore our guide to customize a theme and creating a great experience with our design tips
- See our guides on liquid and mjml, and find all the variables available to customize your theme