I don’t see any way of dereferencing the list (or segment) on which a flow is triggered, via any of the flow api calls (or list api calls). It does appear in the internal klaviyo API but I assume that is not for customers to use.
I haven’t seen it in any of the flow-action calls nested in here either.
https://a.klaviyo.com/api/flows/abc123/
{
"data": {
"type": "flow",
"id": "abc123",
"attributes": {
"name": "Test flow name",
"status": "live",
"archived": false,
"created": "2024-01-05T15:41:40+00:00",
"updated": "2024-01-05T15:41:47+00:00",
"trigger_type": "Added to List"
},
"relationships": {
"flow-actions": {
"links": {
"self": "https://a.klaviyo.com/api/flows/abc123/relationships/flow-actions/",
"related": "https://a.klaviyo.com/api/flows/abc123/flow-actions/"
}
},
"tags": {
"links": {
"self": "https://a.klaviyo.com/api/flows/abc123/relationships/tags/",
"related": "https://a.klaviyo.com/api/flows/abc123/tags/"
}
}
},
"links": {
"self": "https://a.klaviyo.com/api/flows/abc123/"
}
}
}
Observing the ajax call to get the flow data from the flow builder, I see the flow.trigger_id contains the list ID that the flow is configured to trigger (on subscribe). It is also in the trigger_group.id field
https://www.klaviyo.com/ajax/flow/abc123?beta=true
{
"data": {
"flow": {
"id": "abc123",
"company_id": "MycmpnY",
"name": "Test flow name",
"folder_id": null,
"trigger_type": 1,
"trigger_id": "321cba",
"trigger_filter": null,
"customer_filter": null,
"start_path": 33536647,
"created": "2024-01-05T15:41:40Z",
"updated": "2024-01-05T15:41:47Z",
"deleted": null,
"archived": false,
"status": 2,
"is_ignoring_holdout_group": false,
"is_relative_timing": true,
"ajax_actions_statistics_url": "/ajax/flow/abc123/actions/statistics",
"ajax_trigger_filters_url": "/ajax/flow/abc123/trigger-filters",
"ajax_customer_filters_url": "/ajax/flow/abc123/customer-filters",
"ajax_details_url": "/ajax/flow/abc123/details",
"transactional": {
"is_eligible_for_transactional_email": false,
"is_eligible_for_transactional_sms": false
},
"trigger_group": {
"id": "321cba",
"company_id": "MycmpnY",
"name": "Test flow name",
"type": 0,
"subtype": 0,
"email_engagement_score": null,
"definition": null,
"deleted": null,
"deactivated_at": null,
"search_task_id": null,
"has_found_members": false,
"members_last_updated": null,
"segment_task_id": null,
"is_flagged": false,
"sort_order": 0,
"is_double_optin": false,
"is_autoupdating": true,
"is_tracking_stats": false,
"is_global_unsubscribe": false,
"is_cutover_to_sip": false,
"last_used": "2024-01-04T17:09:42Z",
"is_external_trigger": false,
"allow_flow_triggers": true,
"contact_name": null,
"contact_email": null,
"folder_id": null,
"recipe_id": null,
"is_email_profiles": false,
"is_email_autoresponder": false,
"found_percent_complete": null,
"start_date": null,
"language": "",
"created": "2024-01-04T17:09:34Z",
"updated": "2024-01-04T17:09:42Z",
"url": "/list/321cba"
},
"extra":"..."
}
}
}
Is there anywhere on the customer-facing APis where this relationship can be found?
I tried some undocumented approaches like: adding ?fields[flow]=trigger_id and ?include=trigger_group but seems that this api is fairly limited.