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.

POST/postgres/{id}/sync

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 full

Modes

ModeWhat it does
fullRe-imports every row and removes documents for deleted rows.
changesImports 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

StatusMeaning
401Missing or invalid API key.
403The key can't write, or can't access this table's database.
404No sync with this ID.
429A 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.