---
title: "patchInsight"
method: PATCH
path: "/v1/dashboard/insights/{id}"
tags: ["Insights"]
---

# patchInsight

`PATCH /v1/dashboard/insights/{id}`

Partially update an insight by ID. Update content (name/description/visualisation/tags) and/or
manage sharing (owners, shared_with, org_access) — only owners may change sharing.
`owners` and `shared_with` replace the whole array (send the complete list); omit them to leave
sharing unchanged, or send `shared_with: []` to revoke all per-user grants.

## Request body

- InsightPatch — Sharing fields that can be mutated via PATCH (owners only). `owners` and `shared_with` are full replacements of their arrays, not merges — omit a field to leave it unchanged.
  - `owners` string[] — Replaces the entire list of owner user ids. Must keep at least one owner (else 400). Omit to leave owners unchanged.
  - `shared_with` ShareGrant[] — Replaces the entire list of per-user grants — any existing grant not included is removed. Omit to leave sharing unchanged; send an empty array to revoke all per-user grants.
    - `user_id` string, required — The id of the user the resource is shared with
    - `permission` 'view' | 'edit', required — Permission level granted to a user (or the whole organization) on a shared resource. `view` allows read-only access; `edit` additionally allows updating the content. Full control (delete and managing sharing) is reserved for owners.
  - `org_access` union — Optional organization-wide grant. When set, every user in the resource's organization is granted this permission level. `null` (or omitted) means the resource is not shared org-wide.
    - 'view' | 'edit'
    - unknown
  - `name` string
  - `description` string
  - `visualisation_id` 'kpi' | 'funnel' | 'toplist' | 'timechart' | 'pie' | 'bar' | 'entity_list' | 'markdown' | 'news_feed' | 'workflow' — Unique identifier for a Visualisation
  - `visualisation_config` VisualisationConfig
    - `query` DatalakeQuery
      - `dataset` string
      - `measure` string
      - `dimensions` object[]
      - `filters` object[]
    - `options` object
  - `tags` string[] — Free-form labels for grouping and filtering insights

## Response `200`

The updated insight

- Insight — Ownership and sharing metadata common to dashboards and insights. `created_*`/`updated_*` fields are managed by the server. `owners`, `shared_with` and `org_access` describe who may access the resource. New resources are private to their creator until shared.
  - `created_by` string — Id of the user who created the resource
  - `created_at` string, date-time
  - `updated_by` string — Id of the user who last updated the resource
  - `updated_at` string, date-time
  - `owner_org_id` string — Id of the organisation that owns the resource. Set at creation time and immutable.
  - `owners` string[] — User ids with full control over the resource (view, edit, delete and manage sharing). The creator is always an owner. There must always be at least one owner.
  - `shared_with` ShareGrant[] — Per-user sharing grants
    - `user_id` string, required — The id of the user the resource is shared with
    - `permission` 'view' | 'edit', required — Permission level granted to a user (or the whole organization) on a shared resource. `view` allows read-only access; `edit` additionally allows updating the content. Full control (delete and managing sharing) is reserved for owners.
  - `org_access` union — Optional organization-wide grant. When set, every user in the resource's organization is granted this permission level. `null` (or omitted) means the resource is not shared org-wide.
    - 'view' | 'edit'
    - unknown
  - `id` string, uuid — Unique identifier for an insight (a saved chart / visualisation)
  - `name` string, required — Human readable name of the insight
  - `description` string
  - `visualisation_id` 'kpi' | 'funnel' | 'toplist' | 'timechart' | 'pie' | 'bar' | 'entity_list' | 'markdown' | 'news_feed' | 'workflow', required — Unique identifier for a Visualisation
  - `visualisation_config` VisualisationConfig
    - `query` DatalakeQuery
      - `dataset` string
      - `measure` string
      - `dimensions` object[]
      - `filters` object[]
    - `options` object
  - `tags` string[] — Free-form labels for grouping and filtering insights

---

[API](https://skmtc.dev/epilot/apis/dashboard-api.md) · [All operations](https://skmtc.dev/epilot/apis/dashboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/epilot/dashboard-api/revisions/91d9e23375ac/schema)
