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

# Update service snapshot configuration

> **This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Updates the service snapshot configuration. Requires ADMIN auth key role. Enables or disables scheduled snapshots and sets the cadence; when enabled, gap and timeFrame (in minutes) must together be one of the supported (gap, timeFrame) pairs: (30, 1440), (60, 2880). Provide at least one of enabled, gap, timeFrame; omit a field to leave it unchanged (null is not accepted).

<span data-endpoint-badge="Beta"><Badge color="blue">Beta</Badge></span>

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Updates the service snapshot configuration. Requires ADMIN auth key role. Enables or disables scheduled snapshots and sets the cadence; when enabled, gap and timeFrame (in minutes) must together be one of the supported (gap, timeFrame) pairs: (30, 1440), (60, 2880). Provide at least one of enabled, gap, timeFrame; omit a field to leave it unchanged (null is not accepted).

<div data-permissions class="api-section">
  <div class="api-section-heading flex flex-col gap-y-4 w-full">
    <div class="flex items-baseline border-b pb-2.5 border-gray-100 dark:border-gray-800 w-full">
      <h4 class="api-section-heading-title flex-1 mb-0">Permission</h4>
    </div>
  </div>

  <div class="py-6">
    The API key must have the `control-plane:service:manage-backups` permission.
  </div>
</div>


## OpenAPI

````yaml _specs/cloud-openapi.json PATCH /v1/organizations/{organizationId}/services/{serviceId}/snapshotConfiguration
openapi: 3.1.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-1145498
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Role Management
  - name: Service
  - name: Backup
  - name: Snapshot
  - name: API keys
  - name: Prometheus
  - name: ClickPipes
  - name: ClickStack
  - name: Postgres
  - name: UDF
  - name: Query API endpoints
paths:
  /v1/organizations/{organizationId}/services/{serviceId}/snapshotConfiguration:
    patch:
      tags:
        - Snapshot
      summary: Update service snapshot configuration
      description: >-
        **This endpoint is in beta.** API contract is stable, and no breaking
        changes are expected in the future. <br /><br /> Updates the service
        snapshot configuration. Requires ADMIN auth key role. Enables or
        disables scheduled snapshots and sets the cadence; when enabled, gap and
        timeFrame (in minutes) must together be one of the supported (gap,
        timeFrame) pairs: (30, 1440), (60, 2880). Provide at least one of
        enabled, gap, timeFrame; omit a field to leave it unchanged (null is not
        accepted).
      operationId: snapshotConfigurationUpdate
      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.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SnapshotConfigurationPatchRequest'
      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/SnapshotConfiguration'
        '400':
          description: >-
            The request cannot be processed due to a client error. Please verify
            your request parameters and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 400
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
        '500':
          description: >-
            An internal server error has occurred. If this issue persists,
            please contact ClickHouse Cloud support for assistance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: HTTP status code.
                    example: 500
                  error:
                    type: string
                    description: Detailed error description.
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
components:
  schemas:
    SnapshotConfigurationPatchRequest:
      properties:
        enabled:
          description: Whether scheduled snapshots are enabled for the service.
          type: boolean
        gap:
          description: >-
            Interval between snapshots, in minutes. Set together with timeFrame;
            only supported preset pairs are accepted.
          type: number
        timeFrame:
          description: >-
            Retention window the snapshots cover, in minutes. Set together with
            gap; only supported preset pairs are accepted.
          type: number
    SnapshotConfiguration:
      properties:
        enabled:
          description: Whether scheduled snapshots are enabled for the service.
          type: boolean
        gap:
          description: >-
            Interval between snapshots, in minutes. Set together with timeFrame;
            only supported preset pairs are accepted.
          type: number
        timeFrame:
          description: >-
            Retention window the snapshots cover, in minutes. Set together with
            gap; only supported preset pairs are accepted.
          type: number
  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
      x-permission-scopes: >-
        The scope list of a `security` requirement holds ClickHouse Cloud API
        key permission ids (for example `control-plane:organization:view`), not
        OAuth scopes. OpenAPI has no field for API key permissions, so this is
        the closest available place. A key must hold every permission listed on
        an operation to call it; an operation with no scopes needs none beyond a
        valid key. Every operation declares at most one requirement object,
        always for this scheme, so the list is only ever conjunctive —
        alternative sets of permissions are never expressed.

````