---
title: "POST /projects/{projectId}/dashboards"
method: POST
path: "/projects/{projectId}/dashboards"
---

# POST /projects/{projectId}/dashboards

`POST /projects/{projectId}/dashboards`

## Request

- Base URL: `https://api.caveman.so/api/v1`
- URL: `https://api.caveman.so/api/v1/projects/{projectId}/dashboards`
- Auth: one of:
  - OAuth 2
    - Authorization code: `/api/v1/oauth/authorize`
    - Token URL: `/api/v1/oauth/token` scopes: `dashboard:write`
  - HTTP bearer
  - API key in cookie `cave_access`
  - API key in cookie `__Secure-cave_identity.session_token`

POST /api/v1/projects/{projectId}/dashboards on the Caveman Cloud control plane. Requires the dashboard:write scope. Exposed to autonomous agents as the create action of the caveman_dashboards_write tool (write access). Create, clone, rename and delete project dashboards, and add, change or remove one chart at a time. Every saved chart must compile; verify it with charts.query first.

## Request body

- object
  - `name` string
  - `type` 'logs' | 'experiments'
  - `document` object
    - `filters` string[]
    - `search` string
    - `group_by` string
    - `range` object
      - `preset` '1h' | '6h' | '24h' | '3d' | '7d' | '14d' | '30d' | '60d' | '90d'
      - `from` string, date-time
      - `to` string, date-time
    - `sections` object[]
      - `id` string
      - `title` string, required
    - `charts` object[]
      - `id` string
      - `title` string, required
      - `type` 'timeseries' | 'toplist' | 'bignumber', required
      - `source` 'requests' | 'spans' | 'tools' | 'evals', required
      - `preset` string, nullable
      - `measures` object[], required
        - `label` string
        - `field` string
        - `agg` 'count' | 'sum' | 'avg' | 'min' | 'max' | 'count_distinct' | 'percentile'
        - `p` number
        - `expr` string
      - `filters` object
        - `row` string
        - `trace` string
      - `group_by` string
      - `options` object
        - `unit` 'duration' | 'cost' | 'count' | 'percent' | 'bytes'
        - `viz` 'line' | 'bar'
        - `stacked` boolean
        - `interval` 'auto' | 'hour' | 'day' | 'week'
        - `sort` 'value_desc' | 'value_asc' | 'name_asc' | 'name_desc'
        - `limit` integer
      - `layout` object
        - `w` unknown, required
        - `h` unknown, required
      - `section_id` string, nullable
  - `source_dashboard_id` string

## Response `2XX`

Successful response. Exact status depends on synchronous or durable delivery outcome.

## Other responses

- `4XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `5XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.

---

[API](https://skmtc.dev/caveman/apis/caveman-cloud-api.md) - [All operations](https://skmtc.dev/caveman/apis/caveman-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caveman/apis/caveman-cloud-api/revisions/508312d01cfc?raw)
