---
title: "Create replay heatmap snapshot"
method: POST
path: "/api/v2/replay/heatmap/snapshots"
tags: ["Rum Replay Heatmaps"]
---

# Create replay heatmap snapshot

`POST /api/v2/replay/heatmap/snapshots`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/replay/heatmap/snapshots`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`

Create a heatmap snapshot.

## Request body

- SnapshotCreateRequest: Request body for creating a heatmap snapshot.
  - `data` SnapshotCreateRequestData, required: Data object for a heatmap snapshot creation request, containing the resource type and attributes.
    - `attributes` SnapshotCreateRequestDataAttributes: Attributes for creating a heatmap snapshot, including the view, session, event, and device context.
      - `application_id` string, required: Unique identifier of the RUM application.
      - `device_type` string, required: Device type used when capturing the snapshot (e.g., desktop, mobile, tablet).
      - `event_id` string, required: Unique identifier of the RUM event associated with the snapshot.
      - `is_device_type_selected_by_user` boolean, required: Indicates whether the device type was explicitly selected by the user rather than auto-detected.
      - `session_id` string: Unique identifier of the RUM session associated with the snapshot.
      - `snapshot_name` string, required: Human-readable name for the snapshot.
      - `start` integer, required: Offset in milliseconds from the start of the session at which the snapshot was captured.
      - `view_id` string: Unique identifier of the RUM view associated with the snapshot.
      - `view_name` string, required: URL path or name of the view where the snapshot was captured.
    - `type` 'snapshots', required: Snapshots resource type.

## Response `201`

Created

- Snapshot: A single heatmap snapshot resource returned by create or update operations.
  - `data` SnapshotData: Data object representing a heatmap snapshot, including its identifier, type, and attributes.
    - `attributes` SnapshotDataAttributes: Attributes of a heatmap snapshot, including view context, device information, and audit metadata.
      - `application_id` string: Unique identifier of the RUM application.
      - `created_at` string, date-time: Timestamp when the snapshot was created.
      - `created_by` string: Display name of the user who created the snapshot.
      - `created_by_handle` string: Email handle of the user who created the snapshot.
      - `created_by_user_id` integer: Numeric identifier of the user who created the snapshot.
      - `device_type` string: Device type used when capturing the snapshot (e.g., desktop, mobile, tablet).
      - `event_id` string: Unique identifier of the RUM event associated with the snapshot.
      - `is_device_type_selected_by_user` boolean: Indicates whether the device type was explicitly selected by the user rather than auto-detected.
      - `modified_at` string, date-time: Timestamp when the snapshot was last modified.
      - `org_id` integer: Numeric identifier of the organization that owns the snapshot.
      - `session_id` string: Unique identifier of the RUM session associated with the snapshot.
      - `snapshot_name` string: Human-readable name for the snapshot.
      - `start` integer: Offset in milliseconds from the start of the session at which the snapshot was captured.
      - `view_id` string: Unique identifier of the RUM view associated with the snapshot.
      - `view_name` string: URL path or name of the view where the snapshot was captured.
    - `id` string: Unique identifier of the heatmap snapshot.
    - `type` 'snapshots', required: Snapshots resource type.

## Other responses

- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
