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.mjsOptions (env): SIPHON_BASE_URL (default http://localhost:3100),
SIPHON_CONNECTION_ID, SIPHON_RESOURCE, and SIPHON_NO_SYNC=1 to list only.
The core calls
| Call | Endpoint |
|---|---|
| List connections | GET /api/v1/connections |
| Recent runs | GET /api/v1/runs?connectionId=<id> |
| Trigger a sync | POST /api/v1/connections/<id>/sync — body { "resource": "<key>" } |
| Run status + stats | GET /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.