> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lightdash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deposit connection

> Deposits durable warehouse credentials against a connect code. Called by
the Lightdash CLI; the connect code is the bearer credential, so this
endpoint is intentionally unauthenticated



## OpenAPI

````yaml https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/backend/src/generated/swagger.json post /api/v1/warehouse-connect/deposit
openapi: 3.0.0
info:
  title: Lightdash API
  version: 0.3392.0
  description: >
    Open API documentation for all public Lightdash API endpoints. #
    Authentication Before you get started, you might need to create a Personal
    Access Token to authenticate via the API. You can create a token by
    following this guide: https://docs.lightdash.com/references/personal_tokens
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
  - url: /
security: []
tags:
  - name: My Account
    description: These routes allow users to manage their own user account.
  - name: Organizations
    description: >-
      Each user is a member of a single organization. These routes allow users
      to manage their organization. Most actions are only available to admin
      users.
  - name: Projects
    description: >-
      Projects belong to a single organization. These routes allow users to
      manage their projects, browse content, and execute queries. Users inside
      an organization might have access to a project from an organization-level
      role or they might be granted access to a project directly.
  - name: Spaces
    description: >-
      Spaces allow you to organize charts and dashboards within a project. They
      also allow granular access to content by allowing you to create private
      spaces, which are only accessible to the creator and admins.
  - name: Roles & Permissions
    description: >-
      These routes allow users to manage roles and permissions for their
      organization.
    externalDocs:
      url: https://docs.lightdash.com/references/roles
  - name: Query
    description: >-
      These routes allow users to execute and manage queries against their data
      warehouse. This includes metric queries, SQL queries, and retrieving query
      results.
paths:
  /api/v1/warehouse-connect/deposit:
    post:
      tags:
        - Projects
      summary: Deposit connection
      description: |-
        Deposits durable warehouse credentials against a connect code. Called by
        the Lightdash CLI; the connect code is the bearer credential, so this
        endpoint is intentionally unauthenticated
      operationId: DepositWarehouseConnection
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepositWarehouseConnectionRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiDepositWarehouseConnectionResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      security: []
components:
  schemas:
    DepositWarehouseConnectionRequest:
      properties:
        inventory:
          allOf:
            - $ref: '#/components/schemas/WarehouseConnectInventory'
          nullable: true
        credentials:
          $ref: '#/components/schemas/DepositSnowflakeCredentials'
        code:
          type: string
      required:
        - inventory
        - credentials
        - code
      type: object
    ApiDepositWarehouseConnectionResponse:
      properties:
        results: {}
        status:
          type: string
          enum:
            - ok
          nullable: false
      required:
        - status
      type: object
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
            - name
            - statusCode
          type: object
        status:
          type: string
          enum:
            - error
          nullable: false
      required:
        - error
        - status
      type: object
      description: |-
        The Error object is returned from the api any time there is an error.
        The message contains
    WarehouseConnectInventory:
      properties:
        schemas:
          items:
            properties:
              name:
                type: string
              database:
                type: string
            required:
              - name
              - database
            type: object
          type: array
        roles:
          items:
            properties:
              isDefault:
                type: boolean
              name:
                type: string
            required:
              - isDefault
              - name
            type: object
          type: array
        warehouses:
          items:
            properties:
              state:
                type: string
                nullable: true
              size:
                type: string
                nullable: true
              name:
                type: string
            required:
              - state
              - size
              - name
            type: object
          type: array
        databases:
          items:
            properties:
              comment:
                type: string
                nullable: true
              name:
                type: string
            required:
              - comment
              - name
            type: object
          type: array
      required:
        - schemas
        - roles
        - warehouses
        - databases
      type: object
    DepositSnowflakeCredentials:
      allOf:
        - $ref: >-
            #/components/schemas/Omit_CreateSnowflakeCredentials.database-or-warehouse-or-schema_
        - $ref: >-
            #/components/schemas/Partial_Pick_CreateSnowflakeCredentials.database-or-warehouse-or-schema__
    AnyType:
      description: |-
        This AnyType is an alias for any
        The goal is to make it easier to identify any type in the codebase
        without having to eslint-disable all the time
        These are only used on legacy `any` types, don't use it for new types.
        This is added on a separate file to avoid circular dependencies.
    Omit_CreateSnowflakeCredentials.database-or-warehouse-or-schema_:
      $ref: >-
        #/components/schemas/Pick_CreateSnowflakeCredentials.Exclude_keyofCreateSnowflakeCredentials.database-or-warehouse-or-schema__
      description: Construct a type with the properties of T except for those in type K.
    Partial_Pick_CreateSnowflakeCredentials.database-or-warehouse-or-schema__:
      properties:
        database:
          type: string
        warehouse:
          type: string
        schema:
          type: string
      type: object
      description: Make all properties in T optional
    Pick_CreateSnowflakeCredentials.Exclude_keyofCreateSnowflakeCredentials.database-or-warehouse-or-schema__:
      properties:
        type:
          $ref: '#/components/schemas/WarehouseTypes.SNOWFLAKE'
        user:
          type: string
        password:
          type: string
        privateKey:
          type: string
        privateKeyPass:
          type: string
        token:
          type: string
        refreshToken:
          type: string
        account:
          type: string
        requireUserCredentials:
          type: boolean
        authenticationType:
          $ref: '#/components/schemas/SnowflakeAuthenticationType'
        role:
          type: string
        threads:
          type: number
          format: double
        clientSessionKeepAlive:
          type: boolean
        queryTag:
          type: string
        accessUrl:
          type: string
        startOfWeek:
          allOf:
            - $ref: '#/components/schemas/WeekDay'
          nullable: true
        dataTimezone:
          type: string
        quotedIdentifiersIgnoreCase:
          type: boolean
        disableTimestampConversion:
          type: boolean
        timeoutSeconds:
          type: number
          format: double
        override:
          type: boolean
        organizationWarehouseCredentialsUuid:
          type: string
      required:
        - type
        - user
        - account
      type: object
      description: From T, pick a set of properties whose keys are in the union K
    WarehouseTypes.SNOWFLAKE:
      enum:
        - snowflake
      type: string
    SnowflakeAuthenticationType:
      enum:
        - password
        - private_key
        - sso
        - external_browser
        - oauth_authorization_code
        - none
      type: string
    WeekDay:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      type: number

````