1. API key: The Dialog API key is used as the authorization header in the export request. To obtain your API key, log in to Voiceflow Creator, open your assistant, and click on the Integrations icon in the left sidebar (or press "5"), be sure to be select the Dialog API integration and click on “Copy API Key.”
2. Version ID: The unique identifier for your Voiceflow assistant version. Find the version ID by clicking on the assistant settings icon on the left sidebar (press "6").
The Voiceflow API export endpoint
The export endpoint enables you to retrieve Voiceflow Assistant file in the form of either a .vf file (containing all information about an Assistant, including block and step details) or a .vfr file (a more concise version).
To reliably use the export endpoint, make sure to click the “Publish” or “Run” button on the canvas after updating your Assistant.
Find more information at our dedicated portal.
Making an API call
To make an API call, use the following endpoint:
https://api.voiceflow.com/v2/versions/{versionID}/export
Using cURL, you can type the following command to get the .vf file:
Replace {versionID} with your Assistant’s version ID and {apiKey} with your Voiceflow Assistant API key.
Adding the param prototype=true will return a response which includes a more concise version of the project in the programs property.
This is the request we recommend you to use for any programmatic analysis or integrating with third-party tooling.
Understanding the JSON structure
A Voiceflow Assistant file (.vf file) comprises three parts: Project, Version, and Diagram.
- Project: Contains Assistant metadata associated with a team/workspace
- Version: Contains information about the version you’re fetching
- Diagram: A version can have several diagrams, with the rootDiagram serving as the entry point during runtime. Diagrams are referred to as topics or components.
Each node within a diagram has a unique nodeID, a canonical type, and data that houses the node’s metadata. Blocks and steps are types of nodes and Blocks contain a “steps” property, while steps have ports in their data.
Get more details about the structure on our dedicated page.
Fetch rewards
With Voiceflow’s API export endpoint, you can efficiently fetch assistant files and integrate them with other systems and tools, paving the way for custom integrations and automations tailored to your specific needs. This approach not only streamlines your workflows but also unlocks new possibilities for enhancing and expanding the capabilities of your Voiceflow Assistant.