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

# Update a secure embed for a dashboard

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

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}`
- 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` scopes: `dashboards_embed_share`

Partially update a secure embed configuration. All fields are optional (PATCH semantics).

## Path parameters

- `dashboard_id` string, required
- `token` string, required

## Request body

- SecureEmbedUpdateRequest: Request to update a secure embed shared dashboard.
  - `data` SecureEmbedUpdateRequestData, required: Data object for updating a secure embed.
    - `attributes` SecureEmbedUpdateRequestAttributes, required: Attributes for updating a secure embed shared dashboard. All fields are optional.
      - `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: Updated time selectability.
      - `selectable_template_vars` SecureEmbedSelectableTemplateVariable[]: Updated template variables.
        - `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': The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not.
      - `title` string: Updated title.
      - `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.
    - `type` 'secure_embed_update_request', required: Resource type for secure embed update requests.

## Response `200`

OK

- SecureEmbedUpdateResponse: Response for updating a secure embed shared dashboard.
  - `data` SecureEmbedUpdateResponseData, required: Data object for a secure embed update response.
    - `attributes` SecureEmbedUpdateResponseAttributes, required: Attributes of an updated secure embed shared dashboard.
      - `created_at` string: Creation timestamp.
      - `credential_suffix` string: Last 4 characters of the credential. Defaults to `0000` if unavailable.
      - `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_update_response', required: Resource type for secure embed update responses.

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `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)
