Skip to main content
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.
Some connectors let you select which resources to sync. v5 exposes this through two calls on the connector itself: read it with 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: picker for the hosted picker URL, syncs for recent sync runs, or syncs,picker for both
  • returnUrl: 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

The selection key depends on the provider:
  • GitHub: repos (repository ids)
  • Gmail: labels (label ids, for example INBOX)
  • Google Drive: files and folders (Drive ids)
You can send documentLimit in the same body. Each call must include selection, documentLimit, or both.

Response

The updated connector object, including the saved selection as { id, name } pairs.

Error Responses

  • 400: Connector does not support selection
  • 401: Unauthorized
  • 404: 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.

Example: GitHub repository selection

Here’s a complete example for GitHub: