FlowEngine API
REST API, fe CLI, and MCP server for the whole FlowEngine platform.
Quick Start
Get an API key
Settings → API Access → Generate. Free for all users.
Deploy a function via CLI
npm i -g flowengine.cloud fe login fe deploy ./my-fn --name scraper --runtime nodejs22
Or hit the REST API directly
curl -X POST https://flowengine.cloud/api/v1/chat \
-H "Authorization: Bearer fe_your_api_key" \
-H "Content-Type: application/json" \
-d '{"message": "Create a calculator workflow", "model": "regular"}'Three surfaces, one API key
Pick whatever fits your workflow. Same fe_* Bearer token authenticates everywhere.
REST API
JSON over HTTPS. Every feature reachable from any language.
fe CLI
Deploy folders, tail logs, manage secrets. Wraps the REST API.
MCP server
flowengine-mcp lets Claude (or any MCP client) manage your account.
API Keys
API access is free for all users.
- 1. Go to Settings
- 2. Find the "API Access" section
- 3. Click "Generate API Key"
- 4. Copy immediately - shown only once
Security
Never commit your API key to git. It grants full account access.
Authentication
All requests require a Bearer token in the Authorization header:
Authorization: Bearer fe_your_api_key_here
- All keys start with fe_
- Keys are case-sensitive
- Invalid or missing keys return 401 Unauthorized
- The CLI stores your key at ~/.flowengine/config.json
CLI
Install
CLI ships in the same npm package as the MCP server. Three binaries are installed.
npm i -g flowengine.cloud
- fe - short form for daily use
- flowengine - long-form alias
- flowengine-mcp - MCP server for Claude (different concern, same package)
Login
fe login # Paste your fe_* API key when prompted. Stored at ~/.flowengine/config.json. fe logout # Forgets the saved key.
Point at a non-production server with fe --base-url https://staging.flowengine.cloud ... or the FLOWENGINE_BASE_URL env var.
Deploy
fe deploy tars the folder, uploads via signed URL, and triggers a Cloud Run build. First deploy creates the function row; subsequent deploys redeploy in place.
fe deploy [path] [options] # path defaults to the current directory
Deploy options
--name <name> - function name (auto-generated if absent, 1-63 chars, lowercase a-z start)
--runtime <id> - nodejs20 | nodejs22 | python311 | python312 | go122 | java17 | ruby32 | php82
--memory <size> - 256Mi to 32Gi (caps: free 512Mi, pro 8Gi, teams 32Gi)
--cpu <n> - 1 | 2 | 4 | 8
--max-instances <n> - 1-1000 (free 10, paid 100)
--min-instances <n> - 0 to max-instances
--timeout <seconds> - 1-3600
--region <id> - GCP region (default us-central1)
--concurrency <n> - 1-1000
--cpu-throttling - throttle CPU between requests
--json - machine-readable output
Commands
Every command maps 1:1 to a REST endpoint under /api/v1/functions.
list / show
fe list # GET /api/v1/functions fe show <id> # GET /api/v1/functions/:id
logs
fe logs <id> # last 500 Cloud Logging entries fe logs <id> --json # newline-delimited JSON
env
fe env list <id> fe env set <id> OPENAI_API_KEY=sk-... fe env unset <id> OPENAI_API_KEY
Function-scoped secret overrides. Workspace secrets remain bound; only this function's override is removed by unset. Names must match [A-Z][A-Z0-9_]{0,62}.
domain
fe domain add <id> api.example.com fe domain status <id> fe domain rm <id>
Maps a Cloud Run DomainMapping to your function. Status always reflects live GCP state (never the cached row).
usage
fe usage # MTD totals across all functions fe usage --function-id <id> # filter by function fe usage --from 2026-05-01 --to 2026-05-28 fe usage --json
Returns vCPU-seconds, GiB-seconds, request count, and dollarized cost per function.
delete
fe delete <id> # confirms first fe delete <id> --yes # no prompt
Soft-delete. Cloud Run service is reaped by a background job.
End-to-end example
# Install + login npm i -g flowengine.cloud fe login # Deploy a Node 22 scraper with 1 GiB of memory fe deploy ./scraper --name lead-scraper --runtime nodejs22 --memory 1Gi # Bind a secret and redeploy to pick it up fe env set <id> SCRAPER_TOKEN=... fe deploy ./scraper # Tail logs in another terminal fe logs <id> # Point a custom domain at it fe domain add <id> scraper.example.com fe domain status <id>
Functions
Functions overview
Serverless containers on GCP Cloud Run. Source ships as a tarball (via signed GCS upload, folder POST, or GitHub repo), Cloud Build packs it with Buildpacks, Cloud Run serves it. Tier-aware caps on memory, max-instances, and timeout are enforced server-side - check the current caps via /api/v1/functions/limits.
Triggers
webhook (default), slack (Teams/Max), cron
Concurrent deploys
Capped per user to protect Cloud Build budget. 429 if exceeded.
Function CRUD
Create, list, get, patch, and soft-delete function records.
/api/v1/functionsList the caller's functions (excludes soft-deleted).
curl https://flowengine.cloud/api/v1/functions -H "Authorization: Bearer fe_your_key"
{
"functions": [
{
"id": "uuid", "name": "scraper", "runtime": "nodejs22", "status": "ready",
"url": "https://scraper-xxx-uc.a.run.app", "region": "us-central1",
"memory": "1Gi", "cpu": 1, "max_instances": 100, "min_instances": 0,
"timeout_seconds": 60, "concurrency": 80, "cpu_throttling": true,
"base_image": null, "created_at": "...", "updated_at": "..."
}
]
}/api/v1/functionsCreate a function row. Status starts as creating; deploy code with /deploy, /upload, /github, or /templates/:slug/fork.
{
"name": "my-fn", // required, [a-z][a-z0-9-]{0,62}
"runtime": "nodejs22", // required
"memory": "1Gi", "cpu": 1,
"max_instances": 100, "min_instances": 0,
"timeout_seconds": 60, "concurrency": 80,
"region": "us-central1",
"cpu_throttling": true,
"base_image": null,
"trigger_type": "webhook", // webhook | slack | cron
"trigger_config": null
}- 409 if name already exists
- 403 if Slack trigger requested on a non-Teams tier
- All compute knobs clamped to the caller's tier limits
/api/v1/functions/:idReturn the function row joined with latest deployment metadata.
curl https://flowengine.cloud/api/v1/functions/your-uuid -H "Authorization: Bearer fe_your_key"
/api/v1/functions/:idUpdate Cloud Run controls. Unknown fields are ignored. Does not redeploy - re-run /deploy to apply.
{
"memory": "2Gi", "cpu": 2,
"max_instances": 50, "min_instances": 1,
"timeout_seconds": 300, "region": "us-central1",
"concurrency": 40, "cpu_throttling": false,
"base_image": null,
"trigger_type": "webhook", "trigger_config": null
}/api/v1/functions/:idSoft-delete (status=deleted). Cloud Run cleanup runs in a background reaper job.
Function disappears from list and stops serving traffic. Restore is not currently supported via API.
Deploy
Five ways to ship code. All go through the same shared deploy chain.
/api/v1/functions/:id/deployTwo-step deploy. (1) Call with empty body to get a signed GCS PUT URL. (2) PUT your tarball. (3) Call again with sourceTarball set.
curl -X POST https://flowengine.cloud/api/v1/functions/your-uuid/deploy \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{}'{
"uploadUrl": "https://storage.googleapis.com/...",
"sourceTarball": "gs://flowengine-source/functions/<user>/<fn>/<ts>.tar.gz",
"expiresIn": 900
}curl -X PUT "$uploadUrl" \ -H "Content-Type: application/gzip" \ --data-binary @source.tar.gz
curl -X POST https://flowengine.cloud/api/v1/functions/your-uuid/deploy \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"sourceTarball": "gs://flowengine-source/functions/.../source.tar.gz"}'- 429 if you have too many in-flight deploys
- 403 if your account is suspended (over-credit or card invalid)
- Source tarball must live under your tenant's GCS prefix
/api/v1/functions/uploadMultipart folder upload from a browser file picker or CLI. Each file's form field name is its relative path. Server tars + uploads + deploys in one call.
name (optional) function name, auto-generated if absent runtime (optional) defaults to nodejs20 <path> (multiple) the actual files - field name is the relative path
- Max 25 MB per file, 100 MB total
- Max path length 100 bytes (ustar header limit)
- Runtimes: nodejs20, nodejs22, python311, python312, go122, java17, ruby32, php82
/api/v1/functions/githubDeploy a public GitHub repo. Server fetches the tarball from codeload.github.com, strips the top-level directory, and runs the shared deploy chain.
{
"repo": "owner/name" | "owner/name#branch" | "https://github.com/owner/name",
"branch": "main", // optional, overrides #branch
"name": "my-fn", // optional, auto-suffixed if absent
"runtime": "nodejs22" // optional, defaults to nodejs20
}/api/v1/functions/templates/:slug/forkCreate a function from a starter template. Packages the template's file set into a tarball and kicks off Cloud Run.
curl -X POST https://flowengine.cloud/api/v1/functions/templates/openai-chat/fork \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"name": "my-openai-fn"}'/api/v1/functions/:id/sourceBrowser-editor surface. GET returns the last deployed tarball as a { path: contents } map. PUT accepts an edited map and queues a redeploy.
/api/v1/functions/:id/source{
"files": {
"package.json": "{\"main\":\"index.js\"}",
"index.js": "export default async req => new Response('hi')"
}
}- Text files only (binary rejected at upload time)
- Same 25 MB / 100 MB / 100-byte-path limits as folder upload
/api/v1/functions/:id/logsLast 500 Cloud Logging entries for the Cloud Run service.
curl https://flowengine.cloud/api/v1/functions/your-uuid/logs \ -H "Authorization: Bearer fe_your_key"
Tail mode (SSE)
curl -N "https://flowengine.cloud/api/v1/functions/your-uuid/logs?tail=true" \ -H "Authorization: Bearer fe_your_key"
Streams each new log line as a data: event. Polls Cloud Logging every 2 seconds. fe logs <id> wraps this transparently.
Secrets
Per-function overrides on top of workspace-scoped secrets. Names must match [A-Z][A-Z0-9_]{0,62}.
/api/v1/functions/:id/secretsList bindings for this function joined with function_secrets.
curl https://flowengine.cloud/api/v1/functions/your-uuid/secrets \ -H "Authorization: Bearer fe_your_key"
/api/v1/functions/:id/secretsUpsert a per-function override (scope=function) and bind it with source=override.
{ "name": "OPENAI_API_KEY", "value": "sk-..." }/api/v1/functions/:id/secrets?name=NAMERemove a binding by secret_name. Workspace-scope secrets are not touched; the override secret with this name is removed.
curl -X DELETE "https://flowengine.cloud/api/v1/functions/your-uuid/secrets?name=OPENAI_API_KEY" \ -H "Authorization: Bearer fe_your_key"
Custom Domain
Cloud Run DomainMapping wrapped in a status-honest API. GCP state overrides the cached row on every read.
/api/v1/functions/:id/domainCreate + persist a mapping. Returns DNS records you need to add at your registrar.
{ "domain": "api.example.com" }/api/v1/functions/:id/domainRefresh status from Cloud Run. Returns { domain, status: pending | verified | failed, records }.
curl https://flowengine.cloud/api/v1/functions/your-uuid/domain \ -H "Authorization: Bearer fe_your_key"
/api/v1/functions/:id/domainRemove the mapping from GCP and clear the cached row.
Metering & Billing
Track usage, view tier caps, set overage behavior, and re-verify cards after suspension.
/api/v1/functions/usageAggregates function_usage_hourly into a month-to-date total plus per-function breakdown.
- function_id - filter to one function
- from, to - ISO timestamps (defaults: first of month UTC → now)
- client_id - agency-owned client scope (verified against client_permissions)
curl "https://flowengine.cloud/api/v1/functions/usage?from=2026-05-01" \ -H "Authorization: Bearer fe_your_key"
/api/v1/functions/limitsThe caller's Functions tier plus every tier's caps. UI uses this for tier-aware defaults and upgrade hints.
{
"functions_tier": "free" | "pro" | "teams",
"main_tier": "free" | "pro" | "pro_plus",
"limits": { "memory": "...", "max_instances": ..., "timeout_seconds": ... },
"all_limits": { "free": {...}, "pro": {...}, "teams": {...} },
"upgrade_url": "/pricing?tab=functions"
}/api/v1/functions/billingRead or update Functions billing preferences. PUT accepts any subset.
/api/v1/functions/billing{
"overage_action": "stop" | "auto_upgrade", // what happens when MTD > credit
"auto_topup_enabled": true,
"topup_threshold_usd": 5,
"topup_amount_usd": 20
}Read-only fields: suspended_reason (over_credit | card_invalid | null), topup_balance_usd.
/api/v1/functions/billing/verify-cardSelf-service unsuspend. After replacing your card in the Stripe portal, hit this to re-verify and clear functions_suspended_reason.
curl -X POST https://flowengine.cloud/api/v1/functions/billing/verify-card \ -H "Authorization: Bearer fe_your_key"
Fires an off-session SetupIntent. On success: clears suspension fields and resets the $5-bucket check cursor.
Functions errors
401 UnauthorizedMissing or invalid fe_ key.
402 Payment RequiredAction requires a payment method (paid tier deploy with no card on file).
403 ForbiddenTier gate (Slack trigger on free tier) or account suspended (over-credit / card invalid). Body includes upgrade_url.
409 ConflictA function with this name already exists for your account.
429 Too Many RequestsToo many concurrent deploys for your account. Wait for one to finish.
400 Bad RequestValidation failure. Body includes field pointing at the offending parameter.
AI Chat
/api/v1/chatSend a message to FlowEngine AI. Returns a Server-Sent Events stream.
Request Body
{
"message": "string", // required
"model": "regular|boost", // required
"conversation_id": "string" // optional - multi-turn context
}message requiredYour prompt for FlowEngine AI
model required"regular" - all tiers. "boost" - Pro/Max only, more powerful.
conversation_id optionalPass a chat ID to maintain conversation context across requests
Response (SSE Stream)
data: {"id":"chatcmpl-xxx","model":"claude-sonnet-4-6","choices":[{"index":0,"delta":{"content":"Hello","role":"assistant"}}]}
data: {"id":"chatcmpl-xxx","choices":[{"index":0,"delta":{"content":" there!"}}]}
data: {"id":"chatcmpl-xxx","choices":[{"finish_reason":"stop","index":0,"delta":{}}]}
data: [DONE]- Concatenate choices[0].delta.content across chunks to build the full response
- finish_reason: "stop" marks the last content chunk
- data: [DONE] is the final line
403 Boost Upgrade Required
{ "success": false, "error": "Boost mode unavailable", "upgrade_required": true, "upgrade_url": "https://flowengine.cloud/#pricing" }/api/v1/userReturns account info including credits and subscription tier. Useful for validating API keys.
{
"success": true,
"user_id": "uuid",
"credits_remaining": 1000,
"tier": "free" | "pro" | "pro_plus",
"subscription_status": "active"
}curl https://flowengine.cloud/api/v1/user \ -H "Authorization: Bearer fe_your_api_key"
Chats
Manage conversation history.
/api/v1/chatsList all conversations (paginated).
- limit optional, default 50, max 100
- offset optional, default 0
{
"success": true,
"chats": [{ "id": "uuid", "title": "...", "message_count": 5, "created_at": "...", "updated_at": "..." }],
"total": 42, "limit": 50, "offset": 0
}curl "https://flowengine.cloud/api/v1/chats?limit=10" -H "Authorization: Bearer fe_your_api_key"
/api/v1/chatsCreate a new conversation.
{ "title": "string (optional, max 200 chars)" }{ "success": true, "chat": { "id": "uuid", "title": "My New Chat", "message_count": 0, "created_at": "..." } }curl -X POST https://flowengine.cloud/api/v1/chats \
-H "Authorization: Bearer fe_your_api_key" \
-H "Content-Type: application/json" \
-d '{"title": "My New Chat"}'/api/v1/chats/:idGet a conversation with all messages.
{
"success": true,
"chat": {
"id": "uuid", "title": "My Workflow Chat",
"messages": [
{ "id": "msg-uuid", "role": "user", "content": "Create a calculator", "timestamp": "..." },
{ "id": "msg-uuid-2", "role": "assistant", "content": "Here's your workflow...", "has_workflow": true, "timestamp": "..." }
],
"message_count": 2
}
}/api/v1/chats/:idDelete a conversation permanently.
This action is permanent and cannot be undone.
curl -X DELETE https://flowengine.cloud/api/v1/chats/your-chat-uuid \ -H "Authorization: Bearer fe_your_api_key"
/api/v1/creditsGet current credit balance without fetching the full user profile.
{ "success": true, "credits_remaining": 9500, "tier": "pro", "refreshed_at": "2024-01-15T10:30:00Z" }curl https://flowengine.cloud/api/v1/credits -H "Authorization: Bearer fe_your_api_key"
Credits & Rate Limits
- Each request consumes credits based on model mode and token count
- regular uses fewer credits than boost
- A 500 error on the chat endpoint usually means you have run out of credits
Boost Mode
Select AI power with the model parameter.
"regular"DefaultStandard mode. Available on all tiers. Fewer credits per request.
"boost"Pro/Max onlyAdvanced reasoning. Requires Pro or Max subscription. Free tier requests return 403.
AI Chat errors
401 UnauthorizedInvalid or missing API key. Ensure key starts with fe_.
403 ForbiddenBoost mode requested by a free tier account.
{ "success": false, "error": "Boost mode unavailable", "upgrade_required": true, "upgrade_url": "https://flowengine.cloud/#pricing" }400 Bad RequestMissing required fields or invalid data.
500 Server ErrorUsually means you have run out of credits. Check GET /api/v1/credits.
Hosting
n8n Instances
Billing-layer API. Creates Stripe subscriptions automatically. Requires a payment method on file.
/api/v1/n8n/instancesCreate a new n8n instance with auto Stripe billing. Deploys to Coolify in ~10-15 seconds.
curl -X POST https://flowengine.cloud/api/v1/n8n/instances \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"instance_name": "My n8n Server", "storage_gb": 10, "billing_cycle": "monthly"}'{
"success": true,
"instance": {
"id": "uuid", "instance_name": "My n8n Server",
"instance_url": "https://abc12345.flowengine.cloud",
"storage_gb": 10, "status": "running",
"billing_cycle": "monthly", "stripe_subscription_id": "sub_..."
}
}- storage_gb must be 10, 30, or 50
- Returns 402 if no payment method is on file
/api/v1/n8n/instancesList all your n8n instances with status, URL, and billing info.
curl https://flowengine.cloud/api/v1/n8n/instances -H "Authorization: Bearer fe_your_key"
/api/v1/n8n/instances/:instanceIdGet instance details including live Coolify status.
curl https://flowengine.cloud/api/v1/n8n/instances/your-uuid -H "Authorization: Bearer fe_your_key"
/api/v1/n8n/instances/:instanceId/manageStart, stop, or restart an instance.
curl -X POST https://flowengine.cloud/api/v1/n8n/instances/your-uuid/manage \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"action": "restart"}'Valid actions: start, stop, restart
/api/v1/n8n/instances/:instanceId/logsFetch container logs. Pass ?lines=N to control count.
curl "https://flowengine.cloud/api/v1/n8n/instances/your-uuid/logs?lines=200" \ -H "Authorization: Bearer fe_your_key"
/api/v1/n8n/instances/:instanceIdDelete the instance from Coolify and cancel the Stripe subscription.
Cancels billing immediately. Cannot be undone.
curl -X DELETE https://flowengine.cloud/api/v1/n8n/instances/your-uuid -H "Authorization: Bearer fe_your_key"
MCP API
Management API for all hosted instances - n8n, OpenClaw, and Docker. Same endpoints power the FlowEngine MCP tools. No billing involved.
/api/mcp/instancesList all hosting instances across all service types with current status and config.
curl https://flowengine.cloud/api/mcp/instances -H "Authorization: Bearer fe_your_key"
{
"success": true,
"instances": [
{
"id": "uuid", "instance_name": "my-app",
"instance_url": "https://my-flowengine.cloud",
"service_type": "docker | n8n | openclaw | website",
"status": "running | stopped | provisioning | failed",
"storage_limit_gb": 10
}
]
}/api/mcp/instances/:instanceId/statusGet live container status from Coolify. Syncs the database with the actual container state.
curl https://flowengine.cloud/api/mcp/instances/your-uuid/status -H "Authorization: Bearer fe_your_key"
/api/mcp/instances/:instanceId/manageStart, stop, restart, or redeploy an instance.
curl -X POST https://flowengine.cloud/api/mcp/instances/your-uuid/manage \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"action": "restart"}'Valid actions: start, stop, restart, redeploy
/api/mcp/instances/:instanceId/logsFetch container logs. Default 200 lines, max 1000.
curl "https://flowengine.cloud/api/mcp/instances/your-uuid/logs?lines=500" -H "Authorization: Bearer fe_your_key"
/api/mcp/instances/:instanceId/deploymentsDeployment history with status, source (docker image or GitHub build), and timestamps.
curl https://flowengine.cloud/api/mcp/instances/your-uuid/deployments -H "Authorization: Bearer fe_your_key"
/api/mcp/instances/:instanceId/configUpdate Docker image, port, environment variables, or GitHub repo. Does not redeploy - call manage with action=redeploy after.
curl -X PATCH https://flowengine.cloud/api/mcp/instances/your-uuid/config \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{
"dockerImage": "ghcr.io/user/app:latest",
"port": 3000,
"envVars": {"NODE_ENV": "production", "PORT": "3000"}
}'- All fields optional - only provided fields are updated
- Max 20 env vars, alphanumeric/underscore keys, values max 500 chars
- Pass githubRepo instead of dockerImage to build from GitHub
/api/mcp/instances/:instanceId/domainUpdate the tracked domain or URL for an instance.
curl -X PATCH https://flowengine.cloud/api/mcp/instances/your-uuid/domain \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"domain": "myapp.example.com"}'/api/mcp/instances/:instanceId/backupsList backups (GET) or create a new manual backup (POST). Auto-cleanup after 4 weeks.
/api/mcp/instances/:instanceId/backups# List backups curl https://flowengine.cloud/api/mcp/instances/your-uuid/backups -H "Authorization: Bearer fe_your_key" # Create backup curl -X POST https://flowengine.cloud/api/mcp/instances/your-uuid/backups -H "Authorization: Bearer fe_your_key"
Provisioning
Deploy a service onto an existing empty hosting slot. Create a slot first from Portal → Hosting.
/api/n8n/provision-instanceProvision an n8n automation instance on an empty slot.
curl -X POST https://flowengine.cloud/api/n8n/provision-instance \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"instanceId": "your-slot-uuid"}'/api/openclaw/provision-instanceProvision an OpenClaw AI agent on an empty slot. Slot must have 30GB+ storage.
curl -X POST https://flowengine.cloud/api/openclaw/provision-instance \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"instanceId": "your-slot-uuid"}'Slot must have 30GB+ storage. Enforced server-side.
/api/website/provision-instanceDeploy a Docker image or GitHub repo to an empty slot. Subsequent calls redeploy with updated config.
curl -X POST https://flowengine.cloud/api/website/provision-instance \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{
"instanceId": "your-slot-uuid",
"dockerImage": "nginx:latest",
"port": 80,
"envVars": {"NODE_ENV": "production"}
}'- Pass githubRepo instead of dockerImage to deploy from GitHub
- Max 20 env vars, values max 500 chars
- First deploy takes ~90 seconds
WhatsApp Sessions
Provision and manage WhatsApp numbers. Requires a payment method on file - billed via Stripe automatically.
/api/v1/whatsapp/sessionsCreate a new WhatsApp session. Returns a QR code for scanning to connect your number.
curl -X POST https://flowengine.cloud/api/v1/whatsapp/sessions \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{
"display_name": "My Business",
"billing_cycle": "monthly",
"webhook_url": "https://your-n8n.com/webhook/abc"
}'{
"success": true,
"instance_name": "wa-a3f8k2",
"status": "pending_scan",
"session_token": "your-session-api-key",
"server_url": "https://wa.flowengine.cloud",
"stripe_subscription_id": "sub_...",
"qr_code": { "base64": "data:image/png;base64,...", "code": "2@..." }
}Returns 402 if no payment method is on file.
/api/v1/whatsapp/sessionsList all WhatsApp sessions with status, credentials, and webhook info.
curl https://flowengine.cloud/api/v1/whatsapp/sessions -H "Authorization: Bearer fe_your_key"
/api/v1/whatsapp/sessions/:instanceNameGet session details including live connection state from the WhatsApp server.
curl https://flowengine.cloud/api/v1/whatsapp/sessions/wa-a3f8k2 -H "Authorization: Bearer fe_your_key"
/api/v1/whatsapp/sessions/:instanceName/webhookSet or update the webhook URL for receiving WhatsApp events.
curl -X PUT https://flowengine.cloud/api/v1/whatsapp/sessions/wa-a3f8k2/webhook \
-H "Authorization: Bearer fe_your_key" \
-H "Content-Type: application/json" \
-d '{"webhook_url": "https://your-n8n.com/webhook/abc"}'/api/v1/whatsapp/sessions/:instanceNameDelete the session and cancel the Stripe subscription.
Cancels billing immediately. Cannot be undone.
curl -X DELETE https://flowengine.cloud/api/v1/whatsapp/sessions/wa-a3f8k2 -H "Authorization: Bearer fe_your_key"
WhatsApp API
Connect any WhatsApp number via QR code, send messages through REST, and forward incoming events to n8n webhooks.
- Messages - Send text, media, location, contacts, polls, stickers
- Webhooks - Receive incoming messages and connection events in real-time
- n8n Integration - Trigger workflows from WhatsApp messages and reply automatically
Gmail Sending
Send through your OAuth-connected Gmail accounts. No GTM / outreach / validation credits deducted - you're sending from your own mailbox.
/api/v1/email/sendersList connected Gmail accounts with today's send count and quota.
curl https://flowengine.cloud/api/v1/email/senders -H "Authorization: Bearer fe_your_key"
/api/v1/email/sendSend an email. Picks the eligible Gmail sender with the most quota left, or honors from_email if you pin one.
{
"to": "[email protected]", // required
"subject": "Hello", // required
"html": "<p>Hi</p>", // html or text required
"text": "Hi",
"from_email": "[email protected]",// optional - pin a specific sender
"reply_to": "[email protected]" // optional
}{
"success": true,
"message_id": "<[email protected]>",
"sent_from": "[email protected]",
"remaining_today": 248
}Returns 409 no_eligible_sender if every connected Gmail is out of daily quota.
Integrations
Integration Examples
n8n - Community Node
Recommended
Use the official community node for the easiest integration.
npm i n8n-nodes-flowengine
- 1. Open n8n Settings → Community Nodes
- 2. Paste
n8n-nodes-flowenginein the package name field - 3. Add your FlowEngine API key as credentials
- 4. Search "FlowEngine" in the n8n node panel
HTTP Request Node (alternative)
- Method: POST
- URL: https://flowengine.cloud/api/v1/chat
- Authentication: Header Auth → Authorization: Bearer fe_your_key
- Body: JSON with message and model fields
Zapier
Use "Webhooks by Zapier" → POST action:
- URL: https://flowengine.cloud/api/v1/chat
- Payload Type: JSON
- Headers: Authorization = Bearer fe_your_key
- Data: message + model
Make.com
HTTP module → "Make a request":
- Method: POST
- URL: https://flowengine.cloud/api/v1/chat
- Headers: Authorization: Bearer fe_your_key
- Body Type: Raw JSON
JavaScript / Node.js
Parsing the SSE streaming response:
const response = await fetch('https://flowengine.cloud/api/v1/chat', {
method: 'POST',
headers: {
'Authorization': 'Bearer fe_your_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({ message: 'Hello', model: 'regular' })
});
const text = await response.text();
let fullContent = '';
for (const line of text.split('\n')) {
if (line.startsWith('data: ') && !line.includes('[DONE]')) {
try {
const data = JSON.parse(line.slice(6));
if (data.choices?.[0]?.delta?.content) {
fullContent += data.choices[0].delta.content;
}
} catch {}
}
}
console.log(fullContent);Claude / MCP server
Install flowengine-mcp in any MCP client to let Claude (or Cursor, Cline, etc.) deploy functions, manage hosting, and run AI chat against your FlowEngine account.
# claude_desktop_config.json
{
"mcpServers": {
"flowengine": {
"command": "npx",
"args": ["-y", "flowengine.cloud", "flowengine-mcp"],
"env": { "FLOWENGINE_API_KEY": "fe_your_key" }
}
}
}Need help? Manage your API keys in Settings.
Manage API Keys