---
title: "Create a secure embed for a dashboard"
method: POST
path: "/api/v2/dashboard/{dashboard_id}/shared/secure-embed"
tags: ["Dashboard Secure Embed"]
---

# Create a secure embed for a dashboard

`POST /api/v2/dashboard/{dashboard_id}/shared/secure-embed`

Create a secure embed share for a dashboard. The response includes a one-time `credential` used for HMAC-SHA256 signing. Store it securely — it cannot be retrieved again.

## Path parameters

- `dashboard_id` string, required

## Request body

- SecureEmbedCreateRequest — Request to create a secure embed shared dashboard.
  - `data` SecureEmbedCreateRequestData, required — Data object for creating a secure embed.
    - `attributes` SecureEmbedCreateRequestAttributes, required — Attributes for creating a secure embed shared dashboard.
      - `global_time` SecureEmbedGlobalTime, required — Default time range configuration for the secure embed.
        - `live_span` '15m' | '1h' | '4h' | '1d' | '2d' | '1w' | '1mo' | '3mo' — Dashboard global time live_span selection.
      - `global_time_selectable` boolean, required — Whether viewers can change the time range.
      - `selectable_template_vars` SecureEmbedSelectableTemplateVariable[], required — Template variables viewers can modify.
        - `default_values` string[] — Default selected values for the variable.
        - `name` string — Name of the template variable. Usually matches the prefix unless you want a different display name.
        - `prefix` string — Tag prefix for the variable (e.g., `environment`, `service`).
        - `visible_tags` string[] — Restrict which tag values are visible to the viewer.
      - `status` 'active' | 'paused', required — The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not.
      - `title` string, required — Display title for the shared dashboard.
      - `viewing_preferences` SecureEmbedViewingPreferences, required — Display settings for the secure embed shared dashboard.
        - `high_density` boolean — Whether widgets are displayed in high density mode.
        - `theme` 'system' | 'light' | 'dark' — The theme of the shared dashboard view. `system` follows the viewer's system default.
    - `type` 'secure_embed_request', required — Resource type for secure embed create requests.

## Response `200`

OK

- SecureEmbedCreateResponse — Response for creating a secure embed shared dashboard.
  - `data` SecureEmbedCreateResponseData, required — Data object for a secure embed create response.
    - `attributes` SecureEmbedCreateResponseAttributes, required — Attributes of a newly created secure embed shared dashboard.
      - `created_at` string — Creation timestamp.
      - `credential` string — The secret credential used for HMAC signing. Returned only on creation. Store securely — it cannot be retrieved again.
      - `dashboard_id` string — The source dashboard ID.
      - `global_time` SecureEmbedGlobalTime — Default time range configuration for the secure embed.
        - `live_span` '15m' | '1h' | '4h' | '1d' | '2d' | '1w' | '1mo' | '3mo' — Dashboard global time live_span selection.
      - `global_time_selectable` boolean — Whether time range is viewer-selectable.
      - `id` string — Internal share ID.
      - `selectable_template_vars` SecureEmbedSelectableTemplateVariable[] — Template variables with their configuration.
        - `default_values` string[] — Default selected values for the variable.
        - `name` string — Name of the template variable. Usually matches the prefix unless you want a different display name.
        - `prefix` string — Tag prefix for the variable (e.g., `environment`, `service`).
        - `visible_tags` string[] — Restrict which tag values are visible to the viewer.
      - `share_type` 'secure_embed' — The type of share. Always `secure_embed`.
      - `status` 'active' | 'paused' — The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not.
      - `title` string — Display title.
      - `token` string — Public share token.
      - `url` string — CDN URL for the shared dashboard.
      - `viewing_preferences` SecureEmbedViewingPreferences — Display settings for the secure embed shared dashboard.
        - `high_density` boolean — Whether widgets are displayed in high density mode.
        - `theme` 'system' | 'light' | 'dark' — The theme of the shared dashboard view. `system` follows the viewer's system default.
    - `id` string, required — Internal share ID.
    - `type` 'secure_embed_create_response', required — Resource type for secure embed create responses.

## Other responses

- `403` — Forbidden
- `404` — Dashboard Not Found
- `409` — Conflict — max 1000 share URLs per dashboard exceeded
- `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)
