---
search:
  tags:
    - Sources
    - POST
seo:
  description: >-
    Create a new source connector. Reference for the POST /sources endpoint in
    the Streamkap REST API.
sidebar:
  label: Create New Source
  badge: POST
title: Create New Source
type: openapi-operation
---
Create a new source connector.

The `config` object contains connector-specific properties using **dot notation**
(e.g., `table.include.list`, `schema.include.list`, `database.hostname`).

Use the **GET /sources/connectors** endpoint with a `connector_code` query parameter to
retrieve the full configuration schema for a specific connector type.

For an API source (a catalog entry with `api_source: true`), read `config` from
**GET /sources/connectors/&#123;code&#125;/schema** instead: its `json_schema` names the fields and
auth modes. **403** when the connector is not available on this deployment, with its
`unavailable_reason` as the detail.

`POST /sources`

**Request body** (`application/json`, required)

- `name` (string, required) — Display name for the source connector.
- `connector` (string, required) — Connector type identifier (e.g., 'postgresql', 'mysql', 'mongodb', 'dynamodb', 'sqlserveraws').
- `config` (AlloyDBSourceConfig | Db2SourceConfig | DocumentDBSourceConfig | DynamoDBSourceConfig | ElasticSearchSourceConfig | InformixSourceConfig | KafkaDirectSourceConfig | MariaDBSourceConfig | MongoDBSourceConfig | MySQLSourceConfig | OracleRDSSourceConfig | OracleSourceConfig | PlanetscaleVitessSourceConfig | PostgreSQLSourceConfig | S3SourceConfig | SQLServerSourceConfig | SalesforceSourceConfig | ShopifySourceConfig | StripeSourceConfig | SupabaseSourceConfig | VitessSourceConfig | WebhookSourceConfig | ZendeskWebhookSourceConfig, required) — Connector-specific configuration properties. The schema depends on the connector type specified in the 'connector' field.
- `created_from` (EntityOriginEnum | null) — Origin of the entity creation.
- `desired_state` (DesiredStateEnum | null) — Desired operational state of the source.
- `kc_cluster_id` (string | null) — Kafka Connect cluster to deploy this connector to. Omit for the default cluster.
- `tags` (string[] | null) — List of tag IDs to assign to this source

Request body example:

```json
{
  "name": "string",
  "connector": "string",
  "config": {
    "transforms.ValueToKey.fields.include.list": "string",
    "transforms.ValueToKey.replace.null.with.default": true,
    "preserve.null.values": false,
    "transforms.OversizedRecords.fields.include.list": "string",
    "transforms.OversizedRecords.fields.exclude.list": "string",
    "transforms.OversizedRecords.max.field.size.bytes": 1048576,
    "transforms.OversizedRecords.oversized.field.behavior": "TRUNCATE",
    "transforms.OversizedRecords.truncation.suffix": "",
    "transforms.OversizedRecords.max.record.size.bytes": -1,
    "transforms.OversizedRecords.semantic.types.exclude": "io.debezium.data.Json,io.debezium.data.Xml",
    "transforms.OversizedRecords.truncate.to.bytes": -1,
    "transforms.OversizedRecords.replace.null.with.default": true,
    "InsertTopicName.enabled": false,
    "transforms.RecordsFilter.field": "string",
    "transforms.RecordsFilter.op": "in",
    "transforms.RecordsFilter.values": "string",
    "transforms.RecordsFilter.negate.condition": false,
    "database.hostname.user.defined": "string",
    "database.port.user.defined": "5432",
    "database.user": "string",
    "database.password": "pa$$word",
    "database.dbname": "string",
    "snapshot.read.only.user.defined": "Yes",
    "signal.data.collection.schema.or.database": "string",
    "column.include.list.toggled": true,
    "column.include.list.user.defined": "string",
    "column.exclude.list.user.defined": "string",
    "heartbeat.enabled": true,
    "heartbeat.data.collection.schema.or.database": "string",
    "slot.name": "streamkap_pgoutput_slot",
    "publication.name": "streamkap_pub",
    "schema.include.list": "string",
    "table.include.list.user.defined": "string",
    "reselector.reselect.error.handling.mode": "fail",
    "post.processors.reselect.enabled": true,
    "database.sslmode": "require",
    "include.source.db.name.in.table.name.user.defined": false,
    "binary.handling.mode": {
      "value": "bytes",
      "label": "Bytes"
    },
    "transforms.InsertStaticKey1.static.field": "string",
    "transforms.InsertStaticKey1.static.value": "string",
    "transforms.InsertStaticValue1.static.field": "string",
    "transforms.InsertStaticValue1.static.value": "string",
    "transforms.InsertStaticKey2.static.field": "string",
    "transforms.InsertStaticKey2.static.value": "string",
    "transforms.InsertStaticValue2.static.field": "string",
    "transforms.InsertStaticValue2.static.value": "string",
    "predicates.IsTopicToEnrich.pattern": "$^",
    "ssh.enabled": false,
    "ssh.host": "string",
    "ssh.port": "22",
    "ssh.user": "streamkap",
    "ssh.public.key.user.displayed": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJVbRrHqNN3SyIYnNF46SMd+ArZz+QheAtjnQzKiBWrc"
  },
  "created_from": "api",
  "desired_state": "Pending",
  "kc_cluster_id": "string",
  "tags": [
    "string"
  ]
}
```

**Responses**

- `200` — Successful Response
- `202` — Accepted: with \`wait=false\` the config is saved and the connector is deployed in the background.
- `422` — Validation Error

Response example, 200:

```json
{
  "name": "string",
  "connector": "string",
  "id": "string",
  "connector_display_name": "string",
  "created_timestamp": "string",
  "sub_id": "string",
  "tenant_id": "string",
  "service_id": "string",
  "config": {
    "property1": "string",
    "property2": "string"
  },
  "topic_ids": [
    "string"
  ],
  "topic_map": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "topics": [
    "string"
  ],
  "tasks": [
    0
  ],
  "connector_status": "string",
  "desired_state": "string",
  "reconcile_error": "string",
  "connection_warning": "string",
  "kc_cluster_id": "string",
  "task_statuses": {
    "property1": {
      "property1": "string",
      "property2": "string"
    },
    "property2": {
      "property1": "string",
      "property2": "string"
    }
  },
  "tags": [
    "string"
  ]
}
```
