curl --request POST \
  --url https://api.frigade.com/v1/public/flowResponses \
  --header 'Authorization: Bearer <token>'

Flow Responses record responses to a Flow from a user. A Flow Responses is generated at several points in the Flow lifecycle:

  • When a user starts a Flow
  • When a user starts a Step in a Flow
  • When a user completes a Step in a Flow
  • When a user completes a Flow

The object has the following structure:

FieldTypeDescription
flowSlugstringThe unique identifier of the Flow that the Flow Responses object is associated with.
stepIdstringThe step id in the flow where the action is taken.
userIdstringThe unique identifier of the user that the Flow Responses object is associated with. Generated by Frigade
foreignUserIdstringThe unique identifier of the user that the Flow Responses object is associated with. Supplied by passing the userId by the client.
dataobjectThe data associated with the Flow Responses object. This data depends on the data collected in a given Step such as form data or tracking data
actionTypestringThe type of Flow Responses object. Can be one of the following: STARTED_FLOW, STARTED_STEP COMPLETED_STEP, COMPLETED_FLOW, SKIPPED_FLOW
createdAtstringThe ISO date and time when the Flow Responses object was created.

Examples

Completing a step in a Flow

To mark the step with id my-first-action completed for a user with the id my-user-id in a Flow with the slug flow_52HJEGugV8dmXx6J, you would make the following request:

curl -i -X POST \
   -H "Authorization:Bearer api_public_t3YtBqLJuOeFzIElTYBARERMQljitCgy7mhusWthcEHKCMpEU4LrQmuhd4RRAawi" \
   -H "Content-Type:application/json" \
   -d \
'{
  "foreignUserId": "my-user-id",
  "flowSlug": "flow_52HJEGugV8dmXx6J",
  "stepId": "my-first-action",
  "actionType": "COMPLETED_STEP",
  "data": {},
  "createdAt": "2023-07-04T02:04:32.012Z"
}' \
 'https://api.frigade.com/v1/public/flowResponses'