---
title: "Create warehouse connection"
method: POST
path: "/warehouse-connections"
tags: ["Warehouse Sync"]
---

# Create warehouse connection

`POST /warehouse-connections`

## Request

- Base URL: `https://api.sequenzy.com/api/v1`
- URL: `https://api.sequenzy.com/api/v1/warehouse-connections`
- Auth: HTTP bearer

Connects Snowflake, BigQuery, Redshift or Postgres. Sequenzy runs a test query before saving; nothing is saved when it fails. Redshift and Postgres hosts must resolve to public addresses. Requires warehouse:write.

## Request body

- object
  - `name` string, required
  - `provider` 'snowflake' | 'bigquery' | 'redshift' | 'postgres', required
  - `config` object, required: Non-secret settings. snowflake: account, username, warehouse, database, schema, role. bigquery: projectId, location. redshift and postgres: host, port (default 5439 or 5432), database, username, sslMode (require or verify-full, default require).
  - `credentials` object, required: Secrets, stored encrypted and never returned. snowflake: privateKey (PKCS#8 PEM) and optional privateKeyPassphrase. bigquery: serviceAccountJson (the key file contents). redshift and postgres: password.

## Response `201`

Connection created

- object
  - `success` boolean
  - `connection` WarehouseConnection
    - `id` string
    - `name` string
    - `provider` 'snowflake' | 'bigquery' | 'redshift' | 'postgres'
    - `config` object: Non-secret settings. BigQuery also includes serviceAccountEmail.
    - `status` 'connected' | 'error'
    - `lastTestedAt` string, date-time, nullable
    - `lastError` string, nullable
    - `syncCount` integer
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400`: Validation error, or the warehouse rejected the credentials or query (see code)
- `401`: Unauthorized
- `403`: Missing scope, or the member role cannot manage workspace settings
- `422`: Request body does not match the schema

## Changes

- **2026-10-16** `db3873ca3d4d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/warehouse-connections/post.md)

---

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