Skip to main content
FlowDrop is a frontend editor that calls your backend REST API. This guide explains what endpoints to implement, what request/response formats FlowDrop expects, and how to get a working backend running.

Endpoint Tiers

Not all endpoints are required. Here they are organized by priority:

Tier 1: Minimum Viable Backend

These 5 endpoints are the bare minimum to get FlowDrop working:

Tier 2: Full Editor Experience

These endpoints enable the complete sidebar, categories, and port validation:

Tier 3: Advanced Features

These enable playground, execution, and interrupts:
The OpenAPI spec is the authoritative contract. The Tier 1–2 shapes are documented in full below, the Tier 3 shapes under Advanced endpoint formats. For the exhaustive schema, see the OpenAPI specification.

Base URL Configuration

All paths above are relative to a base URL you configure:

Request & Response Formats

GET /health

FlowDrop calls this to verify the backend is reachable. Response:

GET /nodes

Returns all available node types. FlowDrop uses this to populate the sidebar. Query parameters:
  • category (optional) — filter by category
  • search (optional) — search name/description
  • limit (optional, default: 100)
  • offset (optional, default: 0)
Response:
Key fields in NodeMetadata:
  • id (required) — unique identifier
  • name (required) — display name
  • type — node visual type: workflowNode, simple, square, tool, gateway, terminal, idea, note
  • category — sidebar group: inputs, outputs, models, processing, logic, tools, etc.
  • iconIconify icon ID (e.g., mdi:text-box-outline)
  • inputs / outputs — port definitions with id, name, type, dataType
  • configSchema — JSON Schema defining the configuration form

POST /workflows

Creates a new workflow. FlowDrop sends the full workflow JSON. Request body:
Response:

PUT /workflows/:id

Updates an existing workflow. Same request body format as POST.

GET /workflows/:id

Returns a single workflow by ID. Same response format as POST response.

GET /categories

Returns category definitions for the node sidebar. Response:

GET /port-config

Returns data type definitions and compatibility rules for port connections. Response:

Advanced endpoint formats (Tier 3)

These power execution, the interactive playground, and human-in-the-loop interrupts. They use the same { "success": true, "data": ... } envelope as Tier 1–2 unless noted.

POST /workflows/:id/execute

Starts a run. The body is optional. Request:
Response (202 Accepted):

GET /executions/:id

Poll for execution status using the execution_id returned above.
This endpoint returns the status object directly — no success/data envelope. It is the one exception to the response wrapper.
Response:
status is one of pending, running, completed, failed, cancelled, paused, interrupted. The playground’s isTerminalStatus and shouldStopPolling callbacks key off these values.

POST /workflows/:id/playground/sessions

Create an isolated test session for a workflow. The body is optional. Request:
Response (201):
status is one of idle, running, awaiting_input, completed, failed.

POST /playground/sessions/:sid/messages

Send a user message — this triggers a run. The message is created with status pending and processed asynchronously; poll the messages endpoint to track it. Request:
Response (200):
Returns 409 if the previous message in the session is still processing — messages are handled in sequence.

GET /playground/sessions/:sid/messages

Poll for new messages. Supports since, latest, and before query parameters for pagination. Response:
role is user, assistant, system, or log. sessionStatus tells the poller when to stop.

GET /interrupts/:id

Fetch a pending human-in-the-loop interrupt. Response:
type is confirmation, choice, text, form, or review; status is pending, resolved, or cancelled.

POST /interrupts/:id

Resolve an interrupt by submitting the user’s response. The value type depends on the interrupt type. Request:
Response: the updated interrupt (same shape as GET /interrupts/:id, now with status: "resolved").

GET /system/config

Public runtime configuration the editor reads on mount. Response:

CORS Configuration

FlowDrop runs in the browser, so your backend must allow cross-origin requests if served from a different domain:

Error Response Format

When an operation fails, return a consistent error format:
FlowDrop’s API client expects standard HTTP status codes:
  • 200 — success
  • 201 — created
  • 400 — bad request (validation error)
  • 401 — unauthorized (triggers onApiError and auth provider’s onUnauthorized)
  • 404 — not found
  • 500 — server error

Static vs. Dynamic Node Serving

For simple use cases, you can serve node metadata as static JSON:
For dynamic use cases, load from a database:

Verify your backend (conformance checklist)

FlowDrop exercises your API in a predictable order on mount. Run these requests against your base URL to confirm the contract before wiring up the editor — they mirror exactly what the editor does. Replace the BASE value with your own.
Your backend conforms when:
  • GET /health returns 200 with { "status": "ok" }
  • Every response uses the { "success": true, "data": ... } envelope (the one exception is GET /executions/:id)
  • GET /nodes data items include at least id, name, type, and category
  • Workflow metadata uses the exact field names schemaVersion, createdAt, updatedAt (not created_at / updated_at)
  • POST /workflows returns 201 and echoes a server-assigned id
  • Errors return the correct HTTP status (404 missing, 401 unauthorized) with { "success": false, "error": ... }
  • CORS allows your frontend origin if the backend runs on a different domain
If all seven calls succeed and the checklist passes, mounting the editor against this base URL will load nodes into the sidebar and let you create, edit, and save workflows.

Next Steps