---
title: "Save a chart query"
method: POST
path: "/v1/internal/dashboard-saved-queries"
tags: ["Dashboard saved queries"]
---

# Save a chart query

`POST /v1/internal/dashboard-saved-queries`

## Request

- Base URL: `http://localhost:5173/api`
- URL: `http://localhost:5173/api/v1/internal/dashboard-saved-queries`
- Auth: none declared

Saves the query of an Ollie chart so a dashboard widget can reference it by id.

## Request body

- DashboardSavedQuery
  - `id` string, uuid
  - `project_id` string, uuid: Project the query is bounded to. Omit for every project in the workspace.
  - `sql` string, required
  - `created_at` string, date-time
  - `created_by` string

## Response `201`

Created

- DashboardSavedQuery
  - `id` string, uuid
  - `project_id` string, uuid: Project the query is bounded to. Omit for every project in the workspace.
  - `sql` string, required
  - `created_at` string, date-time
  - `created_by` string

## Other responses

- `422`: Unprocessable Content
- `501`: Ollie or Custom Charts is not enabled for this workspace

## Changes

- **2026-10-14** `1becf60bcc5e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/comet-ml/apis/opik-rest-api/changes/v1/internal/dashboard-saved-queries/post.md)

---

[API](https://skmtc.dev/comet-ml/apis/opik-rest-api.md) - [All operations](https://skmtc.dev/comet-ml/apis/opik-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/comet-ml/apis/opik-rest-api/revisions/0067fada8962?raw)
