Siphondocs
Guides

REST API quickstart

Drive Siphon from your own backend — list connections, trigger syncs, and poll runs with a runnable example.

Every /api/v1 endpoint is authenticated with a Siphon API key. Mint one in the app under Settings → API keys, then send it as a bearer token:

curl https://your-siphon.app/api/v1/connections \
  -H "Authorization: Bearer ck_your_key"

The runnable example

examples/api-quickstart/main.mjs in the repo is a dependency-free tour: it lists your connections, shows a connection's recent runs, triggers a sync, and polls the run to completion — the exact calls your backend would make.

SIPHON_API_KEY=ck_your_key node examples/api-quickstart/main.mjs

Options (env): SIPHON_BASE_URL (default http://localhost:3100), SIPHON_CONNECTION_ID, SIPHON_RESOURCE, and SIPHON_NO_SYNC=1 to list only.

The core calls

CallEndpoint
List connectionsGET /api/v1/connections
Recent runsGET /api/v1/runs?connectionId=<id>
Trigger a syncPOST /api/v1/connections/<id>/sync — body { "resource": "<key>" }
Run status + statsGET /api/v1/runs/<id>

A triggered sync returns 202 immediately; poll GET /api/v1/runs/<id> until its status is succeeded, partial, or failed. The run's statsJson carries recordsIn, recordsOut, skipped, and deleted.

Keep the key server-side

An API key is org-scoped and long-lived — never ship it to a browser. For customer-facing UI, mint a short-lived embed token instead.

On this page