We are needing to duplicate a whole bunch of Email Templates into various languages (11 langs x 15 templates = 165 new templates). I noticed there’s no clone endpoint (like the one on email marketing) for templates in the api. Does anyone have a suggestion so I don’t need to create 165 templates via the UI?
Assuming you want to clone the drag-and-drop email templates, you can utilize the Content API for templates. There is no end point for cloning but you can retrieve template using the GET /content/api/v2/templates/{template-id} endpoint and then create your modified versions by using the POST /content/api/v2/templates.
You can get the id of your drag-and-drop template in the URL when editing that template.
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.
Assuming you want to clone the drag-and-drop email templates, you can utilize the Content API for templates. There is no end point for cloning but you can retrieve template using the GET /content/api/v2/templates/{template-id} endpoint and then create your modified versions by using the POST /content/api/v2/templates.
You can get the id of your drag-and-drop template in the URL when editing that template.
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.
@Teun looks like you posted a reply as I was typing mine 😁 We are saying almost the same thing - I think the only difference from your reply is that you actually may not need to rebuild it as a coded email template. The drag and drop templates technically get saved as coded email templates in the "@hubsopt" folder but they aren't accessible in the design manager. However, you can get them via the API if you know the ID of that template.
✔️ Did this post help answer your query? Help the community by marking it as a solution.
I don't think there is an API for that, but you could rebuild your saved template as a coded email template with drag-and-drop functionality and clone that programmatically through the templates API by making a GET request to the original and simply creating new ones through a POST request using the response of the GET request (might need some small changes).
Learn more about HubSpot by following me on LinkedIn or YouTube
✅ Did my answer solve your issue? Help the community by marking it as the solution.
Thanks for the reply. I specifically looking to clone templates under Library -> Templates. I was aware of the email marketing clone endpoint and it worked great. But now I need to clone the templates and couldn't find an endpoint.