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 connectors that sync everything.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 selection401: Unauthorized404: Connector not found
Automatic Sync: After a selection is saved, a sync starts for the connector. You don’t need to call
connectors.sync afterwards.