Get User Flow State
Get the state of a User in all Flows
curl --request GET \
--url https://api.frigade.com/v1/public/flowStates \
--header 'Authorization: Bearer <token>'
{
"eligibleFlows": [
{
"flowSlug": "flow_abc",
"flowName": "Onboarding Checklist",
"flowType": "ANNOUNCEMENT",
"data": {
"steps": [
{
"id": "step_abc",
"$state": {
"completed": true,
"skipped": true,
"started": true,
"visible": true,
"blocked": true,
"lastActionAt": "2024-09-01T00:00:00.000Z",
"flowResponses": [
{
"flowSlug": "flow_abc",
"actionType": "STARTED_STEP",
"stepId": "step-1",
"data": "{\"key\": \"value\"}",
"createdAt": "2024-01-01T00:00:00Z"
}
]
}
}
]
},
"$state": {
"currentStepId": "step_abc",
"currentStepIndex": 1,
"completed": true,
"started": true,
"skipped": true,
"visible": true,
"lastActionAt": "2024-09-01T00:00:00.000Z",
"flowResponses": [
{
"flowSlug": "flow_abc",
"actionType": "STARTED_STEP",
"stepId": "step-1",
"data": "{\"key\": \"value\"}",
"createdAt": "2024-01-01T00:00:00Z"
}
]
},
"version": 1
}
],
"ineligibleFlows": [
"<string>"
]
}
Authorizations
Authentication header of the form Bearer: <token>
, where <token>
is either your public or private API key. See when to use which
Response
List of Flows that the user is eligible for as well as the user's state in each Flow
The Flow Slug
The Flow Name
The Flow Type
The Flow's metadata including the user's state in each step
List of Steps in the Flow
The Step ID
The Step State
Whether the Step is completed
Whether the Step has been skipped
Whether the Step has been started
Whether the Step is visible (based on visibilityCriteria
)
Whether the Step is blocked (based on startCriteria
)
The last time the user took an action on the Step
The flow responses associated with the user in the Step. This is only available when using a private API key.
The user's state in the Flow
The current step (if any) the user is on
The index of the current step in the Flow. Will be -1 if the user has not started the Flow
Whether the Flow is completed
Whether the Flow has been started
Whether the Flow has been skipped/dismissed
Whether the Flow is visible (based on the Flow's Targeting)
The last time the user took an action on the Flow
The flow responses associated with the user in the Flow. This is only available when using a private API key.
The ID of the Flow
The ID of the Step
The JSON serialized data of the Flow response (for instance form data).
The action type of the step. Possible values: STARTED_STEP
, COMPLETED_STEP
, SKIPPED_STEP
, NOT_STARTED_STEP
, STARTED_FLOW
, COMPLETED_FLOW
, SKIPPED_FLOW
, NOT_STARTED_FLOW
The timestamp of the flow response
The version number of the Flow
List of Flow IDs that the user is ineligible for (for instance if a Flow is turned off)
curl --request GET \
--url https://api.frigade.com/v1/public/flowStates \
--header 'Authorization: Bearer <token>'
{
"eligibleFlows": [
{
"flowSlug": "flow_abc",
"flowName": "Onboarding Checklist",
"flowType": "ANNOUNCEMENT",
"data": {
"steps": [
{
"id": "step_abc",
"$state": {
"completed": true,
"skipped": true,
"started": true,
"visible": true,
"blocked": true,
"lastActionAt": "2024-09-01T00:00:00.000Z",
"flowResponses": [
{
"flowSlug": "flow_abc",
"actionType": "STARTED_STEP",
"stepId": "step-1",
"data": "{\"key\": \"value\"}",
"createdAt": "2024-01-01T00:00:00Z"
}
]
}
}
]
},
"$state": {
"currentStepId": "step_abc",
"currentStepIndex": 1,
"completed": true,
"started": true,
"skipped": true,
"visible": true,
"lastActionAt": "2024-09-01T00:00:00.000Z",
"flowResponses": [
{
"flowSlug": "flow_abc",
"actionType": "STARTED_STEP",
"stepId": "step-1",
"data": "{\"key\": \"value\"}",
"createdAt": "2024-01-01T00:00:00Z"
}
]
},
"version": 1
}
],
"ineligibleFlows": [
"<string>"
]
}