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.
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?string|nullmessageId?string|nulltoolCallId?string|nulljobId?string|nullrevertId?string|nullSuccess
application/json- response
data*curl -X GET 'https://api.snoze.dev/v1/workspaces/string/agent/edits'{ "data": { "calls": [ { "toolCallId": "string", "operation": "string", "chatId": "string", "messageId": "string", "jobId": "string", "at": "string", "changes": [ { "id": "string", "subject": { "kind": "record", "id": "string", "databaseId": "string", "label": "string" }, "action": "created", "state": "revertible", "fields": [ "string" ], "reason": "string", "conflict": { "by": "string", "at": "string", "fields": [ "string" ] }, "at": "string" } ] } ], "counts": { "total": 0, "revertible": 0, "conflict": 0, "reverted": 0, "unsupported": 0, "failed": 0 }, "truncated": true }}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.
Undo what the assistant changed
Reverts the changes a selector names, newest first, by applying each one's inverse through the ordinary write it would take by hand, so permissions, validation and the workspace ledger apply as for any edit; the writes are the caller's and are tagged with the returned `revertId`. One conflict refuses the whole revert (`blocked`, nothing changes) unless `skipConflicts` is true, which leaves the conflicting changes as they are. Changes already reverted are left alone, so repeating a revert is a no-op that reports them as reverted. Reverting with the selector `{ revertId }` undoes that revert (redo). Send an `Idempotency-Key` header to make a retried request replay its first result. Requires a Clerk session for a workspace member with the `ai:write` permission, plus the permissions each underlying write needs.