---
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: ["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
  - `dashboard` Json, required
  - `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`.
  - `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/nforgeio/apis/grafana-http-api.md) · [All operations](https://skmtc.net/nforgeio/apis/grafana-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nforgeio/grafana-http-api/revisions/3cb6c3f42dc7/schema)
