跳至主要内容

Machine Chats — /api/state-machines/:slug/chats*

Pulse conversations are the machine's property, not the browser's. Threads are persisted server-side, bound to your state machine and optionally to one app (page_slug) on it, so they survive devices, browsers and cache clears. One thread per app is the canonical model — opening an app's chat resumes exactly where it left off.

Concept: Pulse · State machines. Source: shared/api-core/src/routes/machineChats.ts.

Endpoints

MethodPathAuthNotes
GET/api/state-machines/:slug/chatsBearer (owner / admin)Thread list (metadata only).
GET/api/state-machines/:slug/chats/fullBearer (owner / admin)All threads, including messages.
PUT/api/state-machines/:slug/chatsBearer (owner / admin)Bulk upsert { threads: [...] }.
DELETE/api/state-machines/:slug/chats/:threadKeyBearer (owner / admin)Delete one thread.

Access is gated to the machine's owner (or an admin) — chats are scoped to the machine that owns them.