All the code of every email template should be stored within your DB. 

When your customer decides to modify any of the email templates, he clicks on it and you pass to the editor the HTML and CSS of that clicked template. If an auto-saving feature is activated and configured, then all changes made in the email will trigger the request to our end with micro patches (those particular changes) in order to save them in our DB. 

As soon as they are saved, our server will send the request to specified by your end-point with the full changed HTML and CSS in order to replace the old version with a new one in your DB. 

If this feature is not activated, then a user has to click on the "Save" button manually within your app and you should call the getTemplate function to take out modified HTML and CSS from the editor in order to save in within your DB.

Enable this feature to receive a fresh version of HTML and CSS code at your back-end every time a change has been done to the code by a user.

*Please notice that it available only for paid packages.

Additionally, you need to implement this back-end endpoint. Please find the configuration below:

{
    "POST": "/",
    "Host": "YOUR_BACKEND_AUTO_SAVE_URL",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Body": {
        "key": "plId_YOUR_PLUGIN_ID_emailId_YOUR_EMAIL_ID_FROM_UI_REQUEST_PARAMS",
        "emailId": "YOUR_EMAIL_ID_FROM_UI_REQUEST_PARAMS",
        "html": "YOUR_HTML_CODE",
        "css": "YOUR_CSS_CODE",
        "width": "EMAIL_WIDTH",
        "height": "EMAIL_HEIGHT"
    },
    "Response status": "200 OK"
}

The Basic Authentication is used to send these requests, so please be sure that you have specified correct Login, Password and API URL on the Stripo Plugin Integration menu of your Stripo account (if you don’t have an account, sign up).

Did this answer your question?