Integrations
Sync PostgreSQL Table
Start a sync for a connected table. After the first import, syncs only run when you start one, here or from the dashboard.
Request
Replace {id} in the path with the sync ID, shown on the table's Settings tab in the dashboard. No request body is needed.
Query ·optional
mode string
full or changes. Defaults to fullModes
| Mode | What it does |
|---|---|
| full | Re-imports every row and removes documents for deleted rows. |
| changes | Imports rows updated since the last sync. Deleted rows are kept. Runs a full sync if the table has no updated at column. |
Note: the API key needs write permission. If it's limited to certain databases, they must include the one this table syncs into.
Response
Returns 202 with an empty body. The sync runs in the background, and you can follow its progress on the table's page in the dashboard.
Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key. |
| 403 | The key can't write, or can't access this table's database. |
| 404 | No sync with this ID. |
| 429 | A sync is running, or one started less than a minute ago. |
When to Sync
- From a cron job, for example every hour.
- At the end of a script that writes to the table.
- After a deploy or a bulk import.
Starting a sync while one is running, or less than a minute after the last one, returns 429, so you don't need to guard against calling it too often.