---
title: "Create warehouse credentials"
method: POST
path: "/api/v1/org/warehouse-credentials"
tags: ["Organization Warehouse Credentials"]
---

# Create warehouse credentials

`POST /api/v1/org/warehouse-credentials`

Create new warehouse credentials for the organization

## Request body

- CreateOrganizationWarehouseCredentials
  - `credentials` union, required
    - CreateRedshiftCredentials
      - `sshTunnelPrivateKey` string
      - `sshTunnelPublicKey` string
      - `sshTunnelUser` string
      - `sshTunnelPort` number, double
      - `sshTunnelHost` string
      - `useSshTunnel` boolean
      - `awsSsoRoleName` string
      - `awsSsoAccountId` string
      - `awsSsoRegion` string
      - `awsSsoStartUrl` string
      - `assumeRoleExternalId` string
      - `assumeRoleArn` string
      - `sessionToken` string
      - `secretAccessKey` string
      - `accessKeyId` string
      - `dbGroups` string[]
      - `autoCreate` boolean
      - `workgroupName` string
      - `clusterIdentifier` string
      - `isServerless` boolean
      - `region` string
      - `authenticationType` 'password' | 'iam' | 'iam_browser'
      - `timeoutSeconds` number, double
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `ra3Node` boolean
      - `sslmode` string
      - `keepalivesIdle` number, double
      - `threads` number, double
      - `schema` string, required
      - `dbname` string, required
      - `port` number, double, required
      - `requireUserCredentials` boolean
      - `password` string
      - `user` string, required
      - `host` string, required
      - `type` 'redshift', required
    - CreateBigqueryCredentials
      - `accessUrl` string
      - `executionProject` string
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `maximumBytesBilled` number, double
      - `location` string
      - `retries` number, double
      - `requireUserCredentials` boolean
      - `keyfileContents` object, required
      - `authenticationType` 'sso' | 'private_key' | 'adc'
      - `priority` 'interactive' | 'batch'
      - `timeoutSeconds` number, double
      - `threads` number, double
      - `dataset` string, required
      - `project` string, required
      - `type` 'bigquery', required
    - CreatePostgresCredentials
      - `sshTunnelPrivateKey` string
      - `sshTunnelPublicKey` string
      - `sshTunnelUser` string
      - `sshTunnelPort` number, double
      - `sshTunnelHost` string
      - `useSshTunnel` boolean
      - `sslrootcert` string, nullable
      - `sslrootcertFileName` string
      - `sslkey` string, nullable
      - `sslkeyFileName` string
      - `sslcert` string, nullable
      - `sslcertFileName` string
      - `sslmode` string
      - `timeoutSeconds` number, double
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `role` string
      - `searchPath` string
      - `keepalivesIdle` number, double
      - `threads` number, double
      - `schema` string, required
      - `dbname` string, required
      - `port` number, double, required
      - `requireUserCredentials` boolean
      - `password` string, required
      - `user` string, required
      - `host` string, required
      - `type` 'postgres', required
    - CreateSnowflakeCredentials
      - `organizationWarehouseCredentialsUuid` string
      - `override` boolean
      - `timeoutSeconds` number, double
      - `disableTimestampConversion` boolean
      - `quotedIdentifiersIgnoreCase` boolean
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `accessUrl` string
      - `queryTag` string
      - `clientSessionKeepAlive` boolean
      - `threads` number, double
      - `schema` string, required
      - `warehouse` string, required
      - `database` string, required
      - `role` string
      - `token` string
      - `refreshToken` string
      - `authenticationType` 'password' | 'private_key' | 'sso' | 'external_browser' | 'oauth_authorization_code' | 'none'
      - `privateKeyPass` string
      - `privateKey` string
      - `requireUserCredentials` boolean
      - `password` string
      - `user` string, required
      - `account` string, required
      - `type` 'snowflake', required
    - CreateDatabricksCredentials
      - `compute` object[]
        - `httpPath` string, required
        - `name` string, required
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `requireUserCredentials` boolean
      - `oauthClientSecret` string
      - `oauthClientId` string
      - `token` string
      - `refreshToken` string
      - `personalAccessToken` string
      - `authenticationType` 'personal_access_token' | 'oauth_m2m' | 'oauth_u2m'
      - `httpPath` string, required
      - `serverHostName` string, required
      - `database` string, required
      - `catalog` string
      - `type` 'databricks', required
    - CreateTrinoCredentials
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `source` string
      - `http_scheme` string, required
      - `schema` string, required
      - `dbname` string, required
      - `port` number, double, required
      - `requireUserCredentials` boolean
      - `password` string, required
      - `user` string, required
      - `host` string, required
      - `type` 'trino', required
    - CreateClickhouseCredentials
      - `timeoutSeconds` number, double
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `secure` boolean
      - `schema` string, required
      - `port` number, double, required
      - `requireUserCredentials` boolean
      - `password` string, required
      - `user` string, required
      - `host` string, required
      - `type` 'clickhouse', required
    - CreateAthenaCredentials
      - `dataTimezone` string
      - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
      - `requireUserCredentials` boolean
      - `numRetries` number, double
      - `threads` number, double
      - `workGroup` string
      - `assumeRoleExternalId` string
      - `assumeRoleArn` string
      - `sessionToken` string
      - `secretAccessKey` string
      - `accessKeyId` string
      - `authenticationType` 'access_key' | 'iam_role'
      - `s3DataDir` string
      - `s3StagingDir` string, required
      - `schema` string, required
      - `database` string, required
      - `region` string, required
      - `type` 'athena', required
    - union
      - CreateDuckdbMotherduckCredentials
        - `dataTimezone` string
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `requireUserCredentials` boolean
        - `threads` number, double
        - `token` string, required
        - `schema` string, required
        - `database` string, required
        - `connectionType` 'motherduck', required
        - `type` 'duckdb', required
      - CreateDuckdbDucklakeCredentials
        - `dataTimezone` string
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `requireUserCredentials` boolean
        - `threads` number, double
        - `catalogAlias` string
        - `schema` string, required
        - `dataPath` union, required
          - CreateDucklakeDataPathS3
            - `useSsl` boolean
            - `forcePathStyle` boolean
            - `secretAccessKey` string
            - `accessKeyId` string
            - `region` string
            - `endpoint` string
            - `url` string, required
            - `type` 's3', required
          - CreateDucklakeDataPathGcs
            - `hmacSecret` string
            - `hmacKeyId` string
            - `url` string, required
            - `type` 'gcs', required
          - CreateDucklakeDataPathAzure
            - `accountKey` string
            - `accountName` string
            - `connectionString` string
            - `url` string, required
            - `type` 'azure', required
          - CreateDucklakeDataPathLocal
            - `path` string, required
            - `type` 'local', required
        - `catalog` union, required
          - CreateDucklakeCatalogPostgres
            - `password` string, required
            - `user` string, required
            - `database` string, required
            - `port` number, double, required
            - `host` string, required
            - `type` 'postgres', required
          - CreateDucklakeCatalogSqlite
            - `path` string, required
            - `type` 'sqlite', required
          - CreateDucklakeCatalogDuckdb
            - `path` string, required
            - `type` 'duckdb', required
        - `connectionType` 'ducklake', required
        - `type` 'duckdb', required
      - CreateDuckdbEmbeddedCredentials
        - `schema` string
        - `startOfWeek` number, double
        - `dataTimezone` string
        - `requireUserCredentials` boolean
        - `dataset` string, required
        - `connectionType` 'embedded', required
        - `type` 'duckdb', required
  - `description` string, nullable
  - `name` string, required

## Response `200`

Ok

- ApiOrganizationWarehouseCredentialsResponse
  - `results` OrganizationWarehouseCredentials, required — Organization-level warehouse credentials
    - `credentials` union, required
      - SnowflakeCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'snowflake', required
        - `account` string, required
        - `requireUserCredentials` boolean
        - `authenticationType` 'password' | 'private_key' | 'sso' | 'external_browser' | 'oauth_authorization_code' | 'none'
        - `role` string
        - `database` string, required
        - `warehouse` string, required
        - `schema` string, required
        - `threads` number, double
        - `clientSessionKeepAlive` boolean
        - `queryTag` string
        - `accessUrl` string
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `quotedIdentifiersIgnoreCase` boolean
        - `disableTimestampConversion` boolean
        - `timeoutSeconds` number, double
        - `override` boolean
        - `organizationWarehouseCredentialsUuid` string
      - RedshiftCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'redshift', required
        - `requireUserCredentials` boolean
        - `authenticationType` 'password' | 'iam' | 'iam_browser'
        - `schema` string, required
        - `threads` number, double
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `timeoutSeconds` number, double
        - `useSshTunnel` boolean
        - `sshTunnelHost` string
        - `sshTunnelPort` number, double
        - `sshTunnelUser` string
        - `sshTunnelPublicKey` string
        - `host` string, required
        - `port` number, double, required
        - `dbname` string, required
        - `keepalivesIdle` number, double
        - `sslmode` string
        - `ra3Node` boolean
        - `region` string
        - `isServerless` boolean
        - `clusterIdentifier` string
        - `workgroupName` string
        - `autoCreate` boolean
        - `dbGroups` string[]
        - `assumeRoleArn` string
        - `assumeRoleExternalId` string
        - `awsSsoStartUrl` string
        - `awsSsoRegion` string
        - `awsSsoAccountId` string
        - `awsSsoRoleName` string
      - PostgresCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'postgres', required
        - `requireUserCredentials` boolean
        - `role` string
        - `schema` string, required
        - `threads` number, double
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `timeoutSeconds` number, double
        - `useSshTunnel` boolean
        - `sshTunnelHost` string
        - `sshTunnelPort` number, double
        - `sshTunnelUser` string
        - `sshTunnelPublicKey` string
        - `host` string, required
        - `port` number, double, required
        - `dbname` string, required
        - `keepalivesIdle` number, double
        - `sslmode` string
        - `sslcertFileName` string
        - `sslkeyFileName` string
        - `sslrootcertFileName` string
        - `searchPath` string
      - BigqueryCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'bigquery', required
        - `requireUserCredentials` boolean
        - `authenticationType` 'sso' | 'private_key' | 'adc'
        - `threads` number, double
        - `accessUrl` string
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `timeoutSeconds` number, double
        - `project` string, required
        - `dataset` string, required
        - `priority` 'interactive' | 'batch'
        - `retries` number, double
        - `location` string
        - `maximumBytesBilled` number, double
        - `executionProject` string
      - DatabricksCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'databricks', required
        - `catalog` string
        - `requireUserCredentials` boolean
        - `authenticationType` 'personal_access_token' | 'oauth_m2m' | 'oauth_u2m'
        - `database` string, required
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `serverHostName` string, required
        - `httpPath` string, required
        - `compute` object[]
          - `httpPath` string, required
          - `name` string, required
      - TrinoCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'trino', required
        - `requireUserCredentials` boolean
        - `schema` string, required
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `host` string, required
        - `port` number, double, required
        - `dbname` string, required
        - `http_scheme` string, required
        - `source` string
      - ClickhouseCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'clickhouse', required
        - `requireUserCredentials` boolean
        - `schema` string, required
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `timeoutSeconds` number, double
        - `host` string, required
        - `port` number, double, required
        - `secure` boolean
      - AthenaCredentials — From T, pick a set of properties whose keys are in the union K
        - `type` 'athena', required
        - `requireUserCredentials` boolean
        - `authenticationType` 'access_key' | 'iam_role'
        - `database` string, required
        - `schema` string, required
        - `threads` number, double
        - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
        - `dataTimezone` string
        - `region` string, required
        - `assumeRoleArn` string
        - `assumeRoleExternalId` string
        - `s3StagingDir` string, required
        - `s3DataDir` string
        - `workGroup` string
        - `numRetries` number, double
      - union
        - DuckdbMotherduckCredentials — From T, pick a set of properties whose keys are in the union K
          - `type` 'duckdb', required
          - `requireUserCredentials` boolean
          - `database` string, required
          - `schema` string, required
          - `threads` number, double
          - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
          - `dataTimezone` string
          - `connectionType` 'motherduck', required
        - DuckdbDucklakeCredentials — From T, pick a set of properties whose keys are in the union K
          - `type` 'duckdb', required
          - `requireUserCredentials` boolean
          - `schema` string, required
          - `threads` number, double
          - `startOfWeek` 0 | 1 | 2 | 3 | 4 | 5 | 6
          - `dataTimezone` string
          - `connectionType` 'ducklake', required
          - `catalogAlias` string
          - `dataPath` union, required
            - DucklakeDataPathS3 — From T, pick a set of properties whose keys are in the union K
              - …
            - DucklakeDataPathGcs — From T, pick a set of properties whose keys are in the union K
              - …
            - DucklakeDataPathAzure — From T, pick a set of properties whose keys are in the union K
              - …
            - DucklakeDataPathLocal
              - …
          - `catalog` union, required
            - DucklakeCatalogPostgres — From T, pick a set of properties whose keys are in the union K
              - …
            - DucklakeCatalogSqlite
              - …
            - DucklakeCatalogDuckdb
              - …
        - DuckdbEmbeddedCredentials
          - `schema` string
          - `startOfWeek` number, double
          - `dataTimezone` string
          - `requireUserCredentials` boolean
          - `dataset` string, required
          - `connectionType` 'embedded', required
          - `type` 'duckdb', required
    - `createdByUserUuid` string, nullable, required
    - `createdAt` string, date-time, required
    - `warehouseType` 'bigquery' | 'postgres' | 'redshift' | 'snowflake' | 'databricks' | 'trino' | 'clickhouse' | 'athena' | 'duckdb', required
    - `description` string, nullable, required
    - `name` string, required
    - `organizationUuid` string, required
    - `organizationWarehouseCredentialsUuid` string, required
  - `status` 'ok', required

## Other responses

- `default` — Error

---

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