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