Skip to main content

Build a theme

Start creating a new theme, we'll walk you through how to quickly set up your theme using the Cryptr API

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

The fallback content to display on prerendering
. Make sure you have already configured this elements below:

  • 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.

Cryptr default template

caution

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

The fallback content to display on prerendering

Liquid template

To set your theme, you need to use the

The fallback content to display on prerendering
. You must then transmit your liquid templates using the appropriate
The fallback content to display on prerendering
. You can also transmit translation templates to localize your login screens.

Create a template

To create a liquid template, you need to use the following

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
. You must then transmit your mjml templates using the appropriate
The fallback content to display on prerendering
.

note

If you want to localize your emails, you will have to create an mjml per language then configure them each with the

The fallback content to display on prerendering

Create a mjml template

To create an email, you need to use the following

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
:

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

The fallback content to display on prerendering
:

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