Skip to main content
Contributor II
September 24, 2026
Question

Create Flow API returning repeated 502/504 errors since 23 September; other endpoints work

  • September 24, 2026
  • 6 replies
  • 46 views

Since at least 23 September 2026, our POST /api/flows requests have returned Cloudflare origin errors. The first five attempts used API revision 2026-04-15. I changed to 2026-07-15 and received another 504.

 

Time (UTC) Revision Status Cloudflare Ray ID
23 Sep 18:56:49 2026-04-15 504 a3fbc3469e3386fa
23 Sep 19:05:08 2026-04-15 504 a3fbcf71dbd4f77f
23 Sep 19:20:07 2026-04-15 502 a3fbe5694cf4f77f
23 Sep 20:56:15 2026-04-15 504 a3fc723749cc86fa
24 Sep 07:14:33 2026-04-15 502 a3fffbf18a6d2b0f
24 Sep 08:59:37 2026-07-15 504 a40095d9cf5986fa

 

Other endpoints appear to work normally. GET flows succeeds, and we checked the Flow list after the create attempts. The Flow we tried to create is not there; these attempts have not produced a Flow visible in our account.

Is anyone experiencing the same issue? Is there something we can do on our side to fix this?

6 replies

KeviSunshine
Expert Problem Solver III
Expert Problem Solver III
September 24, 2026

Hi Roman,

Would you mind sharing your request body (with any keys/PII/etc. redacted)? I’ve never used this endpoint before, I will give it a shot on my side and see what it returns.

Let me know.

 

Kevin.

Kim from Cadence
Partner
Partner
September 24, 2026

​@roman loiale, I quickly checked on my end and am getting 201s (using 2026-04-15), so I’m not experiencing the same problem on my end.  

It’s possible there’s something large or complicated about your flow that’s leading to the timeout. In any case it’d be good to get someone from the Klaviyo team to take a look, cc ​@GabbyEsposito 


Cadence / Book a demo

Kim — Founder @ Cadence | Helping brands automate recurring campaigns (daily, weekly, monthly) | Happy to connect! | https://cadencecampaigns.com
Contributor II
September 25, 2026

Here’s the request body, redacted. It is a clone of a flow we already have live, with some minor changes. It is not a simple flow, but it is not our most complex one either. More importantly, it is almost exactly the same as a flow that’s already live.

https://gist.github.com/roman-loiale/4a365134f4e34688cf9c1ca954729446

KeviSunshine
Expert Problem Solver III
Expert Problem Solver III
September 25, 2026

Oh boy, that’s a big flow 😁

My assumption is that Klaviyo is timing out when trying to create the flow so it’s unable to return a response in time before Cloudflare’s logic kicks in and “closes the socket” (because the HTTP call was open for too long).

What happens if you try to create the first 25%, 50%, 75% of your flow? Are smaller flows timing out too? Are you able to test and determine a relationship between the size of the payload/flow and the 502/504s?

 

All the best,

Kevin.

Contributor II
September 25, 2026

I created a 75% and a 50% size versions, measured as numbers of actions. For the 75% version, I got 504. For the 50% one, I got 201. Surprisingly enough, although I got the 504, the 75% version was created too. I checked it with the `GET /flows` endpoint. This is not the case for the 100% version (the real one). After many attempts, I have still not managed to create it.

Community Manager
September 25, 2026

Hi Roman, 

Meghan F. here from the Klaviyo Community team! This looks like a question our Support team would be able to look at in further detail. I am going to send a DM here to gather more details from you and open a ticket with the team accordingly!