Template id from email id

How do we get template id using the email-APIs?

Hi @MPALOD! Welcome to the Community-- happy to have you here :blush:

I understand you are trying to retrieve template IDs from the email ID using an API. To clarify, are you looking for the template IDs of Marketing emails sent? For example, you have the internal ID of a published Marketing email and then you are trying to find the ID of the template. OR are you referring to Sales email templates?

This context will help us define if there is a way to use HubSpot’s API to get that information!

Best,
Kennedy

This is for Marketing emails. Yes , it is this case: have the internal ID of a published Marketing email and then trying to find the ID of the template.
Context: We need to get the email html for our use-case. Get template API return html in source field. Hence, we have the email id and want to fetch corresponding template for this.

Hi @MPALOD

As of now, you can’t get a template ID of the email using the email ID but there is a workaround solution. you can get all templates and then You can filter by name or category if needed.

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!