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

# Saved Sql Queries Update

`PUT /clickhouse/saved-sql-queries/`

PUT handler with superadmin lock and field protection.

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

## Headers

- `Authorization` string, required

## Request body

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

## Response `200`

- SavedSQLQueryCreate — 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' — * `sql_editor` - SQL editor * `dashboard_custom_chart` - Dashboard custom chart
  - `created_by` integer, nullable, required

---

[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)
