Skip to main content
Your application talks to a Wavefront app directly, over its REST API at https://<your-app>/floware/…. This page covers what every integration needs.

Sign in and tokens

Users of your application sign in with an app user (not a console account):
The token is at data.user.access_token. Send it on every call as Authorization: Bearer <token>. POST /floware/v1/logout ends the current session.

Calling from a browser: CORS

The API only answers browsers from origins listed in the server’s ALLOWED_ORIGINS setting (comma-separated). Either:
  • add your application’s origin to ALLOWED_ORIGINS in the deployment, or
  • call the API from your own backend, or, in development, through your dev server’s proxy. With Vite, for example:
vite.config.ts

Responses and errors

Every response has the same envelope:
  • Check meta.status; on failure, meta.error is the message to show or log.
  • Some routes nest their payload one level deeper (data.data), notably agents, workflows and executions. Unwrap per route.
  • A generic “An unexpected error has occurred…” means the server logged the real reason; see Troubleshooting.

A minimal client

wavefront.ts

Files in the browser

Files in file storage have no public URL. Download them with the user’s token and show them from a blob: URL:
Allow blob: for images and media in your Content-Security-Policy.

Streaming

Chat replies and agent runs can stream as server-sent events. Read them with fetch and a stream reader (an EventSource cannot send the Authorization header). See Chatbots for a parser.

Checklist

  • A dedicated app user per service or script; people use their own accounts
  • Origin in ALLOWED_ORIGINS, or calls go through your backend
  • 401 handled by sending the user to sign in
  • meta.error shown or logged on failure
  • Long runs use background execution with a polling deadline
  • Results that matter are saved by the workflow, not only read from the output file