Solved

Sending transactional emails through API, or through a flow API?


Badge +4

Hi Klaviyo Community!

 

Very excited to be a part of the Klaviyo community, and it’s amazing to see how much progress has been made on the API in the past few months. I’m looking to send (effectively transactional) emails via Klaviyo through API, without requiring the merchant to set up a flow in their Klaviyo account. Part of the current workflow for my Klaviyo integration presently requires merchants manually set up flows using a custom metrics trigger flow - which can take each merchant quite a bit of time, and these flows contain a single email + are identical across merchants. This has resulted in long set up times with my app. I’d like to send emails without the need of a metric (similar to how sendgrid’s API work). My issue could be solved this in one of two ways:

 

  1. Through the POST `https://a.klaviyo.com/api/v1/email-template/{template_id}/render` endpoint, which would render a template programmatically. This endpoint allows me to manually send an email without using a flow, and that email can be loaded into Klaviyo via another endpoint. However, it looks like this endpoint is being deprecated, and requires approval per merchant. Are there plans to revitalize this endpoint in Klaviyo’s V3? 

 

This API is intended to test templates only, and is rate limited to the following thresholds: 100/hour, 1,000/day.”

 

  1. If flows could be programmatically created, I could programmatically generate a draft-state flow which contains a metric trigger and a single email. I imagine this level of functionality could be useful, as I’m aware of other third party apps (Rush) with laborious set up processes (oftentimes requiring Klaviyo staff to manually copy and paste flows across merchants). The endpoint here I imagine could be quite complex, as Klaviyo flows themselves have a lot of moving parts. Are there any plans to add something like this for API V3? That is, something like a POST /flow endpoint?

 

Thanks!

icon

Best answer by David To 31 May 2022, 21:48

View original

3 replies

Userlevel 7
Badge +44

Hi @Steven Petteruti, that would be an awesome way to do so indeed. One thing that's still required is that for transactional emails you still need to contact support to switch them to transactional type. Not a direct answer to your question but something to be aware of. 

How to send transactional emails through Klaviyo

Userlevel 7
Badge +60

Hey @Steven Petteruti,

If you’re amazed with our API now, it’s only going to get better from here! 

You’re absolutely right that at present, both our Render Template and Render and Send Template endpoints are depreciated. Though, I will note that our product team is actively working on adding support and revitalizing the Render Template endpoint for our new template editor. 

The Render and Send Template endpoint on the other hand is still being evaluated by our Product Team. If you haven’t already, I would suggest signing up to our Developer Newsletter. When our team has any news or updates related to these endpoints and other aspects of our API, you can receive a routine update directly from our Product Teams. You can sign up as part of this newsletter either from the flyout form or the embedded form at bottom of our Developer Portal or from our Subscribe Page here

I’ll also go ahead and share your feedback with our Product Team regarding an API endpoint to create a flow. I think this could be really helpful, especially for our partner and agencies who may end up building several known, in-house flows they recommend. I would also have to agree with you that there may be some limitations due to the complexity and various options available when dealing with flows. 

Thanks for being a part of our Klaviyo Community!

David

Badge +4

Awesome David, thanks so much! Having a Flows API to build out metric based flows would be a total game changer and take our sign up process from hours (requiring merchant permissions to their Klaviyo account) to instantaneous. Please pass my feedback to the product team - I’m aware other SaaS tools that would benefit from this endpoint as well.

Will sign up for that developer newsletters, and very happy to be a part of the Klaviyo Community. Excited to see what’s in store. 

Have a good one.

Steven

Reply