> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update service password

> Sets a new password for the service



## OpenAPI

````yaml /_specs/cloud-openapi.json patch /v1/organizations/{organizationId}/services/{serviceId}/password
openapi: 3.0.1
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-299828
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
paths:
  /v1/organizations/{organizationId}/services/{serviceId}/password:
    patch:
      tags:
        - Service
      summary: Update service password
      description: Sets a new password for the service
      parameters:
        - in: path
          name: organizationId
          description: ID of the organization that owns the service.
          required: true
          schema:
            type: string
            format: uuid
        - in: path
          name: serviceId
          description: ID of the service to update password.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServicePasswordPatchRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 200
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
                  result:
                    $ref: '#/components/schemas/ServicePasswordPatchResponse'
        '400':
          description: >-
            The server cannot or will not process the request due to something
            that is perceived to be a client error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 400
                  error:
                    type: string
                    description: Detailed error description.
components:
  schemas:
    ServicePasswordPatchRequest:
      properties:
        newPasswordHash:
          description: >-
            Optional password hash. Used to avoid password transmission over
            network. If not provided a new password is generated and is provided
            in the response. Otherwise this hash is used. Algorithm: echo -n
            "yourpassword" | sha256sum | tr -d '-' | xxd -r -p | base64
          type: string
        newDoubleSha1Hash:
          description: >-
            Optional double SHA1 password hash for MySQL protocol. If
            newPasswordHash is not provided this key will be ignored and the
            generated password will be used. Algorithm: echo -n "yourpassword" |
            sha1sum | tr -d '-' | xxd -r -p | sha1sum | tr -d '-'
          type: string
    ServicePasswordPatchResponse:
      properties:
        password:
          description: >-
            New service password. Provided only if there was no
            'newPasswordHash' in the request
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi

````