How to use Voiceflow’s API export endpoint to fetch your Voiceflow assistant files effortlessly

This tutorial is intended for Voiceflow users and developers looking to integrate their Voiceflow Assistants with other systems or natural language understanding (NLU) tools. We’ll discuss the API’s details, provide some cURL examples, and delve into the JSON structure of the assistant file.

Before we dive into the API calls, you'll need a couple of things: API key and Version ID.

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.”

Integrations section of the Assistant in Voiceflow Creator

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").

Settings section of the Assistant in Voiceflow Creator

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.

RECOMMENDED
square-image

RECOMMENDED RESOURCES
No items found.