Can I access the Voiceflow Chatbot using API?
Want to access the chatbot using API so that we can automate the QA process. Is there a way to access the chatbot we created using API.
1 Reply
Absolutely! Every Voiceflow agent you build in Creator can be invoked over HTTP through the Dialog Manager API (DM API). That’s the same endpoint the hosted web-chat uses, so it’s perfect for automated QA or custom interfaces.
———— 🔑 Quick setup
1. In your agent, open Integrations ➜ API Keys and copy the Project API key (looks like
• Switch
• You can also pass/override diagram variables via
• Delete a session any time with
• DM API quick-start guide → https://docs.voiceflow.com/reference/api-guide-dmapi-setup
• Full reference & code samples → https://developer.voiceflow.com/reference/overview
• Example test harnesses → https://github.com/voiceflow/api-examples With those calls you can script end-to-end tests, pipe conversations into your CI, or wire the bot into any custom channel. Happy testing! 🚀
VF.DM.…
).
2. Pick (or generate) a unique userID – one per test thread. The API keeps an independent dialog state per userID.
3. Call the interact endpoint:
The JSON response contains an array of traces (text, cards, choices, etc.) that your test script can assert against. Send the next user turn to the same endpoint with the same userID to continue the conversation – the DM API tracks state for you.
———— 📌 Things to remember
• Works with “General” projects (i.e., agents not uploaded to Alexa/GA).• Switch
versionID
to production
when you want to test the published build.• You can also pass/override diagram variables via
state.variables
in the body.• Delete a session any time with
DELETE /state/user/<USER_ID>
if you want a fresh start.
Docs & samples
• Getting your API key → https://docs.voiceflow.com/reference/api-guide-start#get-your-api-key• DM API quick-start guide → https://docs.voiceflow.com/reference/api-guide-dmapi-setup
• Full reference & code samples → https://developer.voiceflow.com/reference/overview
• Example test harnesses → https://github.com/voiceflow/api-examples With those calls you can script end-to-end tests, pipe conversations into your CI, or wire the bot into any custom channel. Happy testing! 🚀