API reference / Collectors
7 operations.
/api/v1/assistantWhether the assistant is configured on this deployment, and the caller’s plan (which sets how much it may answer).
collector.getAssistantStatus()assistant:use(API keys are coming soon)If-None-MatchX-Request-Idobject
configuredbooleanrequiredThe assistant can answer on this deployment.
planenumrequiredOne offreecollectorpro
unauthorized: Not signed in (no session or token, or an expired one).
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/assistant' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.getAssistantStatus();/api/v1/assistantSend the newest message only (a new user message, or the last assistant message carrying approval decisions); the history lives on the server. Answers an AI SDK 7 UI message stream (text/event-stream). Errors before streaming are problem+json.
collector.chatWithAssistant()assistant:use(API keys are coming soon)X-Request-Idobject
threadIdstring (uuid)requiredmessageobjectrequiredidstringrequiredroleenumrequiredOne ofuserassistant
partsarray of anyrequiredat most 400 itemstriggerenumoptionalOne ofsubmit-messageregenerate-message
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
unauthorized: Not signed in (no session or token, or an expired one).
ai_budget_exhausted: The plan’s AI budget for the month is used up.
thread_out_of_date: The conversation changed elsewhere; reload it.
change_already_made: That proposed change was already approved.
turn_in_progress: One turn per collector at a time.
rate_limited: Too many messages; slow down.
internal: Something went wrong on our side (quote the requestId).
assistant_not_configured: The assistant isn’t set up here.
curl -X POST 'https://collection.id/api/v1/assistant' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.chatWithAssistant({ body: { … } });/api/v1/assistant/previewExactly what an approval card’s change would do, from live data, by the same code that runs it after approval. Read-only; uses no AI.
collector.previewAssistantChange()assistant:use(API keys are coming soon)X-Request-Idobject
toolstringrequiredaddToCollection, addToWishlist, updateItems or requestHold.
inputanyrequiredThe tool call’s input, as the assistant proposed it.
object
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
invalid_tool: Only proposed changes have previews.
unauthorized: Not signed in (no session or token, or an expired one).
rate_limited: Too many previews at once.
internal: Something went wrong on our side (quote the requestId).
curl -X POST 'https://collection.id/api/v1/assistant/preview' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.previewAssistantChange({ body: { … } });/api/v1/assistant/threadsNewest activity first. Page with ?before=<nextCursor>.
collector.listAssistantThreads()assistant:use(API keys are coming soon)If-None-MatchX-Request-Id| Name | In | Type | About |
|---|---|---|---|
limitoptional | query | integer | 1–100 · default 50 |
beforeoptional | query | string (date-time) | The previous page’s nextCursor. |
object
Newest activity first.
nextCursorstring (date-time) or nullrequiredinvalid_request: The query or body doesn’t match the schema (see errors[]).
unauthorized: Not signed in (no session or token, or an expired one).
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/assistant/threads' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.listAssistantThreads({ query: { … } });/api/v1/assistant/threads/{id}The conversation with its newest messages, oldest first.
collector.getAssistantThread()assistant:use(API keys are coming soon)If-None-MatchX-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
A conversation with its messages.
messagesarray of objectrequiredThe newest messages, oldest first.
idstringrequiredroleenumrequiredOne ofsystemuserassistant
metadataanyoptional{ createdAt }: when the server created the message.
partsarray of anyrequiredhasEarlierbooleanoptionalOlder messages exist that weren’t loaded.
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
thread_not_found: No such conversation of yours.
internal: Something went wrong on our side (quote the requestId).
curl 'https://collection.id/api/v1/assistant/threads/<id>' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.getAssistantThread({ path: { id } });/api/v1/assistant/threads/{id}Its messages go with it.
collector.deleteAssistantThread()assistant:use(API keys are coming soon)X-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
ok"true"requiredunauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
internal: Something went wrong on our side (quote the requestId).
curl -X DELETE 'https://collection.id/api/v1/assistant/threads/<id>' \
-H "Authorization: Bearer $COLLECTOR_TOKEN"await collector.deleteAssistantThread({ path: { id } });/api/v1/assistant/threads/{id}Change a conversation’s title, its pin, or both. Send at least one.
collector.updateAssistantThread()assistant:use(API keys are coming soon)X-Request-Id| Name | In | Type | About |
|---|---|---|---|
idrequired | path | string (uuid) |
object
titlestringoptional1–200 characterspinnedbooleanoptionalobject
invalid_request: The query or body doesn’t match the schema (see errors[]).
invalid_json: The body isn’t JSON.
unauthorized: Not signed in (no session or token, or an expired one).
not_found: Nothing at that address.
thread_not_found: No such conversation of yours.
internal: Something went wrong on our side (quote the requestId).
curl -X PATCH 'https://collection.id/api/v1/assistant/threads/<id>' \
-H "Authorization: Bearer $COLLECTOR_TOKEN" \
-H 'Content-Type: application/json' \
-d @body.jsonawait collector.updateAssistantThread({ path: { id }, body: { … } });