---
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
      - `syncMode` 'full_refresh_overwrite' | 'full_refresh_append' | 'incremental_append' | 'incremental_deduped_history'
      - `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[]
      - `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. — unresolved $ref
  - `schedule` AirbyteApiConnectionSchedule — schedule for when the the connection should run, per the schedule type
    - `scheduleType` 'manual' | 'cron', required
    - `cronExpression` string
  - `dataResidency` 'auto' | 'us' | 'eu'
  - `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'

## 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', 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
  - `dataResidency` 'auto' | 'us' | 'eu', required
  - `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
      - `syncMode` 'full_refresh_overwrite' | 'full_refresh_append' | 'incremental_append' | 'incremental_deduped_history'
      - `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[]
      - `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. — unresolved $ref
  - `createdAt` integer, required

## Other responses

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

---

[API](https://skmtc.dev/airbyte/apis/applications.md) · [All operations](https://skmtc.dev/airbyte/apis/applications/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/airbyte/applications/revisions/561bf5551285/schema)
