Connectors

Build third-party data integrations with defineConnector — streams, webhooks, and connection setup.

A connector is a special kind of extension whose primary job is pulling data from an external system (Stripe, Shopify, your bank’s API) and emitting it as canonical Backfill entities. Connectors share the file/folder conventions of plain extensions but use a different manifest entry point — defineConnector — and a connector-specific runtime helper, ingest.

Read in order:

  1. Overview — when to use defineConnector vs defineExtension.
  2. Streamspoll vs webhook modes, scheduling, checkpoints.
  3. Webhooks — receiving events from the source system.
  4. Connection setuptestConnection, setup instructions, webhook URL templates.
  5. OAuth — host-managed authorization-code flows, runtime tokens, and OAuth test fixtures.
  6. Settings schema — JSON-Schema-driven connection configuration with secret fields.
  7. Sync routes — the src/api/sync/<stream>.ts contract and ingest.canonical.
  8. Testing — local route tests with @backfill-io/sdk/testing.