---
title: "Create a graph snapshot"
method: POST
path: "/api/v2/snapshot"
tags: ["Reporting And Sharing"]
---

# Create a graph snapshot

`POST /api/v2/snapshot`

Create a snapshot of a graph widget. The snapshot is rendered asynchronously; the returned URL can be polled until the image is ready.

## Request body

- CreateSnapshotRequest — Request body for creating a graph snapshot.
  - `data` CreateSnapshotDataRequest, required — Data envelope for snapshot creation.
    - `attributes` CreateSnapshotDataAttributesRequest, required — Attributes for snapshot creation.
      - `additional_config` CreateSnapshotAdditionalConfig — Additional configuration options for snapshot creation.
        - `template_variables` CreateSnapshotTemplateVariable[] — List of template variable definitions for snapshot rendering.
          - `name` string, required — The template variable name.
          - `prefix` string, required — The tag prefix associated with the template variable. For example, a prefix of `host` with a value of `web-server-1` scopes the snapshot to `host:web-server-1`.
          - `values` string[], required — The list of scoped values for this template variable.
        - `timeseries_legend_type` 'compact' | 'expanded' | 'none' — The legend display type for timeseries widgets. A value of `none` hides the legend entirely; omitting the field lets the frontend choose automatically.
        - `timezone_offset_minutes` integer — Timezone offset in minutes from UTC. Positive values are west of UTC (for example, `300` for UTC-5). Use `0` for UTC.
      - `end` integer, required — End of the time window for the snapshot, in milliseconds since Unix epoch.
      - `height` integer — The height of the rendered snapshot in pixels.
      - `is_authenticated` boolean — Whether the snapshot requires authentication to view. Authenticated snapshots are scoped to the creating organization.
      - `start` integer, required — Start of the time window for the snapshot, in milliseconds since Unix epoch.
      - `ttl` '30d' | '60d' | '90d' | '1y' | '2y' | 'inf' — The time-to-live for the snapshot. This value corresponds to storage lifecycle policies that automatically delete the snapshot after the specified period.
      - `widget_definition` object, required — The widget definition to render as a snapshot. Must include a valid `type` field and non-empty `requests` array.
      - `width` integer — The width of the rendered snapshot in pixels.
    - `type` 'create_snapshot', required — The type identifier for snapshot creation resources.

## Response `200`

OK

- CreateSnapshotResponse — Response body for a snapshot creation request.
  - `data` CreateSnapshotDataResponse, required — Data envelope for the snapshot creation response.
    - `attributes` CreateSnapshotDataAttributesResponse, required — Attributes of the created snapshot.
      - `url` string, required — The URL to access the rendered snapshot image.
    - `id` string, required — The unique identifier of the created snapshot.
    - `type` 'create_snapshot', required — The type identifier for snapshot creation resources.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

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