Skip to main content

Hi Klaviyo Team,

I’ve come across what appears to be an inconsistency in the API documentation for the /api/segments 

endpoint (revision: 2025-04-15).

In the documentation, there's an example that includes:

https://a.klaviyo.com/api/segments?fieldslflow]=name,status,archived&fieldslsegment]=definition,name

However, this request results in the following error:

'flow' is not an allowed field family for this resource. Allowed field families are segment, profile, tag, flow-trigger.

From what I understand, the /segments endpoint does not support include=flow, and thus fieldslflow]=... should not be applicable. The only valid include values for this endpoint appear to be tags and flow-triggers, which aligns with the error 

If i use this below it works.
https://a.klaviyo.com/api/segments?fieldseflow-triggers]=name,status,archived&fieldsesegment]=definition,name

If this is indeed an error in the docs, I wanted to flag it for correction — it can cause confusion when implementing based on that example. Thanks for all the work you do to keep the docs and API ecosystem solid!

Thanks,
Mayank 

Hi ​@WeatherMs,

Thanks for bringing this to our attention. I checked in with our APIs team, and can confirm that this is an issue that we’re working to fix! The doc is correct, so we’re actually working on fixing the API itself, so it’s functionality can reflect the doc. Again, thanks for flagging this, and we’ll work to get the API working according to the doc!

-Byrne


Reply