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
| Method | Path | Auth | Notes |
|---|---|---|---|
GET | /api/state-machines/:slug/chats | Bearer (owner / admin) | Thread list (metadata only). |
GET | /api/state-machines/:slug/chats/full | Bearer (owner / admin) | All threads, including messages. |
PUT | /api/state-machines/:slug/chats | Bearer (owner / admin) | Bulk upsert { threads: [...] }. |
DELETE | /api/state-machines/:slug/chats/:threadKey | Bearer (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.