1. Home
  2. Extra
  3. Samba API
  4. Upload HTML template

Upload HTML template


This post is also available in: Czech

This API allows you to import HTML templates created outside the environment of Samba directly into the template store in your Samba account.

Endpoint URL

Depending on your account, select the appropriate endpoint URL.

  • If you are logging in at app.samba.ai –> choose the URL api.samba.ai
  • If you are logging in at enterprise.samba.ai –> choose the URL api.yottly.com

Your account ID can be found in the Settings section as part of your unique tracking script.

header: 'X-Api-Key: your-api-key'
body: {name: "template-name", kind: "kind", recommender: "recommender", template-body: "html-file"}

  • samba-id – Samba ID of your eshop
  • your-api-key – Samba API key for your eshop (Please ask us for the API key via email)
  • template-name – the name of the template in Samba. Existing template will be overwritten.
  • html-file – a valid *.html file
  • kindrecommender – one of the following combination according to the type of your email template (see details here)


Template type kind recommender
Static standard staticRecommender
Personalised standard productsRecommenderNoCategories
Abandoned Cart Trigger cart cart
Shopping Intention Trigger zsv zsv
Right Before Consumption Trigger fmcg fmcg


 status: success | failure,
 message: string, //optional
 details: [ { line: int, column: int, message: string } ] //optional


jq -c -s -R '{name: "TEMPLATE_NAME", kind: "standard",
recommender: "staticRecommender", "template-body": .}' < TEMPLATE.html | \
curl -H 'X-Api-Key: YOUR_API_KEY' -d @-


This post is also available in: Czech

Updated on April 11, 2023

Was this article helpful?

Related Articles