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

# Add a Snowflake account



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json post /snowflake-accounts
openapi: 3.1.0
info:
  title: SELECT API (v2)
  version: 0.1.0
servers:
  - url: https://api.select.dev/v2
    description: SELECT API v2
security: []
paths:
  /snowflake-accounts:
    post:
      tags:
        - snowflake-accounts
      summary: Add a Snowflake account
      operationId: create_snowflake_account_route_snowflake_accounts_post
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            description: The organization ID the request is scoped to.
            title: X-Tenant-Id
          description: The organization ID the request is scoped to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SnowflakeAccountCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SnowflakeAccount'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    SnowflakeAccountCreate:
      properties:
        id:
          type: string
          title: Id
          description: >-
            The account's Snowflake identifier, in `ORGANIZATION-ACCOUNT` form
            (e.g. `acme-us-east-1`). Cannot be changed once the account is
            added.


            Must already be normalized: lower case, no surrounding whitespace,
            and `-` rather than `.` between organization and account. A
            PrivateLink identifier, which ends in `.privatelink`, keeps its dots
            because the host it resolves to does. A value that is not already
            normalized is rejected rather than rewritten, so what you submit
            always matches what a subsequent read returns.
        name:
          type: string
          title: Name
          description: Display name for the account, as shown throughout SELECT.
        credentials:
          $ref: '#/components/schemas/SnowflakeCredentials'
          description: How SELECT authenticates to the account.
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
          description: >-
            The Snowflake role SELECT assumes when reading this account. Null
            uses the user's default role.
        warehouse:
          anyOf:
            - type: string
            - type: 'null'
          title: Warehouse
          description: >-
            The Snowflake warehouse SELECT runs its queries on. Null uses the
            user's default warehouse.
        describe_object_sproc_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Describe Object Sproc Name
          description: >-
            Fully qualified name of the stored procedure SELECT calls to
            describe objects it cannot read directly. Null if there is none.
        export_storage_integration_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Export Storage Integration Name
          description: >-
            Name of the Snowflake storage integration used to export data to
            SELECT. Mutually exclusive with `export_stage_name`.
        export_stage_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Export Stage Name
          description: >-
            Fully qualified name of the Snowflake stage used to export data to
            SELECT. Mutually exclusive with `export_storage_integration_name`.
        compute_cost_per_credit:
          anyOf:
            - type: number
            - type: 'null'
          title: Compute Cost Per Credit
          description: >-
            Overrides the credit rate SELECT reads from Snowflake when costing
            compute. Required together with `storage_cost_per_tb` when the
            account cannot read organization-level rates.
        storage_cost_per_tb:
          anyOf:
            - type: number
            - type: 'null'
          title: Storage Cost Per Tb
          description: >-
            Overrides the rate SELECT uses when costing storage, per terabyte
            per month. Required together with `compute_cost_per_credit` when the
            account cannot read organization-level rates.
        customer_side_sanitization_database_schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Side Sanitization Database Schema
          description: >-
            `DATABASE.SCHEMA` hosting your own sanitized copies of Snowflake's
            account usage views, which SELECT reads instead of the originals.
            Null disables the redirection.
        customer_side_sanitization_views:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Customer Side Sanitization Views
          description: >-
            The account usage views to redirect, such as `query_history`. Null
            redirects every view SELECT reads. Requires
            `customer_side_sanitization_database_schema`.
        excluded_users_filter_expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Excluded Users Filter Expression
          description: >-
            JSON-encoded filter selecting Snowflake users whose activity is
            excluded from SELECT's cost and usage figures.
          x-doit-confidentiality: customer-data
          x-doit-pii: true
        fivetran_users:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Fivetran Users
          description: >-
            Snowflake users that Fivetran runs as, so their activity is
            attributed to Fivetran.
          x-doit-confidentiality: customer-data
          x-doit-pii: true
        mode_workspace:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode Workspace
          description: The Mode workspace to attribute queries to.
        mode_token_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode Token Id
          description: Identifier of the Mode API token SELECT uses.
        mode_token_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode Token Secret
          description: The Mode API token secret.
          writeOnly: true
          x-doit-confidentiality: sensitive
          x-terraform-sensitive: true
        sync_enabled:
          type: boolean
          title: Sync Enabled
          description: Whether SELECT starts syncing data for this account.
          default: true
        query_sanitization_enabled:
          type: boolean
          title: Query Sanitization Enabled
          description: Whether query text is sanitized before SELECT stores it.
          default: false
      type: object
      required:
        - id
        - name
        - credentials
      title: SnowflakeAccountCreate
      description: >-
        The configuration SELECT needs to start reading a Snowflake account.


        Every field here is returned by a read of the created account, except
        the

        credentials, which are write-only and never returned.
    SnowflakeAccount:
      properties:
        id:
          type: string
          title: Id
          description: >-
            The account's Snowflake identifier, in `ORGANIZATION-ACCOUNT` form.
            Set by the caller when the account is added and cannot be changed
            afterward.
        etag:
          type: string
          title: Etag
          description: >-
            Opaque strong ETag for this account's configuration. Matches the
            `ETag` response header, and is what `If-Match` requires on a write.
            It changes whenever a configurable field on the account changes.
          readOnly: true
          x-terraform-computed: true
        name:
          type: string
          title: Name
          description: Display name for the account, as shown throughout SELECT.
        snowflake_organization_name:
          type: string
          title: Snowflake Organization Name
          description: Name of the Snowflake organization the account belongs to.
          readOnly: true
          x-terraform-computed: true
        snowflake_account_name:
          type: string
          title: Snowflake Account Name
          description: The account's name within its Snowflake organization.
          readOnly: true
          x-terraform-computed: true
        locator:
          anyOf:
            - type: string
            - type: 'null'
          title: Locator
          description: The account's Snowflake locator, as returned by `current_account()`.
          readOnly: true
          x-terraform-computed: true
        account_region:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Region
          description: The Snowflake region the account is hosted in.
          readOnly: true
          x-terraform-computed: true
        snowsight_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Snowsight Url
          description: Link to the account in Snowsight.
          readOnly: true
          x-terraform-computed: true
        snowflake_reader_parent_account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Snowflake Reader Parent Account Name
          description: >-
            For a reader account, the name of the account that created it. Null
            for a regular account.
          readOnly: true
          x-terraform-computed: true
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
          description: The Snowflake role SELECT assumes when reading this account.
        warehouse:
          anyOf:
            - type: string
            - type: 'null'
          title: Warehouse
          description: The Snowflake warehouse SELECT runs its queries on.
        describe_object_sproc_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Describe Object Sproc Name
          description: >-
            Fully qualified name of the stored procedure SELECT calls to
            describe objects it cannot read directly.
        export_storage_integration_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Export Storage Integration Name
          description: >-
            Name of the Snowflake storage integration used to export data to
            SELECT. Mutually exclusive with `export_stage_name`.
        export_stage_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Export Stage Name
          description: >-
            Fully qualified name of the Snowflake stage used to export data to
            SELECT, for accounts that export through a stage rather than a
            storage integration.
        compute_cost_per_credit:
          anyOf:
            - type: number
            - type: 'null'
          title: Compute Cost Per Credit
          description: >-
            Overrides the credit rate SELECT reads from Snowflake when costing
            compute. Null uses the rate on the account's contract.
        storage_cost_per_tb:
          anyOf:
            - type: number
            - type: 'null'
          title: Storage Cost Per Tb
          description: >-
            Overrides the rate SELECT uses when costing storage, per terabyte
            per month. Null uses the rate on the account's contract.
        customer_side_sanitization_database_schema:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Side Sanitization Database Schema
          description: >-
            `DATABASE.SCHEMA` hosting the customer's own sanitized copies of
            Snowflake's account usage views, which SELECT reads instead of the
            originals. Null disables the redirection.
        customer_side_sanitization_views:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Customer Side Sanitization Views
          description: >-
            The account usage views to redirect, such as `query_history`. Null
            redirects every view SELECT reads.
        excluded_users_filter_expression:
          anyOf:
            - type: string
            - type: 'null'
          title: Excluded Users Filter Expression
          description: >-
            JSON-encoded filter selecting Snowflake users whose activity is
            excluded from SELECT's cost and usage figures.
          x-doit-confidentiality: customer-data
          x-doit-pii: true
        fivetran_users:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Fivetran Users
          description: >-
            Snowflake users that Fivetran runs as, so their activity is
            attributed to Fivetran.
          x-doit-confidentiality: customer-data
          x-doit-pii: true
        mode_workspace:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode Workspace
          description: The Mode workspace to attribute queries to.
        mode_token_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode Token Id
          description: Identifier of the Mode API token SELECT uses.
        mode_credentials_configured:
          type: boolean
          title: Mode Credentials Configured
          description: >-
            Whether Mode BI credentials are configured for this account. The
            credentials themselves are never returned.
          readOnly: true
          x-terraform-computed: true
        connection_id:
          type: string
          title: Connection Id
          description: Identifier of the underlying connection this account reads through.
          readOnly: true
          x-terraform-computed: true
        sync_enabled:
          type: boolean
          title: Sync Enabled
          description: Whether SELECT is currently syncing data for this account.
        query_sanitization_enabled:
          type: boolean
          title: Query Sanitization Enabled
          description: Whether query text is sanitized before SELECT stores it.
        has_org_admin_access:
          type: boolean
          title: Has Org Admin Access
          description: >-
            Whether SELECT can read this account's Snowflake organization-level
            usage views, which is what makes organization-wide rates and spend
            available.
          readOnly: true
          x-terraform-computed: true
        has_data_share:
          type: boolean
          title: Has Data Share
          description: Whether the account reads SELECT's data share.
          readOnly: true
          x-terraform-computed: true
        has_manage_warehouses_grant:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Has Manage Warehouses Grant
          description: >-
            Whether SELECT's role holds `manage warehouses` on the account,
            which smart suspension requires. Null until first checked.
          readOnly: true
          x-terraform-computed: true
        added_by_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Added By Email
          description: Email address of the user who added the account.
          readOnly: true
          x-doit-confidentiality: customer-data
          x-doit-pii: true
          x-terraform-computed: true
        latest_sync_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Sync Time
          description: >-
            When SELECT last synced data for this account, as an RFC 3339 UTC
            timestamp.
          readOnly: true
          x-terraform-computed: true
        last_successful_sync_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Successful Sync Time
          description: >-
            When the account's last sync succeeded, as an RFC 3339 UTC
            timestamp. Behind `latest_sync_time` if the most recent attempt
            failed.
          readOnly: true
          x-terraform-computed: true
        latest_hourly_spend_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Hourly Spend Time
          description: >-
            The most recent hour SELECT holds spend data for, as an RFC 3339 UTC
            timestamp.
          readOnly: true
          x-terraform-computed: true
        create_time:
          type: string
          title: Create Time
          description: When the account was added to SELECT, as an RFC 3339 UTC timestamp.
          readOnly: true
          x-terraform-computed: true
        update_time:
          type: string
          title: Update Time
          description: When the account was last changed, as an RFC 3339 UTC timestamp.
          readOnly: true
          x-terraform-computed: true
      type: object
      required:
        - id
        - etag
        - name
        - snowflake_organization_name
        - snowflake_account_name
        - mode_credentials_configured
        - connection_id
        - sync_enabled
        - query_sanitization_enabled
        - has_org_admin_access
        - has_data_share
        - create_time
        - update_time
      title: SnowflakeAccount
      description: A connection to one Snowflake account.
    SnowflakeCredentials:
      properties:
        authentication_method:
          type: string
          enum:
            - password
            - key_pair
            - workload_identity_federation
          title: Authentication Method
          description: Which authentication method SELECT uses for this account.
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
          description: >-
            The Snowflake user SELECT connects as. Required for `password` and
            `key_pair`; omitted for `workload_identity_federation`.
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
          description: That user's password. Required for `password`.
          writeOnly: true
          x-doit-confidentiality: sensitive
          x-terraform-sensitive: true
        private_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Private Key
          description: >-
            PEM-encoded private key for that user, including the `-----BEGIN
            PRIVATE KEY-----` and `-----END PRIVATE KEY-----` lines. Required
            for `key_pair`.
          writeOnly: true
          x-doit-confidentiality: sensitive
          x-terraform-sensitive: true
        private_key_passphrase:
          anyOf:
            - type: string
            - type: 'null'
          title: Private Key Passphrase
          description: >-
            Passphrase protecting the private key, if it is encrypted. Only
            valid for `key_pair`.
          writeOnly: true
          x-doit-confidentiality: sensitive
          x-terraform-sensitive: true
      type: object
      required:
        - authentication_method
      title: SnowflakeCredentials
      description: >-
        How SELECT authenticates to a Snowflake account.


        Supply the fields belonging to the chosen `authentication_method`:


        - `password` — `username` and `password`.

        - `key_pair` — `username` and `private_key`, plus
        `private_key_passphrase` if
          the key is encrypted.
        - `workload_identity_federation` — nothing else. Snowflake resolves the
        user
          from its own workload identity mapping.

        Supplying a field that does not belong to the chosen method is rejected,
        so a

        leftover value cannot silently change how SELECT connects.
    ProblemDetail:
      additionalProperties: true
      description: >-
        RFC 9457-style error payload, served as ``application/problem+json``.


        ``code`` is the stable, machine-readable identifier — consumers branch
        on it,

        never on ``title``. ``type`` stays ``about:blank``: we keep no per-error

        documentation pages. There is no ``instance``/request-id member (we
        don't run

        access logs). See the flat error-code catalogue in §4 of the standards
        doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
      required:
        - title
        - status
        - detail
        - code
        - retryable
      title: ProblemDetail
      type: object
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        WWW-Authenticate:
          description: Authentication challenge for the requested resource.
          required: true
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    MethodNotAllowed:
      description: Method not allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Allow:
          description: HTTP methods supported by the requested resource.
          required: true
          schema:
            type: string
    RequestTimeout:
      description: Request Timeout
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Conflict:
      description: Conflict
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ValidationFailed:
      description: Validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    RateLimited:
      description: Rate limited
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
    InternalError:
      description: Internal error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
  securitySchemes:
    HTTPBearer:
      type: http
      description: Organization API key (sl_…).
      scheme: bearer

````