---
title: "Create a connection"
method: POST
path: "/connections"
tags: ["public_connections", "public", "Connections"]
---

# Create a connection

`POST /connections`

## Request body

- ConnectionCreateRequest
  - `name` string — Optional name of the connection
  - `sourceId` string, uuid, required
  - `destinationId` string, uuid, required
  - `configurations` StreamConfigurations — A list of configured stream options for a connection.
    - `streams` StreamConfiguration[]
      - `name` string, required
      - `namespace` string — Namespace of the stream.
      - `syncMode` 'full_refresh_overwrite' | 'full_refresh_overwrite_deduped' | 'full_refresh_append' | 'full_refresh_update' | 'full_refresh_soft_delete' | 'incremental_append' | 'incremental_deduped_history' | 'incremental_update' | 'incremental_soft_delete'
      - `cursorField` string[] — Path to the field that will be used to determine if a record is new or modified since the last sync. This field is REQUIRED if `sync_mode` is `incremental` unless there is a default.
      - `primaryKey` array[] — Paths to the fields that will be used as primary key. This field is REQUIRED if `destination_sync_mode` is `*_dedup` unless it is already supplied by the source schema.
        - string[]
      - `includeFiles` boolean — Whether to move raw files from the source to the destination during the sync.
      - `destinationObjectName` string — The name of the destination object that this stream will be written to, used for data activation destinations.
      - `selectedFields` SelectedFieldInfo[] — Paths to the fields that will be included in the configured catalog.
        - `fieldPath` string[]
      - `mappers` ConfiguredStreamMapper[] — Mappers that should be applied to the stream before writing to the destination.
        - `id` string, uuid
        - `type` 'hashing' | 'field-renaming' | 'row-filtering' | 'encryption' | 'field-filtering', required
        - `mapperConfiguration` union, required — The values required to configure the mapper.
          - object
            - `fieldNameSuffix` string, required — The suffix to append to the field name after hashing.
            - `method` 'MD2' | 'MD5' | 'SHA-1' | 'SHA-224' | 'SHA-256' | 'SHA-384' | 'SHA-512', required — The hashing algorithm to use.
            - `targetField` string, required — The name of the field to be hashed.
          - object
            - `targetField` string, required — The name of the field to filter.
          - object
            - `newFieldName` string, required — The new name for the field after renaming.
            - `originalFieldName` string, required — The current name of the field to rename.
          - object
            - `conditions` union, required
              - …
          - object
            - `algorithm` 'RSA' | 'AES', required
            - `fieldNameSuffix` string, required
            - `publicKey` string, required
            - `targetField` string, required
          - object
            - `algorithm` 'RSA' | 'AES', required
            - `fieldNameSuffix` string, required
            - `key` string, required
            - `mode` 'CBC' | 'CFB' | 'OFB' | 'CTR' | 'GCM' | 'ECB', required
            - `padding` 'NoPadding' | 'PKCS5Padding', required
            - `targetField` string, required
  - `schedule` AirbyteApiConnectionSchedule — schedule for when the the connection should run, per the schedule type
    - `scheduleType` 'manual' | 'cron', required
    - `cronExpression` string
  - `dataResidency` string
  - `namespaceDefinition` 'source' | 'destination' | 'custom_format' — Define the location where the data will be stored in the destination
  - `namespaceFormat` string — Used when namespaceDefinition is 'custom_format'. If blank then behaves like namespaceDefinition = 'destination'. If "${SOURCE_NAMESPACE}" then behaves like namespaceDefinition = 'source'.
  - `prefix` string — Prefix that will be prepended to the name of each stream when it is written to the destination (ex. “airbyte_” causes “projects” => “airbyte_projects”).
  - `nonBreakingSchemaUpdatesBehavior` 'ignore' | 'disable_connection' | 'propagate_columns' | 'propagate_fully' — Set how Airbyte handles syncs when it detects a non-breaking schema change in the source
  - `status` 'active' | 'inactive' | 'deprecated' | 'locked'
  - `tags` Tag[]
    - `tagId` string, uuid, required
    - `workspaceId` string, uuid, required
    - `name` string, required
    - `color` string, required

## Response `200`

Successful operation

- ConnectionResponse — Provides details of a single connection.
  - `connectionId` string, UUID, required
  - `name` string, required
  - `sourceId` string, UUID, required
  - `destinationId` string, UUID, required
  - `workspaceId` string, UUID, required
  - `status` 'active' | 'inactive' | 'deprecated' | 'locked', required
  - `schedule` ConnectionScheduleResponse, required — schedule for when the the connection should run, per the schedule type
    - `scheduleType` 'manual' | 'cron' | 'basic', required
    - `cronExpression` string
    - `basicTiming` string
  - `nonBreakingSchemaUpdatesBehavior` 'ignore' | 'disable_connection' | 'propagate_columns' | 'propagate_fully' — Set how Airbyte handles syncs when it detects a non-breaking schema change in the source
  - `namespaceDefinition` 'source' | 'destination' | 'custom_format' — Define the location where the data will be stored in the destination
  - `namespaceFormat` string
  - `prefix` string
  - `configurations` StreamConfigurations, required — A list of configured stream options for a connection.
    - `streams` StreamConfiguration[]
      - `name` string, required
      - `namespace` string — Namespace of the stream.
      - `syncMode` 'full_refresh_overwrite' | 'full_refresh_overwrite_deduped' | 'full_refresh_append' | 'full_refresh_update' | 'full_refresh_soft_delete' | 'incremental_append' | 'incremental_deduped_history' | 'incremental_update' | 'incremental_soft_delete'
      - `cursorField` string[] — Path to the field that will be used to determine if a record is new or modified since the last sync. This field is REQUIRED if `sync_mode` is `incremental` unless there is a default.
      - `primaryKey` array[] — Paths to the fields that will be used as primary key. This field is REQUIRED if `destination_sync_mode` is `*_dedup` unless it is already supplied by the source schema.
        - string[]
      - `includeFiles` boolean — Whether to move raw files from the source to the destination during the sync.
      - `destinationObjectName` string — The name of the destination object that this stream will be written to, used for data activation destinations.
      - `selectedFields` SelectedFieldInfo[] — Paths to the fields that will be included in the configured catalog.
        - `fieldPath` string[]
      - `mappers` ConfiguredStreamMapper[] — Mappers that should be applied to the stream before writing to the destination.
        - `id` string, uuid
        - `type` 'hashing' | 'field-renaming' | 'row-filtering' | 'encryption' | 'field-filtering', required
        - `mapperConfiguration` union, required — The values required to configure the mapper.
          - object
            - `fieldNameSuffix` string, required — The suffix to append to the field name after hashing.
            - `method` 'MD2' | 'MD5' | 'SHA-1' | 'SHA-224' | 'SHA-256' | 'SHA-384' | 'SHA-512', required — The hashing algorithm to use.
            - `targetField` string, required — The name of the field to be hashed.
          - object
            - `targetField` string, required — The name of the field to filter.
          - object
            - `newFieldName` string, required — The new name for the field after renaming.
            - `originalFieldName` string, required — The current name of the field to rename.
          - object
            - `conditions` union, required
              - …
          - object
            - `algorithm` 'RSA' | 'AES', required
            - `fieldNameSuffix` string, required
            - `publicKey` string, required
            - `targetField` string, required
          - object
            - `algorithm` 'RSA' | 'AES', required
            - `fieldNameSuffix` string, required
            - `key` string, required
            - `mode` 'CBC' | 'CFB' | 'OFB' | 'CTR' | 'GCM' | 'ECB', required
            - `padding` 'NoPadding' | 'PKCS5Padding', required
            - `targetField` string, required
  - `createdAt` integer, required
  - `tags` Tag[], required
    - `tagId` string, uuid, required
    - `workspaceId` string, uuid, required
    - `name` string, required
    - `color` string, required
  - `statusReason` string

## Other responses

- `400` — Invalid data
- `403` — Not allowed

---

[API](https://skmtc.net/airbytehq/apis/airbyte-api.md) · [All operations](https://skmtc.net/airbytehq/apis/airbyte-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/airbytehq/airbyte-api/versions/55ddc054e5b5/schema)
