API Docs
← Back to Settings

FlowEngine API

REST API, fe CLI, and MCP server for the whole FlowEngine platform.

Quick Start

1

Get an API key

Settings → API Access → Generate. Free for all users.

2

Deploy a function via CLI

npm i -g flowengine.cloud
fe login
fe deploy ./my-fn --name scraper --runtime nodejs22
3

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. 1. Go to Settings
  2. 2. Find the "API Access" section
  3. 3. Click "Generate API Key"
  4. 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.

GET/api/v1/functions

List the caller's functions (excludes soft-deleted).

curl https://flowengine.cloud/api/v1/functions -H "Authorization: Bearer fe_your_key"
Response
{
  "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": "..."
    }
  ]
}
POST/api/v1/functions

Create a function row. Status starts as creating; deploy code with /deploy, /upload, /github, or /templates/:slug/fork.

Body
{
  "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

GET/api/v1/functions/:id

Return the function row joined with latest deployment metadata.

curl https://flowengine.cloud/api/v1/functions/your-uuid -H "Authorization: Bearer fe_your_key"
PATCH/api/v1/functions/:id

Update Cloud Run controls. Unknown fields are ignored. Does not redeploy - re-run /deploy to apply.

Body (any subset)
{
  "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
}
DELETE/api/v1/functions/:id

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

POST/api/v1/functions/:id/deploy

Two-step deploy. (1) Call with empty body to get a signed GCS PUT URL. (2) PUT your tarball. (3) Call again with sourceTarball set.

Step 1 - request upload URL
curl -X POST https://flowengine.cloud/api/v1/functions/your-uuid/deploy \
  -H "Authorization: Bearer fe_your_key" \
  -H "Content-Type: application/json" \
  -d '{}'
Response
{
  "uploadUrl": "https://storage.googleapis.com/...",
  "sourceTarball": "gs://flowengine-source/functions/<user>/<fn>/<ts>.tar.gz",
  "expiresIn": 900
}
Step 2 - PUT the tarball
curl -X PUT "$uploadUrl" \
  -H "Content-Type: application/gzip" \
  --data-binary @source.tar.gz
Step 3 - trigger build
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

POST/api/v1/functions/upload

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

Form fields
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

POST/api/v1/functions/github

Deploy a public GitHub repo. Server fetches the tarball from codeload.github.com, strips the top-level directory, and runs the shared deploy chain.

Body
{
  "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
}
POST/api/v1/functions/templates/:slug/fork

Create 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"}'
GET/api/v1/functions/:id/source

Browser-editor surface. GET returns the last deployed tarball as a { path: contents } map. PUT accepts an edited map and queues a redeploy.

PUT/api/v1/functions/:id/source
PUT body
{
  "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

GET/api/v1/functions/:id/logs

Last 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}.

GET/api/v1/functions/:id/secrets

List bindings for this function joined with function_secrets.

curl https://flowengine.cloud/api/v1/functions/your-uuid/secrets \
  -H "Authorization: Bearer fe_your_key"
POST/api/v1/functions/:id/secrets

Upsert a per-function override (scope=function) and bind it with source=override.

Body
{ "name": "OPENAI_API_KEY", "value": "sk-..." }
DELETE/api/v1/functions/:id/secrets?name=NAME

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

POST/api/v1/functions/:id/domain

Create + persist a mapping. Returns DNS records you need to add at your registrar.

Body
{ "domain": "api.example.com" }
GET/api/v1/functions/:id/domain

Refresh 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"
DELETE/api/v1/functions/:id/domain

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

GET/api/v1/functions/usage

Aggregates 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"
GET/api/v1/functions/limits

The caller's Functions tier plus every tier's caps. UI uses this for tier-aware defaults and upgrade hints.

Response
{
  "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"
}
GET/api/v1/functions/billing

Read or update Functions billing preferences. PUT accepts any subset.

PUT/api/v1/functions/billing
PUT body
{
  "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.

POST/api/v1/functions/billing/verify-card

Self-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 Unauthorized

Missing or invalid fe_ key.

402 Payment Required

Action requires a payment method (paid tier deploy with no card on file).

403 Forbidden

Tier gate (Slack trigger on free tier) or account suspended (over-credit / card invalid). Body includes upgrade_url.

409 Conflict

A function with this name already exists for your account.

429 Too Many Requests

Too many concurrent deploys for your account. Wait for one to finish.

400 Bad Request

Validation failure. Body includes field pointing at the offending parameter.

AI Chat

POST/api/v1/chat

Send 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 required

Your prompt for FlowEngine AI

model required

"regular" - all tiers. "boost" - Pro/Max only, more powerful.

conversation_id optional

Pass 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" }
GET/api/v1/user

Returns account info including credits and subscription tier. Useful for validating API keys.

Response (200)
{
  "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.

GET/api/v1/chats

List all conversations (paginated).

- limit optional, default 50, max 100

- offset optional, default 0

Response
{
  "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"
POST/api/v1/chats

Create a new conversation.

Body
{ "title": "string (optional, max 200 chars)" }
Response (201)
{ "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"}'
GET/api/v1/chats/:id

Get a conversation with all messages.

Response
{
  "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
  }
}
DELETE/api/v1/chats/:id

Delete 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"
GET/api/v1/credits

Get current credit balance without fetching the full user profile.

Response
{ "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"Default

Standard mode. Available on all tiers. Fewer credits per request.

"boost"Pro/Max only

Advanced reasoning. Requires Pro or Max subscription. Free tier requests return 403.

AI Chat errors

401 Unauthorized

Invalid or missing API key. Ensure key starts with fe_.

403 Forbidden

Boost mode requested by a free tier account.

{ "success": false, "error": "Boost mode unavailable", "upgrade_required": true, "upgrade_url": "https://flowengine.cloud/#pricing" }
400 Bad Request

Missing required fields or invalid data.

500 Server Error

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

POST/api/v1/n8n/instances

Create 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"}'
Response (201)
{
  "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

GET/api/v1/n8n/instances

List all your n8n instances with status, URL, and billing info.

curl https://flowengine.cloud/api/v1/n8n/instances -H "Authorization: Bearer fe_your_key"
GET/api/v1/n8n/instances/:instanceId

Get instance details including live Coolify status.

curl https://flowengine.cloud/api/v1/n8n/instances/your-uuid -H "Authorization: Bearer fe_your_key"
POST/api/v1/n8n/instances/:instanceId/manage

Start, 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

GET/api/v1/n8n/instances/:instanceId/logs

Fetch 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"
DELETE/api/v1/n8n/instances/:instanceId

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

GET/api/mcp/instances

List 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"
Response
{
  "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
    }
  ]
}
GET/api/mcp/instances/:instanceId/status

Get 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"
POST/api/mcp/instances/:instanceId/manage

Start, 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

GET/api/mcp/instances/:instanceId/logs

Fetch 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"
GET/api/mcp/instances/:instanceId/deployments

Deployment 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"
PATCH/api/mcp/instances/:instanceId/config

Update 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

PATCH/api/mcp/instances/:instanceId/domain

Update 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"}'
GET/api/mcp/instances/:instanceId/backups

List backups (GET) or create a new manual backup (POST). Auto-cleanup after 4 weeks.

POST/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.

POST/api/n8n/provision-instance

Provision 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"}'
POST/api/openclaw/provision-instance

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

POST/api/website/provision-instance

Deploy 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

WhatsApp Sessions

Provision and manage WhatsApp numbers. Requires a payment method on file - billed via Stripe automatically.

POST/api/v1/whatsapp/sessions

Create 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"
  }'
Response (201)
{
  "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.

GET/api/v1/whatsapp/sessions

List all WhatsApp sessions with status, credentials, and webhook info.

curl https://flowengine.cloud/api/v1/whatsapp/sessions -H "Authorization: Bearer fe_your_key"
GET/api/v1/whatsapp/sessions/:instanceName

Get 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"
PUT/api/v1/whatsapp/sessions/:instanceName/webhook

Set 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"}'
DELETE/api/v1/whatsapp/sessions/:instanceName

Delete 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

Email

Gmail Sending

Send through your OAuth-connected Gmail accounts. No GTM / outreach / validation credits deducted - you're sending from your own mailbox.

GET/api/v1/email/senders

List connected Gmail accounts with today's send count and quota.

curl https://flowengine.cloud/api/v1/email/senders -H "Authorization: Bearer fe_your_key"
POST/api/v1/email/send

Send an email. Picks the eligible Gmail sender with the most quota left, or honors from_email if you pin one.

Body
{
  "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
}
Response
{
  "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. 1. Open n8n Settings → Community Nodes
  2. 2. Paste n8n-nodes-flowengine in the package name field
  3. 3. Add your FlowEngine API key as credentials
  4. 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