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

# Trigger

> Starts a sync for the company's active connection.



## OpenAPI

````yaml /openapi_v4_core.json post /v4/core/companies/{companyId}/syncs
openapi: 3.0.0
info:
  title: Commenda Integrations V4 API
  description: Commenda Integrations — unified accounting, commerce, and CRM API.
  version: 4.0.0
  contact: {}
servers:
  - url: https://api.integrations.commenda.io
    description: Production
security:
  - api_key: []
tags: []
paths:
  /v4/core/companies/{companyId}/syncs:
    post:
      tags:
        - Syncs
      summary: Trigger
      description: Starts a sync for the company's active connection.
      operationId: SyncController_initSync
      parameters:
        - name: companyId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitSyncBodyDTO'
      responses:
        '201':
          description: The sync that was started.
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/InitSyncResponse'
                  request_id:
                    type: string
                    format: uuid
                required:
                  - data
                  - request_id
      security:
        - api_key: []
components:
  schemas:
    InitSyncBodyDTO:
      type: object
      properties:
        dataModelsToSync:
          description: >-
            Limit the sync to specific data models. Omit to sync all configured
            models.
          type: array
          items:
            $ref: '#/components/schemas/DataModelSyncConfig'
        fullSync:
          type: boolean
          example: false
        isManualSync:
          type: boolean
          example: true
        notifyAllSyncedRecords:
          type: boolean
          example: false
          description: Fire update webhooks for records that were fetched but unchanged.
    InitSyncResponse:
      type: object
      properties:
        sync:
          $ref: '#/components/schemas/InitSyncResult'
      required:
        - sync
    DataModelSyncConfig:
      type: object
      properties:
        dataModel:
          type: string
          enum:
            - ACCOUNT
            - BALANCE_SHEET
            - BANK_ACCOUNT
            - BANK_TRANSACTION
            - BILL
            - BILL_CREDIT_NOTE
            - BILL_PAYMENT
            - CASH_FLOW_STATEMENT
            - COMPANY_INFO
            - CONTACT
            - CURRENCY
            - DOCUMENT
            - EXPENSE
            - GOODS_RECEIPT_NOTE
            - INCOME_STATEMENT
            - INVOICE
            - INVOICE_CREDIT_NOTE
            - INVOICE_PAYMENT
            - ITEM
            - JOURNAL_ENTRY
            - JOURNAL_LINE
            - PROJECT
            - PURCHASE_ORDER
            - SALES_ORDER
            - ESTIMATE
            - TAX_RATE
            - TRACKING_CATEGORY
            - CASH_SALE
            - CASH_REFUND
            - BALANCE
            - DISPUTE
            - ORDER
            - PAYOUT
            - SUBSCRIPTION
            - TRANSACTION
            - EVENT
            - FULFILLMENT
            - INVENTORY
            - COMPANY
            - LEAD
            - OPPORTUNITY
            - PIPELINE
            - PIPELINE_STAGE
            - NOTE
            - TASK
            - OWNER
            - ENGAGEMENT
            - ADDRESS
            - EXTERNAL_LINK
            - LINE_ITEM
            - PHONE_NUMBER
            - VARIANT
        category:
          type: string
          enum:
            - ACCOUNTING
            - PAYMENTS
            - ECOMMERCE
            - CRM
            - HRIS
        enabled:
          type: boolean
        scopeAccess:
          $ref: '#/components/schemas/ScopeAccess'
        frequency:
          type: string
          enum:
            - WEEKLY
            - MONTHLY
            - YEARLY
            - DAILY
            - HOURLY
            - NEVER
        interval:
          type: number
        syncFrom:
          type: object
          nullable: true
        isOverridden:
          type: boolean
        isChild:
          type: boolean
      required:
        - dataModel
        - category
        - enabled
        - scopeAccess
        - frequency
        - interval
        - syncFrom
        - isOverridden
        - isChild
    InitSyncResult:
      type: object
      properties:
        id:
          type: string
        dataModelsSyncing:
          type: array
          items:
            type: string
            enum:
              - ACCOUNT
              - BALANCE_SHEET
              - BANK_ACCOUNT
              - BANK_TRANSACTION
              - BILL
              - BILL_CREDIT_NOTE
              - BILL_PAYMENT
              - CASH_FLOW_STATEMENT
              - COMPANY_INFO
              - CONTACT
              - CURRENCY
              - DOCUMENT
              - EXPENSE
              - GOODS_RECEIPT_NOTE
              - INCOME_STATEMENT
              - INVOICE
              - INVOICE_CREDIT_NOTE
              - INVOICE_PAYMENT
              - ITEM
              - JOURNAL_ENTRY
              - JOURNAL_LINE
              - PROJECT
              - PURCHASE_ORDER
              - SALES_ORDER
              - ESTIMATE
              - TAX_RATE
              - TRACKING_CATEGORY
              - CASH_SALE
              - CASH_REFUND
              - BALANCE
              - DISPUTE
              - ORDER
              - PAYOUT
              - SUBSCRIPTION
              - TRANSACTION
              - EVENT
              - FULFILLMENT
              - INVENTORY
              - COMPANY
              - LEAD
              - OPPORTUNITY
              - PIPELINE
              - PIPELINE_STAGE
              - NOTE
              - TASK
              - OWNER
              - ENGAGEMENT
              - ADDRESS
              - EXTERNAL_LINK
              - LINE_ITEM
              - PHONE_NUMBER
              - VARIANT
      required:
        - id
        - dataModelsSyncing
    ScopeAccess:
      type: object
      properties:
        READ:
          type: boolean
        CREATE:
          type: boolean
        UPDATE:
          type: boolean
        DELETE:
          type: boolean
      required:
        - READ
        - CREATE
        - UPDATE
        - DELETE
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key
      description: Your Commenda Integrations API key, sent in the `api_key` header.

````