> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timbal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Connector Sync

> Create a connector sync configuration.



## OpenAPI

````yaml POST /orgs/{org_id}/connectors/{connector_id}/syncs
openapi: 3.1.0
info:
  title: Timbal Platform API
  description: Public API documentation for the Timbal platform
  license:
    name: ''
  version: 2.0.0
servers:
  - url: https://api.timbal.ai
    description: Production
  - url: https://api.dev.timbal.ai
    description: Development
security: []
tags:
  - name: ace
    description: Action Control Engine (ACE) operations
  - name: analytics
    description: Project analytics
  - name: billing
    description: Subscriptions, usage, and payment-related operations
  - name: content
    description: Re-sign stored content URLs
  - name: files
    description: File operations
  - name: iam
    description: IAM — actions, roles, users, and authorization introspection
  - name: k2
    description: Knowledge Bases v2 operations
  - name: orgs
    description: Organization operations
  - name: projects
    description: Project operations
  - name: runs
    description: Execution operations
  - name: templates
    description: Public project template catalog
  - name: users
    description: Authenticated user profile
paths:
  /orgs/{org_id}/connectors/{connector_id}/syncs:
    post:
      tags:
        - connectors
      summary: '`POST /orgs/{org_id}/connectors/{connector_id}/syncs`'
      description: Create a connector sync configuration.
      operationId: create
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
        - name: connector_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSyncReq'
        required: true
      responses:
        '201':
          description: Sync created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSyncRes'
        '400':
          description: Invalid request
        '403':
          description: Forbidden
        '404':
          description: Connector or KB not found
        '422':
          description: Source unsupported by connector
      security:
        - bearer_auth: []
components:
  schemas:
    CreateSyncReq:
      type: object
      required:
        - kb_id
        - dest_table
        - source
        - interval_secs
      properties:
        dest_table:
          type: string
          description: |-
            Destination table inside the KB. Must not pre-exist: the first run
            creates it, later runs append.
        interval_secs:
          type: integer
          format: int64
          description: >-
            Seconds between run *starts*. The scheduler ticks every 30s, so
            smaller

            values effectively mean "every tick".
        kb_id:
          type: integer
          format: int64
          description: Target KB (numeric id, same as the `/k2` routes).
        name:
          type:
            - string
            - 'null'
          description: Operator label.
        source:
          $ref: '#/components/schemas/SourceBody'
    CreateSyncRes:
      type: object
      required:
        - sync_id
      properties:
        sync_id:
          type: string
    SourceBody:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/RelationalSourceBody'
            - type: object
              required:
                - kind
              properties:
                kind:
                  type: string
                  enum:
                    - postgres
        - allOf:
            - $ref: '#/components/schemas/RelationalSourceBody'
            - type: object
              required:
                - kind
              properties:
                kind:
                  type: string
                  enum:
                    - sql_server
      description: >-
        The source half of a dispatch, tagged by `kind`. Each variant maps to a

        `SourceSpec` and gates on the connector advertising the matching

        `source:<kind>` capability. Request shape:

        `"source": { "kind": "sql_server", "connection_ref": "...", "table":
        "...", "cursor_column": "..." }`.
    RelationalSourceBody:
      type: object
      description: |-
        Shared shape for the relational sources (Postgres, SQL Server). `schema`
        defaults per-source (`public` / `dbo`).
      required:
        - connection_ref
        - table
        - cursor_column
      properties:
        columns:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Projection; omit for all columns.
        connection_ref:
          type: string
          description: |-
            Name of a connection in the connector's local `connections.json`.
            The DSN itself never leaves the connector box.
        cursor_column:
          type: string
          description: >-
            Monotonic column for incremental extraction (`id`, `updated_at`,
            ...).
        schema:
          type:
            - string
            - 'null'
          description: Source schema; defaults to `public` (Postgres) / `dbo` (SQL Server).
        table:
          type: string
          description: Source table to extract.
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: >-
        Timbal API key. Obtain your API key from the Timbal platform settings.
        See [Authentication](/api-reference/authentication) for more
        information.

````