API
Update Flow
The flows
PUT
endpoint allows you to update a Flow’s Configuration as well as its metadata.
As this endpoint is destructive, you will need to use the private API key.
Only call this endpoint from your backend code.
Updating a Flow
Before being able to update a Flow, you should make a GET request to obtain the Flow’s private metadata as well as the Flow’s numeric ID (this is a number and is different from the publicly available slug (e.g. flow_GzXC2fHz
). The reason for this is that different versions of the Flow share the same slug but have different numeric IDs to differentiate them.
curl -i -X PUT \
-H "Authorization:Bearer api_private_ngq2pTswZ0Zydh8OthABmkne2o6HJeCnHNYVcFtHCLwmtxUNcSu2UgH0cJ5FQPVi" \
-H "Content-Type:application/json" \
-d \
'{
"data": "steps:\n - id: nps-score-page\n title: How likely are you to recommend Frigade to a friend or colleague?\n primaryButton:\n title: Submit\n fields:\n - id: nps-score\n type: nps\n label: NPS input field\n - id: nps-feedback-page\n title: Why did you choose this rating?\n primaryButton:\n title: Submit\n fields:\n - id: nps-feedback-text\n type: textarea\n placeholder: Your answer goes here"
}' \
'https://api.frigade.com/v1/flows/757'