---
title: "When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI."
method: POST
path: "/snapshots"
tags: ["dashboards", "snapshots"]
---

# When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.

`POST /snapshots`

Snapshot public mode should be enabled or authentication is required.

## Request body

- CreateDashboardSnapshotCommand
  - `apiVersion` string — APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +optional
  - `dashboard` Unstructured, required — Unstructured allows objects that do not have Golang structs registered to be manipulated generically.
    - `Object` object — Object is a JSON compatible map with string, float, int, bool, []any, or map[string]any children.
  - `deleteKey` string — Unique key used to delete the snapshot. It is different from the `key` so that only the creator can delete the snapshot. Required if `external` is `true`.
  - `expires` integer — When the snapshot should expire in seconds in seconds. Default is never to expire.
  - `external` boolean — these are passed when storing an external snapshot ref Save the snapshot on an external server rather than locally.
  - `key` string — Define the unique key. Required if `external` is `true`.
  - `kind` string — Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional
  - `name` string — Snapshot name

## Response `200`

(empty)

- object
  - `deleteKey` string — Unique key used to delete the snapshot. It is different from the key so that only the creator can delete the snapshot.
  - `deleteUrl` string
  - `id` integer — Snapshot id
  - `key` string — Unique key
  - `url` string

## Other responses

- `401` — UnauthorizedError is returned when the request is not authenticated.
- `403` — ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
- `500` — InternalServerError is a general error indicating something went wrong internally.

---

[API](https://skmtc.net/grafana/apis/http-api.md) · [All operations](https://skmtc.net/grafana/apis/http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grafana/http-api/revisions/df55ba1718ba/schema)
