v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01206322659.2 KB
connectors

`POST /orgs/{org_id}/connectors/{connector_id}/syncs`

Create a connector sync configuration.

post/orgs/{org_id}/connectors/{connector_id}/syncs

Path parameters

org_idstring required
connector_idstring required

Request body

dest_tablestring required

Destination table inside the KB. Created by the first run when it doesn't exist yet; when it does, existing_dest decides whether the sync continues it or rebuilds it.

existing_dest'adopt' | 'replace'

What to do when dest_table already holds data — typically because a one-off job extracted it and the sync is being added afterwards to keep it fresh.

initial_cursorobject nullable

Checkpoint to continue an existing dest_table from, overriding the one read off the table itself. Only valid when the table exists and existing_dest is adopt — for a table the sync still has to build, use start_cursor. Same shape as start_cursor.

interval_secsinteger required

Seconds between run starts. The scheduler ticks every 30s, so smaller values effectively mean "every tick".

kb_idinteger required

Target KB (numeric id, same as the /k2 routes).

key_columnsstring[] nullable

Ordered destination PRIMARY KEY columns. Omit for a keyless table. The first run declares the key; later runs then merge on it (upsert) so an upstream update — or a re-pulled boundary row from a non-unique cursor — overwrites in place instead of duplicating. Key columns are auto-added to a columns subset, so they only need to exist on the source table. Source these from the browse columns' pk_position.

namestring nullable

Operator label.

start_cursorobject nullable

Optional lower bound for the first run when it builds the table: only rows with cursor_column >= start_cursor are pulled (e.g. seed a timestamp to backfill "from last month on" instead of the whole table). Ignored on later runs — the advancing cursor takes over — and ignored when the sync adopts an existing table. Shape matches the job cursor (e.g. {"kind":"timestamp","value":"2026-06-01T00:00:00Z"}). Not valid on a full-refresh sync (no cursor_column to bound).

Response

Sync created

adopted_dest_tableboolean required

true when the sync continues an existing destination table instead of building it on the first run.

initial_cursorobject nullable

The checkpoint the first run resumes from when the destination was adopted; null otherwise (including an adopted table that was empty).

key_columnsstring[] required

Primary-key columns the sync will merge on. Inherited from an adopted table's own key when the request didn't declare one.

sync_idstring required