---
title: "Create a connection"
method: POST
path: "/v3/connections"
tags: ["Resources"]
---

# Create a connection

`POST /v3/connections`

Creates a connection to a data warehouse.

The `config` object depends on `provider_id` and on the authentication
method — see the examples below. Secrets you send here are stored encrypted
and never returned by any endpoint.

## Request body

- ConnectionRequest
  - `name` string, required
  - `provider_id` 'bigquery' | 'snowflake' | 'redshift' | 'postgres' | 'databricksRest' | 'databricksWarehouse' | 'oracle', required
  - `config` object, required — Provider-specific configuration. `type` selects the authentication method and `credentials` holds the secrets — see the examples.
  - `privacy` 'private' | 'shared'
  - `groupIds` string[] — Required when `privacy` is `shared`.

## Response `200`

The connection was created.

- Connection — A data warehouse connection. Credentials are never returned — secret fields are stripped from `config`.
  - `id` string, uuid
  - `name` string
  - `provider_id` string
  - `user_id` string
  - `account_id` string
  - `privacy` 'private' | 'shared'
  - `config` object
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — The request is malformed or a parameter failed validation.
- `401` — The token is missing, malformed or expired.
- `403` — The token doesn't grant access to this resource.

---

[API](https://skmtc.net/gitbookio/apis/carto-api.md) · [All operations](https://skmtc.net/gitbookio/apis/carto-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitbookio/carto-api/revisions/019f79ecdd6c/schema)
