API reference

Embed Closora in any product.

REST + MCP. SDKs for TypeScript and Python. Webhooks for every event. Streaming SSE for live agent traces.

Endpoint

POST /v1/workflows/run

Runs a workflow synchronously or streams events back over SSE.

Body

workflow_idThe slug of the workflow.
inputStructured input or document URL.
modesync · async · shadow
policy_overrideOptional per-call policy bag.
// Run the AP workflow on a new invoice
const res = await closora.workflows.run({
  workflow_id: "ap.invoice",
  input: {
    document_url: "s3://acme/inv-22041.pdf",
    vendor_hint:  "Cintas Corp"
  },
  mode: "sync"
});

// → { status: "booked", je_id: "JE-77821",
//     confidence: 0.96, audit_url: "..." }
REST

Full surface

Workflows, runs, policies, audit, evals — fully scriptable.

MCP

Tool registry

Register your tools and let Closora agents call them with per-tool auth.

Webhooks

Every event

Run started, booked, escalated, reversed. HMAC signed.

SSE

Live agent traces

Stream planner/executor/verifier output to your UI.

SDKs

TS · Python

First-party, typed, autogenerated from OpenAPI.

Auth

API keys · OAuth

Per-key scopes, rotation, and audit.