We’re trying to use Keap REST API endpoint to send an email based on a template, this endpoint requires amongst other things, the template_id. We’ve created a template in Marketing → Templates where I can see the template ID, however, when we try to call the endpoint we get a 500 error, after reading some discussions, it seems this new endpoint will only work with the ‘new’ templates, and the Marketing → templates are now considered Legacy?
In any case we’ve created a new template through the “Email & Broadcasts” tab, however, I can’t seem to find the template ID of the new template I’ve created anywhere. Where can I get it?
Hi Pav, thank you for your reply, unfortunately, I can’t find anything similar in the browser inspector, and to make things more confusing I’ve got the following reply from Keap support:
We understand you’re looking to retrieve the template ID for email templates created in the “Email & Broadcast” builder, and plan to use the REST V2 endpoints such as:
At this time, these endpoints only support templates created in the legacy Email Builder found under the Marketing > Templates section. Unfortunately, there is currently no REST V2 endpoint available for templates built in the newer “Email & Broadcast” builder."
I am kind of at a loss here, because when I use an ID of a legacy template, I get a 500 without any explanation:
@Crafted_Dev , I have taken a look further into this to see if it is possible.
The solution I suggested only works for Emails created in the Automation Builder. I thought the same logic would apply to the Broadcast as it had the same layout, but that was not the case.
Looking deeper into the Broadcast section, I was able to retrieve the Email Template, but getting the ID number for the Template is difficult. I created a Test Broadcast, created the Content, and run the API call by backtracking the ID numbers. It pulled out the Template, but finding that ID in the Code was problematic and not-consistent.
I found a “emailTemplate” - “id” entry when searching for the ID. But when reloading the page and trying to find it again, it failed to be found.
To simply put, the Email Template is retrievable, but you will have to go through the ID numbers to find it, which is not ideal.
I also did a test in retrieving the Legacy Email Templates, and the REST v2 API function does work for them. Not tried out the sending part, so if there is an issue just explain to Keap Support in detail what you are experiencing.