SDK reference
SDK reference

API overview

The public TypeScript API, organized by what you want to record.

Client and configuration

APIPurpose
createFlowmark(config?)Create a Node.js, Next.js, or browser client
defineConfig(config)Type-check configuration without loading a file
flush() / shutdown()Wait for delivery or close a client

Run markers

Get a run handle with flowmark.workflow(name, options?). All marker methods below return void except operation(). See workflows and runs for the lifecycle map.

Loading diagram

APIPurpose
workflow() / runIdStart an independent execution and identify it
step()Record a semantic checkpoint without executing code
operation()Measure an independently identified operation
progress()Record absolute progress so far
error()Record a problem without ending the run
done() / fail()Report terminal completion or failure
setProperties()Append discovered context

Types and adapters

Runtime differences

The normal Node.js and browser clients expose workflow, flush, and shutdown. The Next.js adapter exposes only workflow and manages delivery with after(). Run handles have the same marker API across integrations.

Need a runnable starting point rather than a method lookup? Read the quickstart, Next.js guide, or browser guide.

On this page