SnozeDevelopers
API referenceRag

Replace the retrieval sources selected for a chat

Overwrites the chat's entire selection set with the sources in the body and returns what was stored; an empty list means retrieval falls back to the whole workspace. Requires a workspace member with the `ai:write` permission, and an unknown chat is reported as not found. Naturally idempotent: sending the same set again leaves the selection unchanged.

PUT
/v1/workspaces/{workspaceId}/rag/chats/{chatId}/sources

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string
chatId*string

Request Body

application/json
  1. body
sources*array<>

Response Body

Success

application/json
  1. response
data*array<>
Example Request
curl -X PUT 'https://api.snoze.dev/v1/workspaces/string/rag/chats/string/sources' \  -H 'Content-Type: application/json' \  -d '{  "sources": [    {      "sourceKind": "page",      "sourceId": "string"    }  ]}'
Example Response
{  "data": [    {      "sourceKind": "page",      "sourceId": "string"    }  ]}