VOICEFLOW INTEGRATION

Purple Flea for Voiceflow

Voiceflow is the collaboration platform for designing and deploying AI agents across voice, chat, and more. With Purple Flea's REST API, your Voiceflow prototypes become live financial agents that can execute real crypto transactions.

Get API Key โ€” Free View API Reference

Integration Architecture

Voiceflow's API integration block makes calling Purple Flea endpoints straightforward โ€” no backend server required.

1

Add API Integration Block

In the Voiceflow canvas, drag in an API block from the integrations panel. This block handles the HTTP request to Purple Flea โ€” you define the endpoint, headers, and body template directly in the canvas UI without writing server-side code.

2

Configure Method, URL, Headers

Set the method to POST (or GET for read-only operations), enter the Purple Flea endpoint URL, and add the Authorization header with your Bearer API_KEY. Use Voiceflow's {variable} syntax in the request body to inject captured user intent values.

3

Map Response to Variables

Use Voiceflow's response mapping to extract fields from the Purple Flea JSON response into named variables (e.g. pnl, balance, positionId). These are then available in downstream Speak or Text blocks using the {variable} syntax for natural language responses.

API Block Configuration

Here is the exact Voiceflow API block configuration for the Purple Flea trade endpoint. Copy these values directly into your Voiceflow canvas.

Voiceflow API Block โ€” Trade Endpoint
Method
POST
URL
https://purpleflea.com/api/v1/trade
Authorization
Bearer YOUR_API_KEY
Content-Type
application/json
Body (JSON)
{"symbol": "{symbol}-PERP", "side": "{side}", "size_usd": {amount}, "leverage": 2}
Map: pnl
response.pnl
Map: positionId
response.position_id
Map: entryPrice
response.entry_price
Voiceflow API Block โ€” Wallet Balance Endpoint
Method
GET
URL
https://purpleflea.com/api/v1/wallet/balance
Authorization
Bearer YOUR_API_KEY
Map: totalUsd
response.total_usd
Map: btcBalance
response.balances.BTC

Voice Command โ†’ Transaction

Map natural language voice commands to Purple Flea API calls using Voiceflow's intent and variable capture system.

Voice Command Voiceflow Variables Captured Purple Flea API Call
"Buy 50 dollars of Bitcoin" {amount} = 50, {symbol} = BTC POST /api/v1/trade {"side":"long"}
"Check my wallet" (no capture needed) GET /api/v1/wallet/balance
"How much did I win?" (no capture needed) GET /api/v1/portfolio/pnl
"Register domain {domain}" {domain} = captured name POST /api/v1/domains/register
"Create escrow for {amount}" {amount} = dollar value POST /api/v1/escrow/create
Voiceflow Speak Block โ€” Response Template
// In Voiceflow Speak or Text block after API call
// Use {variable} syntax to inject mapped response values

"Done! Opened a ${amount} long on {symbol}-PERP at ${entryPrice}."
// โ†’ "Done! Opened a $50 long on BTC-PERP at $78,420."

"Your wallet holds ${totalUsd} total. Bitcoin balance: {btcBalance} BTC."
// โ†’ "Your wallet holds $1,240.50 total. Bitcoin balance: 0.01580 BTC."

"Your portfolio is up ${pnl} today across {positionCount} open positions."
// โ†’ "Your portfolio is up $12.40 today across 2 open positions."

Available Financial APIs

Six production-ready APIs for your Voiceflow agents โ€” trading, wallets, casino, domains, faucet, and escrow.

๐ŸŽฐ

Casino

Provably fair crash, coin flip, dice, and slots via simple POST calls. Voice commands like "flip a coin for $5" map directly to the casino API.

REST API
๐Ÿ“ˆ

Trading โ€” 275 Perps

Perpetual futures across 275 symbols with leverage. Voiceflow agents can open, close, and monitor positions through spoken or typed commands.

REST API
๐Ÿ‘›

Wallet โ€” 6 Chains

Generate wallets, check balances, and send funds across Bitcoin, Ethereum, Solana, Tron, XRP, and Monero โ€” all from a single API key.

REST API
๐ŸŒ

Domains

Register and manage crypto-native domains through conversation. Ask your Voiceflow agent to search and register a domain in natural language.

REST API
๐Ÿšฐ

Faucet

New agents get free crypto to try the casino. Perfect for onboarding flows โ€” register a new user agent and claim funds in a single Voiceflow sequence.

FREE
๐Ÿค

Escrow

Trustless agent-to-agent payments with 1% fee and 15% referral on fees. Guide users through creating payment escrows with a conversational flow.

1% fee

Deployment Channels

Voiceflow agents with Purple Flea financial capabilities can be deployed across every major voice and chat channel.

๐ŸŒ
Web Chat Widget
Embed on any website โ€” JavaScript snippet, no backend needed
๐Ÿ”ต
Alexa Skill
Publish a voice-first trading skill to the Alexa marketplace
๐Ÿ”ด
Google Assistant
Google Home and Android devices with voice financial control
๐Ÿ“ž
IVR / Phone
Deploy as a phone IVR โ€” press 1 to open a long position
๐Ÿ’ฌ
Slack
Team trading slash commands via Voiceflow Slack integration
๐Ÿ“ฑ
WhatsApp
WhatsApp Business API for mobile-first conversational finance

Sample Agent Design

A complete Voiceflow trading agent canvas walkthrough โ€” from first utterance to confirmed transaction.

๐ŸŽ™๏ธ

1. Intent Recognition Block

The agent starts with an Intent block trained on financial phrases: "open a trade", "check balance", "flip a coin", "create escrow". Voiceflow's NLU classifies the utterance and routes to the correct sub-flow.

๐Ÿ“

2. Entity / Variable Capture

A Capture block extracts key values โ€” {amount}, {symbol}, {side}. If values are missing, the agent prompts: "How much do you want to trade?" โ€” standard slot-filling in Voiceflow.

๐Ÿ”Œ

3. Purple Flea API Call

An API Integration block POSTs to the appropriate Purple Flea endpoint using the captured variables in the request body. The response is mapped to output variables (pnl, positionId, balance).

๐Ÿ’ฌ

4. Response Formatting & Speech

A Speak block (for voice) or Text block (for chat) uses the mapped variables to construct natural language output. Voice output uses SSML for prosody โ€” "Your trade is OPEN. Entry price: seventy-eight thousand four hundred twenty dollars."

๐Ÿ”„

5. Follow-Up Loop

After the response, a Choice block offers follow-up actions: "Close position", "Check portfolio", "New trade". The user can continue the financial session without re-triggering the intent recognition flow.

Start building with Voiceflow + Purple Flea

Get your API key and add live financial capabilities to your Voiceflow canvas today. Works on Alexa, web chat, IVR, and every Voiceflow deployment target.