---
title: "Create sync"
method: POST
path: "/syncs"
tags: ["Syncs"]
---

# Create sync

`POST /syncs`

## Request

- Base URL: `https://api.chift.eu`
- URL: `https://api.chift.eu/syncs`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/chift/apis/chift-api/docs/syncs/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new sync with the provided configuration and returns the created sync object. Given only a `module`, adds that agentic sync to the account, or returns it when the account has it.

## Request body

- union
  - CreateSyncItem
    - `name` string, required
    - `config` object, nullable
    - `connections` SyncsConnectionItem[], required
      - `one_api` integer, nullable
      - `connection_type` integer, nullable
      - `display_order` integer
      - `display_hidden` boolean
    - `mappings` CreateSyncMappingItemInput[]
      - `name` string, required
      - `description` string, nullable
      - `display_order` integer
      - `challenge_question` string, nullable
      - `conditions` object, nullable
      - `sub_mappings` CreateSyncMappingToFieldItemInput[]
        - `name` string, required
        - `description` string, nullable
        - `display_order` integer
        - `challenge_question` string, nullable
        - `conditions` object, nullable
        - `source_field` FieldItem, required
          - `name` string, required
          - `type` 'fixed' | 'api', required
          - `display_condition` object, nullable
          - `values` FieldItemValue[], nullable
            - `id` string, required
            - `label` string, required
          - `api_route` string, nullable
          - `connection_type` integer, nullable
        - `target_field` FieldItem, required
          - `name` string, required
          - `type` 'fixed' | 'api', required
          - `display_condition` object, nullable
          - `values` FieldItemValue[], nullable
            - `id` string, required
            - `label` string, required
          - `api_route` string, nullable
          - `connection_type` integer, nullable
        - `display_delete` boolean
        - `logic` object, nullable
        - `manual_mapping` boolean
    - `flows` CreateFlowItem[]
      - `name` string, required
      - `description` string, nullable
      - `execution` FlowExecution, required
        - `type` 'code' | 'module', required
        - `data` union, required
          - FlowExecutionChain
            - `name` string, required
          - FlowExecutionCode
            - `code` string, required
      - `config` FlowConfigInput
        - `definitionFields` object[], nullable
        - `doorkeyFields` object[], nullable
        - `customFields` object[], nullable
        - `datastores` FlowDataStoreItemInput[], nullable
          - `id` string, nullable
          - `name` string, required
          - `status` 'active' | 'inactive'
          - `definition` DatastoreDef, required
            - `columns` DatastoreColumn[], required
              - …
            - `search_column` string, nullable: Column name that will be indexed and used in search if any.
      - `triggers` FlowTrigger[], required
        - `id` string, required
        - `type` 'timer' | 'event', required
        - `cronschedules` string[], nullable
        - `visible` boolean, nullable
        - `definitionFields` object[], nullable
        - `options` object, nullable
        - `priority` 'NORMAL' | 'MEDIUM' | 'HIGH'
  - CreateAgenticSyncItem
    - `module` string, required: The agentic sync to add to the account.

## Response `200`

Successful Response

- ReadSyncItem
  - `name` string, required
  - `config` object, nullable
  - `connections` SyncsConnectionItem[], required
    - `one_api` integer, nullable
    - `connection_type` integer, nullable
    - `display_order` integer
    - `display_hidden` boolean
  - `mappings` CreateSyncMappingItemOutput[]
    - `name` string, required
    - `description` string, nullable
    - `display_order` integer
    - `challenge_question` string, nullable
    - `conditions` object, nullable
    - `sub_mappings` CreateSyncMappingToFieldItemOutput[]
      - `name` string, required
      - `description` string, nullable
      - `display_order` integer
      - `challenge_question` string, nullable
      - `conditions` object, nullable
      - `source_field` FieldItem, required
        - `name` string, required
        - `type` 'fixed' | 'api', required
        - `display_condition` object, nullable
        - `values` FieldItemValue[], nullable
          - `id` string, required
          - `label` string, required
        - `api_route` string, nullable
        - `connection_type` integer, nullable
      - `target_field` FieldItem, required
        - `name` string, required
        - `type` 'fixed' | 'api', required
        - `display_condition` object, nullable
        - `values` FieldItemValue[], nullable
          - `id` string, required
          - `label` string, required
        - `api_route` string, nullable
        - `connection_type` integer, nullable
      - `display_delete` boolean
      - `logic` object, nullable
      - `manual_mapping` boolean
  - `syncid` string, uuid, required
  - `consumers` string[], required
  - `flows` ReadFlowItem[], required
    - `name` string, required
    - `description` string, nullable
    - `id` string, required
    - `execution` FlowExecution
      - `type` 'code' | 'module', required
      - `data` union, required
        - FlowExecutionChain
          - `name` string, required
        - FlowExecutionCode
          - `code` string, required
    - `config` FlowConfigOutput
      - `definitionFields` object[], nullable
      - `doorkeyFields` object[], nullable
      - `customFields` object[], nullable
      - `datastores` FlowDataStoreItemOutput[], nullable
        - `id` string, nullable
        - `name` string, required
        - `status` 'active' | 'inactive'
        - `definition` DatastoreDef, required
          - `columns` DatastoreColumn[], required
            - `name` string, required
            - `title` string, required
            - `type` string, required
            - `optional` boolean, nullable
          - `search_column` string, nullable: Column name that will be indexed and used in search if any.
    - `triggers` FlowTrigger[], nullable
      - `id` string, required
      - `type` 'timer' | 'event', required
      - `cronschedules` string[], nullable
      - `visible` boolean, nullable
      - `definitionFields` object[], nullable
      - `options` object, nullable
      - `priority` 'NORMAL' | 'MEDIUM' | 'HIGH'
  - `module` string, nullable: The agentic sync it is, e.g. 'spend_to_accounting': set it up with the agentic routes. Null for a sync defined by its flows.
  - `object_kinds` ObjectKindItem[], nullable: The types of object an agentic sync handles, in the order it books them. Null for a sync defined by its flows.
    - `kind` string, required: The object's type, e.g. 'supplier_invoice'. List its objects with `GET /consumers/{cid}/syncs/{syncid}/objects/{kind}`.
    - `capability` string, required: Key of the capability that handles them.

## Other responses

- `404`: Not Found
- `422`: Validation Error

## Changes

- **2026-11-03** `020884969534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/chift/apis/chift-api/changes/syncs/post.md)

---

[API](https://skmtc.dev/chift/apis/chift-api.md) - [All operations](https://skmtc.dev/chift/apis/chift-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chift/apis/chift-api/revisions/020884969534?raw)
