Selectable connectors: GitHub (repositories), Gmail (labels) and Google Drive (files and folders) let you choose what to sync. Other connectors sync everything and return
selection: null.include: "picker" to get a hosted picker URL, or send the ids directly with connectors.update.
Open the Hosted Picker
GET /ns/{namespace}/connectors/{id}?include=picker
Returns a one-time picker URL. Send the user there; Supermemory lists their resources, saves the selection and starts a sync. Pass returnUrl to choose where the picker sends the user when they finish.
Query parameters
include:pickerfor the hosted picker URL,syncsfor recent sync runs, orsyncs,pickerfor bothreturnUrl: Optional. Where the hosted picker sends the user when they finish
Response
The picker link works once, in any browser.
picker is null for providers that do not support selection. A Google Drive connector with full-drive sync can still open the picker; saving a selection switches it to scoped sync. Because the link changes what syncs, include=picker needs an admin key with write access to the namespace; otherwise the request returns 403.Set the Selection Directly
PATCH /ns/{namespace}/connectors/{id}
Send the ids to sync, grouped by kind. The new selection replaces the current one and starts a sync. Webhooks are registered for the selected resources.
Request body
- GitHub:
repos(repository ids) - Gmail:
labels(label ids, for exampleINBOX) - Google Drive:
filesandfolders(Drive ids)
documentLimit in the same body. Each call must include selection, documentLimit, or both.
Response
The updated connector object, including the savedselection as { id, name } pairs.
Error Responses
400: Connector does not support selection, the selection is empty or has unknown ids, or the connector needs to be reconnected401: Unauthorized403: The key lacks admin role or write access to the connector’s namespaces404: Connector not found409: Connector is still waiting for the user to finish authorizing
Automatic Sync: After a selection is saved, a sync starts for the connector. You don’t need to call
connectors.sync afterwards.