---
title: "Onboarding Help Stream"
method: POST
path: "/onboarding/help/stream"
tags: ["onboarding"]
---

# Onboarding Help Stream

`POST /onboarding/help/stream`

## Request

- Base URL: `https://app.zeno-works.ch` (the document declares no server; this is the origin it was published from)
- URL: `https://app.zeno-works.ch/onboarding/help/stream`
- Auth: none declared

Streaming sibling of ``POST /onboarding/help`` (SSE).

Two turn shapes behind one endpoint, chosen by ``ONBOARDING_ASSISTANT_ENABLED``:

* **assistant (default)** — the tool-enabled turn
  (:func:`onboarding_assistant_stream`). Frames: ``tool_call`` /
  ``tool_result`` as the loop runs, ``draft_patch`` ``{"patch"}`` when the
  assistant proposes a change for the user to apply, then the same terminal
  ``done`` (plus ``patches``). The answer does NOT arrive in ``delta``
  frames — the gateway has no tool-calling stream.
* **help (fallback)** — the original text-streaming path, unchanged:
  ``event: delta`` ``{"text"}`` per visible chunk (the suggestions marker is
  held back server-side).

Either way one terminal ``event: done`` ``{"answer", "suggestions"}`` is
authoritative — the same split as the plain endpoint — or ``event: error``
``{"msg"}``. ``: ping`` comments go out
while the model is silent (adaptive thinking precedes the first token).
Same gates as the plain endpoint — eligibility + per-user
``ONBOARDING_HELP_LIMIT``, all enforced BEFORE the stream opens; **404**
when the help chat or streaming is disabled (the app then falls back to
the request/response endpoint). No DB, no conversation claim — unlike the
CFO stream there is nothing to persist or lock, so a client disconnect
simply closes the upstream stream.

## Headers

- `authorization` string, nullable

## Cookies

- `access_token` string, nullable

## Request body

- OnboardingHelpRequest: A single help-chat turn. Onboarding is stateless, so the browser holds the whole conversation and replays it (``history``) alongside the new ``question`` and a compact, self-supplied ``draft_context`` (the user's own in-progress data — no company exists yet, so there is nothing cross-tenant to leak). Lengths are bounded to cap prompt tokens; ``history`` is additionally trimmed server-side to ``onboarding_help_history_messages``.
  - `step` string
  - `question` string, required
  - `history` OnboardingHelpMessage[]
    - `role` 'user' | 'assistant', required
    - `text` string, required
  - `draft_context` object, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zeno-works/apis/zeno-api.md) · [All operations](https://skmtc.dev/zeno-works/apis/zeno-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zeno-works/apis/zeno-api/revisions/1eb93dde146c?raw)
