---
title: "Update warehouse credentials"
method: PATCH
path: "/api/v1/user/warehouseCredentials/{uuid}"
tags: ["My Account"]
---

# Update warehouse credentials

`PATCH /api/v1/user/warehouseCredentials/{uuid}`

Update user warehouse credentials

## Path parameters

- `uuid` string, required

## Request body

- UpsertUserWarehouseCredentials
  - `credentials` union, required
    - PickCreateRedshiftCredentialsTypeOrUserOrPassword — From T, pick a set of properties whose keys are in the union K
      - `type` 'redshift', required
      - `user` string, required
      - `password` string
    - PickCreateRedshiftCredentialsTypeOrUserOrAuthenticationTypeOrAccessKeyIdOrSecretAccessKeyOrSessionTokenOrAssumeRoleArnOrAssumeRoleExternalId — From T, pick a set of properties whose keys are in the union K
      - `type` 'redshift', required
      - `user` string, required
      - `accessKeyId` string
      - `secretAccessKey` string
      - `sessionToken` string
      - `authenticationType` 'password' | 'iam' | 'iam_browser'
      - `assumeRoleArn` string
      - `assumeRoleExternalId` string
    - PickCreatePostgresCredentialsTypeOrUserOrPassword — From T, pick a set of properties whose keys are in the union K
      - `type` 'postgres', required
      - `user` string, required
      - `password` string, required
    - PickCreateSnowflakeCredentialsTypeOrUserOrPasswordOrAuthenticationTypeOrRefreshToken — From T, pick a set of properties whose keys are in the union K
      - `type` 'snowflake', required
      - `user` string, required
      - `password` string
      - `refreshToken` string
      - `authenticationType` 'password' | 'private_key' | 'sso' | 'external_browser' | 'oauth_authorization_code' | 'none'
    - PickCreateTrinoCredentialsTypeOrUserOrPassword — From T, pick a set of properties whose keys are in the union K
      - `type` 'trino', required
      - `user` string, required
      - `password` string, required
    - PickCreateClickhouseCredentialsTypeOrUserOrPassword — From T, pick a set of properties whose keys are in the union K
      - `type` 'clickhouse', required
      - `user` string, required
      - `password` string, required
    - PickCreateBigqueryCredentialsTypeOrKeyfileContentsOrAuthenticationType — From T, pick a set of properties whose keys are in the union K
      - `type` 'bigquery', required
      - `keyfileContents` object, required
      - `authenticationType` 'sso' | 'private_key' | 'adc'
    - object — Make all properties in T optional
      - `type` 'databricks', required
      - `personalAccessToken` string
      - `refreshToken` string
      - `authenticationType` 'personal_access_token' | 'oauth_m2m' | 'oauth_u2m'
      - `oauthClientId` string
      - `database` string
      - `serverHostName` string
      - `httpPath` string
    - PickCreateAthenaCredentialsTypeOrAccessKeyIdOrSecretAccessKey — From T, pick a set of properties whose keys are in the union K
      - `type` 'athena', required
      - `accessKeyId` string
      - `secretAccessKey` string
    - PickCreateDuckdbMotherduckCredentialsTypeOrToken — From T, pick a set of properties whose keys are in the union K
      - `type` 'duckdb', required
      - `token` string, required
  - `name` string, required

## Response `200`

Ok

- object
  - `results` UserWarehouseCredentials, required
    - `project` UserWarehouseCredentialsProject, required
      - `type` 'DEFAULT' | 'PREVIEW', required
      - `name` string, required
      - `projectUuid` string, required
    - `credentials` union, required
      - PickCreateRedshiftCredentialsTypeOrUserOrAuthenticationTypeOrAssumeRoleArn — From T, pick a set of properties whose keys are in the union K
        - `type` 'redshift', required
        - `user` string, required
        - `authenticationType` 'password' | 'iam' | 'iam_browser'
        - `assumeRoleArn` string
      - PickCreatePostgresCredentialsOrCreateSnowflakeCredentialsOrCreateTrinoCredentialsOrCreateClickhouseCredentialsTypeOrUser — From T, pick a set of properties whose keys are in the union K
        - `type` union, required
          - 'postgres'
          - 'snowflake'
          - 'trino'
          - 'clickhouse'
        - `user` string, required
      - PickCreateBigqueryCredentialsType — From T, pick a set of properties whose keys are in the union K
        - `type` 'bigquery', required
      - PickCreateDatabricksCredentialsType — From T, pick a set of properties whose keys are in the union K
        - `type` 'databricks', required
      - PickCreateAthenaCredentialsType — From T, pick a set of properties whose keys are in the union K
        - `type` 'athena', required
      - PickCreateDuckdbCredentialsType — From T, pick a set of properties whose keys are in the union K
        - `type` 'duckdb', required
    - `updatedAt` string, date-time, required
    - `createdAt` string, date-time, required
    - `name` string, required
    - `userUuid` string, required
    - `uuid` 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/versions/40c933755c9a/schema)
