Skip to main content
POST
Draft a workflow, told as it goes

Authorizations

Authorization
string
header
required

An API key from Settings → API keys, sent as Authorization: Bearer kb_live_…. A workspace key starts kb_; a personal key starts kbp_ and acts as its owner.

Headers

Kallabot-Version
enum<string>

The API version to answer as, a date (YYYY-MM-DD). Leave it out for the current version (2026-11-07). An unknown version is refused with 400 unsupported_api_version.

Available options:
2026-11-07
Example:

"2026-11-07"

Body

application/json
prompt
string
default:""

What the workflow should do, in plain words. May be empty when refining (draft_id + feedback).

Maximum string length: 2000
draft_id
string | null

Refine this earlier draft instead of starting a new one.

Maximum string length: 64
Pattern: ^wfd_[A-Za-z0-9_\-]{8,40}$
feedback
string | null

With draft_id: what to change ("also email me").

Maximum string length: 2000

Response

stage events as it works (reading, apps {apps}, planned {steps, name}, repairing {problems}, checked {steps}), then one draft (the POST /generate body) or one problem (the standard problem body). A : keep-alive comment every 10 s.

Server-Sent Events: event: stage|draft|problem lines, each with data: JSON.

Example:

"event: stage\ndata: {\"stage\": \"apps\", \"apps\": [\"HubSpot\", \"WhatsApp\"]}\n\nevent: draft\ndata: {\"draft_id\": \"wfd_…\", \"name\": \"…\", \"steps\": […]}\n\n"