Get flows
https://api.lytics.io/v2/flowGet all flows for an account. Each version of each flow is returned unless latest=true.
{
"_meta": {},
"data": [
{
"aid": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"entry_condition": "in_segment",
"entry_segment_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"label": "string",
"modified": "2019-08-24T14:15:22Z",
"reentry_allowed": true,
"reentry_condition": "in_segment",
"reentry_delay": 0,
"root_step_id": 0,
"state": "draft",
"state_modified_at": "2019-08-24T14:15:22Z",
"steps": [
{
"affinity_config_id": "string",
"delay": 0,
"delay_condition": "string",
"delay_until": {
"day_of_week": 0,
"kind": "day_of_week",
"time_of_day": "09:30",
"timezone": "America/New_York"
},
"delay_until_enters": [
"string"
],
"id": 0,
"label": "string",
"next": 0,
"slug": "string",
"split_affinities": [
{
"affinity": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_conditions": [
{
"conditions": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_probabilities": [
{
"next": 0,
"prob": 0
}
],
"type_hint": "work_export",
"work_config": {},
"work_exit_step_ref": 0,
"work_id": "string"
}
],
"version": 0
}
],
"request_id": "string",
"status": 0
}Create or update flow
https://api.lytics.io/v2/flowCreate a new flow or update an existing one. The flow id is taken from the request body.
{
"aid": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"entry_condition": "in_segment",
"entry_segment_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"label": "string",
"modified": "2019-08-24T14:15:22Z",
"reentry_allowed": true,
"reentry_condition": "in_segment",
"reentry_delay": 0,
"root_step_id": 0,
"state": "draft",
"state_modified_at": "2019-08-24T14:15:22Z",
"steps": [
{
"affinity_config_id": "string",
"delay": 0,
"delay_condition": "string",
"delay_until": {
"day_of_week": 0,
"kind": "day_of_week",
"time_of_day": "09:30",
"timezone": "America/New_York"
},
"delay_until_enters": [
"string"
],
"id": 0,
"label": "string",
"next": 0,
"slug": "string",
"split_affinities": [
{
"affinity": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_conditions": [
{
"conditions": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_probabilities": [
{
"next": 0,
"prob": 0
}
],
"type_hint": "work_export",
"work_config": {},
"work_exit_step_ref": 0,
"work_id": "string"
}
],
"version": 0
}{
"_meta": {},
"data": {
"aid": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"entry_condition": "in_segment",
"entry_segment_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"label": "string",
"modified": "2019-08-24T14:15:22Z",
"reentry_allowed": true,
"reentry_condition": "in_segment",
"reentry_delay": 0,
"root_step_id": 0,
"state": "draft",
"state_modified_at": "2019-08-24T14:15:22Z",
"steps": [
{
"affinity_config_id": "string",
"delay": 0,
"delay_condition": "string",
"delay_until": {
"day_of_week": 0,
"kind": "day_of_week",
"time_of_day": "09:30",
"timezone": "America/New_York"
},
"delay_until_enters": [
"string"
],
"id": 0,
"label": "string",
"next": 0,
"slug": "string",
"split_affinities": [
{
"affinity": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_conditions": [
{
"conditions": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_probabilities": [
{
"next": 0,
"prob": 0
}
],
"type_hint": "work_export",
"work_config": {},
"work_exit_step_ref": 0,
"work_id": "string"
}
],
"version": 0
},
"request_id": "string",
"status": 0
}Get flow states
https://api.lytics.io/v2/flow/stateGet all possible flow state values (step slugs / personalization keys) for the account.
{
"_meta": {},
"data": [
"string"
],
"request_id": "string",
"status": 0
}Get flow
https://api.lytics.io/v2/flow/{name}Get a flow by name. All versions are returned unless latest=true.
{
"_meta": {},
"data": {
"aid": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"entry_condition": "in_segment",
"entry_segment_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"label": "string",
"modified": "2019-08-24T14:15:22Z",
"reentry_allowed": true,
"reentry_condition": "in_segment",
"reentry_delay": 0,
"root_step_id": 0,
"state": "draft",
"state_modified_at": "2019-08-24T14:15:22Z",
"steps": [
{
"affinity_config_id": "string",
"delay": 0,
"delay_condition": "string",
"delay_until": {
"day_of_week": 0,
"kind": "day_of_week",
"time_of_day": "09:30",
"timezone": "America/New_York"
},
"delay_until_enters": [
"string"
],
"id": 0,
"label": "string",
"next": 0,
"slug": "string",
"split_affinities": [
{
"affinity": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_conditions": [
{
"conditions": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_probabilities": [
{
"next": 0,
"prob": 0
}
],
"type_hint": "work_export",
"work_config": {},
"work_exit_step_ref": 0,
"work_id": "string"
}
],
"version": 0
},
"request_id": "string",
"status": 0
}Create or update flow by name
https://api.lytics.io/v2/flow/{name}Create a new flow or update an existing one. When the body has no id, the name path param is used as the flow id.
{
"aid": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"entry_condition": "in_segment",
"entry_segment_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"label": "string",
"modified": "2019-08-24T14:15:22Z",
"reentry_allowed": true,
"reentry_condition": "in_segment",
"reentry_delay": 0,
"root_step_id": 0,
"state": "draft",
"state_modified_at": "2019-08-24T14:15:22Z",
"steps": [
{
"affinity_config_id": "string",
"delay": 0,
"delay_condition": "string",
"delay_until": {
"day_of_week": 0,
"kind": "day_of_week",
"time_of_day": "09:30",
"timezone": "America/New_York"
},
"delay_until_enters": [
"string"
],
"id": 0,
"label": "string",
"next": 0,
"slug": "string",
"split_affinities": [
{
"affinity": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_conditions": [
{
"conditions": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_probabilities": [
{
"next": 0,
"prob": 0
}
],
"type_hint": "work_export",
"work_config": {},
"work_exit_step_ref": 0,
"work_id": "string"
}
],
"version": 0
}{
"_meta": {},
"data": {
"aid": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"entry_condition": "in_segment",
"entry_segment_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"label": "string",
"modified": "2019-08-24T14:15:22Z",
"reentry_allowed": true,
"reentry_condition": "in_segment",
"reentry_delay": 0,
"root_step_id": 0,
"state": "draft",
"state_modified_at": "2019-08-24T14:15:22Z",
"steps": [
{
"affinity_config_id": "string",
"delay": 0,
"delay_condition": "string",
"delay_until": {
"day_of_week": 0,
"kind": "day_of_week",
"time_of_day": "09:30",
"timezone": "America/New_York"
},
"delay_until_enters": [
"string"
],
"id": 0,
"label": "string",
"next": 0,
"slug": "string",
"split_affinities": [
{
"affinity": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_conditions": [
{
"conditions": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_probabilities": [
{
"next": 0,
"prob": 0
}
],
"type_hint": "work_export",
"work_config": {},
"work_exit_step_ref": 0,
"work_id": "string"
}
],
"version": 0
},
"request_id": "string",
"status": 0
}Delete flow
https://api.lytics.io/v2/flow/{name}Delete all versions of a flow by name.
{
"_meta": {},
"data": {},
"request_id": "string",
"status": 0
}Get flow version
https://api.lytics.io/v2/flow/{name}/{version}Get a specific version of a flow by name and version.
{
"_meta": {},
"data": {
"aid": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"entry_condition": "in_segment",
"entry_segment_id": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"label": "string",
"modified": "2019-08-24T14:15:22Z",
"reentry_allowed": true,
"reentry_condition": "in_segment",
"reentry_delay": 0,
"root_step_id": 0,
"state": "draft",
"state_modified_at": "2019-08-24T14:15:22Z",
"steps": [
{
"affinity_config_id": "string",
"delay": 0,
"delay_condition": "string",
"delay_until": {
"day_of_week": 0,
"kind": "day_of_week",
"time_of_day": "09:30",
"timezone": "America/New_York"
},
"delay_until_enters": [
"string"
],
"id": 0,
"label": "string",
"next": 0,
"slug": "string",
"split_affinities": [
{
"affinity": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_conditions": [
{
"conditions": "string",
"label": "string",
"next": 0,
"priority": 0
}
],
"split_probabilities": [
{
"next": 0,
"prob": 0
}
],
"type_hint": "work_export",
"work_config": {},
"work_exit_step_ref": 0,
"work_id": "string"
}
],
"version": 0
},
"request_id": "string",
"status": 0
}Delete flow version
https://api.lytics.io/v2/flow/{name}/{version}Delete a single version of a flow by name and version.
{
"_meta": {},
"data": {},
"request_id": "string",
"status": 0
}Create flow step work
https://api.lytics.io/v2/flow/{name}/{version}/{step}/workCreate the work for a given step of a flow version.
{
"_meta": {},
"data": {
"account_id": "string",
"aid": 0,
"auth_ids": [
"string"
],
"config": {},
"created": "2019-08-24T14:15:22Z",
"description": "string",
"expires_at": "2019-08-24T14:15:22Z",
"id": "string",
"name": "string",
"tag": "string",
"updated": "2019-08-24T14:15:22Z",
"workflow": "string",
"workflow_id": "string"
},
"request_id": "string",
"status": 0
}