curl --request GET \
  --url https://api.frigade.com/v1/flow/:flowSlug \
  --header 'Authorization: Bearer <token>'

The flows GET endpoint is used to fetch the private Flow metadata (such as the YAML configuration), targeting, and more. You will need to use the private API key.

Only call this endpoint from your backend code.

Getting a Flow by its slug

curl -i -X GET \
   -H "Authorization:Bearer api_private_t3YtBqLJuOeFzIElTYBARERMQljitCgy7mhusWthcEHKCMpEU4LrQmuhd4RRAawi" \
 'https://api.frigade.com/v1/flow/flow_GzXC2fHz'
{
  "id": 757,
  "name": "NPS Survey",
  "data": "steps:\n  - id: nps-score-page\n    title: How likely are you to recommend us 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",
  "description": "",
  "createdAt": "2024-03-18T19:43:05.316Z",
  "modifiedAt": "2024-03-18T19:43:05.316Z",
  "version": 1,
  "slug": "flow_GzXC2fHz",
  "targetingLogic": null,
  "type": "SURVEY",
  "status": "ACTIVE",
  "active": true,
  "modifiedById": null,
  "publishedAt": null,
  "publishedById": null,
  "archivedAt": null,
  "archivedById": null,
  "archiveBehavior": null,
  "codeSnippet": "<Frigade.Survey.NPS flowId=\"my-flow-id\" dismissible={true} />",
  "completionBehavior": "USER"
}