Branch an agent chat from a message
Creates a new chat seeded from the source chat's history: branching from a user message copies everything before it and returns that message's text as `seed` to re-run, while branching from an assistant message copies through it. An optional `model` overrides the branch's model. Requires a Clerk session for a workspace member with the `ai:write` permission and the `ai.agent.enabled` control switched on; an unknown chat or message is reported as not found.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringchatId*stringapplication/json- body
fromMessageId*stringmodel?string|nullSuccess
application/json- response
data*curl -X POST 'https://api.snoze.dev/v1/workspaces/string/agent/chats/string/branch' \ -H 'Content-Type: application/json' \ -d '{ "fromMessageId": "string"}'{ "data": { "chat": { "id": "string", "workspaceId": "string", "title": "string", "parentSessionId": "string", "model": "string", "appearance": { "shape": "box", "color": "string", "accentColor": "string", "eyes": "dot", "eyePlacement": "centered", "motion": "still", "finish": "flat", "gradientColor": "string", "glowColor": "string", "intensity": "subtle", "cosmetics": { "head": "none", "face": "none" } }, "status": "idle", "runningMessageId": "string", "streamIdentity": { "turnId": "string", "messageId": "string" }, "lastError": "string", "background": { "enabled": true, "continuations": 0, "deadlineAt": 0 }, "createdAt": "string", "updatedAt": "string" }, "seed": "string", "seedAttachments": [ { "fileId": "string", "name": "string", "mediaType": "string", "url": "string" } ] }}Read the staged set of a bulk assistant write
A set-based assistant write (updating every record a filter matches, or importing rows) stages the exact records it will change before it runs; the approval card shows a sample and this pages through all of them, in staging order, with each record's field-level before and after values. The set is immutable: it is what the approved call runs. `offset` (default 0) and `limit` (1-200, default 50) select the page; `nextOffset` is present while more rows follow. Requires a Clerk session for a workspace member with the `ai:read` permission who owns the chat; an unknown chat, message, or a call that staged nothing is reported as not found.
List what the assistant changed
The workspace changes one assistant response, tool call, background job or earlier revert made, read from the workspace ledger and grouped per tool call (newest first), each with whether it can be undone now: `revertible`, `conflict` (someone changed the same thing afterwards; the reason says who, when and which fields), `reverted`, or `unsupported` (it happened outside Snoze, or nothing recorded what it replaced). Name exactly one of `chatId` (narrowed by `messageId` and `toolCallId`), `jobId` or `revertId`. A chat must be the caller's own (workspace administrators may read any); job and revert writes are listed when they were made for the caller. Requires a Clerk session for a workspace member with the `ai:read` permission.