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

# Rotate Snowflake fabric credentials

> Replace the username and password (and optionally the role) of a Snowflake fabric that uses password authentication. Prophecy tests the new credentials against Snowflake before saving them. If the test fails, nothing changes. Team members' saved credentials for the old username are updated to the new credentials.

Only team admins of the fabric's team can call this endpoint. If team management by cluster admins is enabled, cluster admins can also call it.

Use this endpoint to rotate the password of a Snowflake fabric without opening the fabric in Prophecy. It works only for Snowflake fabrics whose warehouse connection uses **Username and Password** authentication and stores the password as a Prophecy secret.

> [!NOTE]
>
> Each request is recorded in the [audit log](https://docs.prophecy.ai/administration/management/audit-logs.md) as a `FABRIC_CREDENTIALS_UPDATE` event. The audit event records the username and role, but never the password.


## OpenAPI

````yaml put /api/fabrics/{fabricId}/credentials
openapi: 3.0.3
info:
  title: Prophecy API - Fabrics
  description: API for managing Prophecy fabrics
  version: 1.0.0
servers: []
security: []
paths:
  /api/fabrics/{fabricId}/credentials:
    parameters:
      - name: fabricId
        in: path
        description: The unique ID of the fabric
        required: true
        schema:
          type: string
    put:
      tags:
        - Fabrics
      summary: Rotate Snowflake fabric credentials
      description: >-
        Replace the username and password (and optionally the role) of a
        Snowflake fabric that uses password authentication. Prophecy tests the
        new credentials against Snowflake before saving them. If the test fails,
        nothing changes. Team members' saved credentials for the old username
        are updated to the new credentials.


        Only team admins of the fabric's team can call this endpoint. If team
        management by cluster admins is enabled, cluster admins can also call
        it.
      operationId: updateFabricCredentials
      parameters:
        - $ref: '#/components/parameters/X-AUTH-TOKEN'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - password
              properties:
                username:
                  type: string
                  description: The Snowflake username. Must not be empty.
                password:
                  type: string
                  description: The new Snowflake password. Must not be empty.
                role:
                  type: string
                  description: >-
                    (Optional) The Snowflake role. If provided, it must not be
                    empty.
            example:
              username: PROPHECY_SVC
              password: <new password>
              role: ANALYST
      responses:
        '200':
          description: Credentials updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  message:
                    type: string
              example:
                success: true
                message: Credentials updated
        '400':
          description: >-
            The request body is invalid, the fabric isn't a unified Snowflake
            fabric that uses password authentication, or the Snowflake
            connection test failed.
        '403':
          description: You aren't allowed to update this fabric's credentials.
        '404':
          description: The fabric doesn't exist or you can't access it.
        '502':
          description: >-
            A Prophecy service couldn't complete the update. Every step is safe
            to repeat, so retry the request.
components:
  parameters:
    X-AUTH-TOKEN:
      name: X-AUTH-TOKEN
      in: header
      description: Prophecy authentication token. Required for all API requests.
      required: true
      schema:
        type: string

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.