---
title: "Saved Sql Queries Update 2"
method: PUT
path: "/clickhouse/saved-sql-queries/{id}/"
tags: ["clickhouse"]
---

# Saved Sql Queries Update 2

`PUT /clickhouse/saved-sql-queries/{id}/`

PUT handler with superadmin lock and field protection.

Same as patch() - checks lock and field protection before delegating.

## Path parameters

- `id` string, required

## Headers

- `Authorization` string, required

## Request body

- SavedSQLQueryUpdateRequest — Shared validation for create/update serializers.
  - `name` string, required
  - `description` string
  - `query` string, required
  - `plotting_config` union
    - unknown
    - unknown

## Response `200`

- SavedSQLQueryUpdate — Shared validation for create/update serializers.
  - `id` string, required
  - `name` string, required
  - `description` string
  - `query` string, required
  - `plotting_config` union
    - unknown
    - unknown
  - `source` 'sql_editor' | 'dashboard_custom_chart', required — * `sql_editor` - SQL editor * `dashboard_custom_chart` - Dashboard custom chart

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/versions/c26d550029f8/schema)
