---
title: "Create Widget From Template"
method: POST
path: "/api/v1/dashboards/{dashboard_id}/widgets/from-template"
tags: ["dashboards"]
---

# Create Widget From Template

`POST /api/v1/dashboards/{dashboard_id}/widgets/from-template`

Instantiate a library template onto a dashboard (copy-on-instantiate, PR10).

Copies the template's config onto a new widget with a frozen
``source_config_snapshot`` baseline. ``template_ref`` is a system registry key
or a ``UserWidgetTemplate`` id.

## Path parameters

- `dashboard_id` string, uuid, required

## Request body

- WidgetFromTemplateCreate — Instantiate a template onto a dashboard (PR10). ``template_ref`` is the catalog ``ref``: a system registry key or a ``UserWidgetTemplate`` id (string). ``position`` is optional — omitted, the server places the widget in a fresh row below the current layout.
  - `template_ref` string, required
  - `position` object, nullable

## Response `201`

Successful Response

- WidgetRead
  - `id` string, uuid, required
  - `dashboard_id` string, uuid, required
  - `title` string, required
  - `viz_type` 'line' | 'bar' | 'pie' | 'number' | 'pivot' | 'logs_table' | 'heatmap', required
  - `config` object, required
  - `position` object, required
  - `is_system` boolean
  - `source_kind` 'system' | 'user', nullable
  - `source_ref` string, nullable
  - `source_config_snapshot` object, nullable
  - `source_viz_snapshot` 'line' | 'bar' | 'pie' | 'number' | 'pivot' | 'logs_table' | 'heatmap'
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `404` — Not found
- `422` — Validation Error

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getanana/cleon-api/revisions/3ad158624c53/schema)
