---
title: Dashboard Secure Embed
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Dashboard Secure Embed
---

# Dashboard Secure Embed

Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256 signed sessions for authentication, enabling customers to embed dashboards in their own applications with server-side auth control. Unlike public dashboards (open URL) or invite dashboards (email-based access), secure embeds provide programmatic access control. **Requirements:** - Org setting: SharedDashboards > Embed sharing must be enabled. - AuthN: Datadog API key and application key. - Read operations require `dashboards_read` permission. - Write operations require `dashboards_embed_share` permission.

## Create a secure embed for a dashboard{% #create-a-secure-embed-for-a-dashboard %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                           |
| ----------------- | -------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/dashboard/{dashboard_id}/shared/secure-embed      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed      |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed |

### Overview

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. This endpoint requires the `dashboards_embed_share` permission.

OAuth apps require the `dashboards_embed_share` authorization [scope](https://docs.datadoghq.com/api/latest/scopes/#dashboard-secure-embed) to access this endpoint.



### Arguments

#### Path Parameters

| Name                           | Type   | Description              |
| ------------------------------ | ------ | ------------------------ |
| dashboard_id [*required*] | string | The ID of the dashboard. |

### Request

#### Body Data (required)

Secure embed creation request body.

{% tab title="Model" %}

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

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "global_time": {
        "live_span": "1h"
      },
      "global_time_selectable": true,
      "selectable_template_vars": [
        {
          "default_values": [
            "1"
          ],
          "name": "org_id",
          "prefix": "org_id",
          "visible_tags": [
            "1"
          ]
        }
      ],
      "status": "active",
      "title": "Q1 Metrics Dashboard",
      "viewing_preferences": {
        "high_density": false,
        "theme": "system"
      }
    },
    "type": "secure_embed_request"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response for creating a secure embed shared dashboard.

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

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2026-03-11T18:30:00.000000",
      "credential": "A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6Q7r8S9t0U1v2",
      "dashboard_id": "abc-def-ghi",
      "global_time": {
        "live_span": "1h"
      },
      "global_time_selectable": true,
      "id": "12345",
      "selectable_template_vars": [
        {
          "default_values": [
            "1"
          ],
          "name": "org_id",
          "prefix": "org_id",
          "visible_tags": [
            "1"
          ]
        }
      ],
      "share_type": "secure_embed",
      "status": "active",
      "title": "Q1 Metrics Dashboard",
      "token": "s3cur3t0k3n-abcdef123456",
      "url": "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456",
      "viewing_preferences": {
        "high_density": false,
        "theme": "system"
      }
    },
    "id": "12345",
    "type": "secure_embed_create_response"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Dashboard Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="409" %}
Conflict — max 1000 share URLs per dashboard exceeded
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## json-request-body
# 
\# Path parametersexport dashboard_id="abc-def-ghi"\# Curl commandcurl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/dashboard/${dashboard_id}/shared/secure-embed" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "global_time": {
        "live_span": "1h"
      },
      "global_time_selectable": true,
      "selectable_template_vars": [
        {
          "default_values": [
            "1"
          ],
          "name": "org_id",
          "prefix": "org_id",
          "visible_tags": [
            "1"
          ]
        }
      ],
      "status": "active",
      "title": "Q1 Metrics Dashboard",
      "viewing_preferences": {
        "high_density": false,
        "theme": "system"
      }
    },
    "type": "secure_embed_request"
  }
}
EOF
                
{% /tab %}

## Get a secure embed for a dashboard{% #get-a-secure-embed-for-a-dashboard %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                  |
| ----------------- | --------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}      |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |

### Overview

Retrieve an existing secure embed configuration for a dashboard. This endpoint requires the `dashboards_read` permission.

OAuth apps require the `dashboards_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes/#dashboard-secure-embed) to access this endpoint.



### Arguments

#### Path Parameters

| Name                           | Type   | Description                                   |
| ------------------------------ | ------ | --------------------------------------------- |
| dashboard_id [*required*] | string | The ID of the dashboard.                      |
| token [*required*]        | string | The share token identifying the secure embed. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response for getting a secure embed shared dashboard.

| Parent field             | Field                        | Type     | Description                                                                                                                                        |
| ------------------------ | ---------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|                          | data [*required*]       | object   | Data object for a secure embed get response.                                                                                                       |
| data                     | attributes [*required*] | object   | Attributes of an existing secure embed shared dashboard.                                                                                           |
| attributes               | created_at                   | string   | Creation timestamp.                                                                                                                                |
| attributes               | credential_suffix            | string   | Last 4 characters of the credential. Defaults to `0000` if unavailable.                                                                            |
| attributes               | dashboard_id                 | string   | The source dashboard ID.                                                                                                                           |
| attributes               | global_time                  | object   | Default time range configuration for the secure embed.                                                                                             |
| global_time              | live_span                    | enum     | Dashboard global time live_span selection. Allowed enum values: `15m,1h,4h,1d,2d,1w,1mo,3mo`                                                       |
| attributes               | global_time_selectable       | boolean  | Whether time range is viewer-selectable.                                                                                                           |
| attributes               | id                           | string   | Internal share ID.                                                                                                                                 |
| attributes               | selectable_template_vars     | [object] | Template variables with their configuration.                                                                                                       |
| selectable_template_vars | default_values               | [string] | Default selected values for the variable.                                                                                                          |
| selectable_template_vars | name                         | string   | Name of the template variable. Usually matches the prefix unless you want a different display name.                                                |
| selectable_template_vars | prefix                       | string   | Tag prefix for the variable (e.g., `environment`, `service`).                                                                                      |
| selectable_template_vars | visible_tags                 | [string] | Restrict which tag values are visible to the viewer.                                                                                               |
| attributes               | share_type                   | enum     | The type of share. Always `secure_embed`. Allowed enum values: `secure_embed`                                                                      |
| attributes               | status                       | enum     | The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. Allowed enum values: `active,paused` |
| attributes               | title                        | string   | Display title.                                                                                                                                     |
| attributes               | token                        | string   | Public share token.                                                                                                                                |
| attributes               | url                          | string   | CDN URL for the shared dashboard.                                                                                                                  |
| attributes               | viewing_preferences          | object   | Display settings for the secure embed shared dashboard.                                                                                            |
| viewing_preferences      | high_density                 | boolean  | Whether widgets are displayed in high density mode.                                                                                                |
| viewing_preferences      | theme                        | enum     | The theme of the shared dashboard view. `system` follows the viewer's system default. Allowed enum values: `system,light,dark`                     |
| data                     | id [*required*]         | string   | Internal share ID.                                                                                                                                 |
| data                     | type [*required*]       | enum     | Resource type for secure embed get responses. Allowed enum values: `secure_embed_get_response`                                                     |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2026-03-11T18:30:00.000000",
      "credential_suffix": "ab3f",
      "dashboard_id": "abc-def-ghi",
      "global_time": {
        "live_span": "1h"
      },
      "global_time_selectable": true,
      "id": "12345",
      "selectable_template_vars": [
        {
          "default_values": [
            "1"
          ],
          "name": "org_id",
          "prefix": "org_id",
          "visible_tags": [
            "1"
          ]
        }
      ],
      "share_type": "secure_embed",
      "status": "active",
      "title": "Q1 Metrics Dashboard",
      "token": "s3cur3t0k3n-abcdef123456",
      "url": "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456",
      "viewing_preferences": {
        "high_density": false,
        "theme": "system"
      }
    },
    "id": "12345",
    "type": "secure_embed_get_response"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport dashboard_id="abc-def-ghi"export token="s3cur3t0k3n-abcdef123456"\# Curl commandcurl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/dashboard/${dashboard_id}/shared/secure-embed/${token}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}

## Update a secure embed for a dashboard{% #update-a-secure-embed-for-a-dashboard %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                    |
| ----------------- | ----------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}      |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |

### Overview

Partially update a secure embed configuration. All fields are optional (PATCH semantics). This endpoint requires the `dashboards_embed_share` permission.

OAuth apps require the `dashboards_embed_share` authorization [scope](https://docs.datadoghq.com/api/latest/scopes/#dashboard-secure-embed) to access this endpoint.



### Arguments

#### Path Parameters

| Name                           | Type   | Description                                   |
| ------------------------------ | ------ | --------------------------------------------- |
| dashboard_id [*required*] | string | The ID of the dashboard.                      |
| token [*required*]        | string | The share token identifying the secure embed. |

### Request

#### Body Data (required)

Secure embed update request body.

{% tab title="Model" %}

| Parent field             | Field                        | Type     | Description                                                                                                                                        |
| ------------------------ | ---------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|                          | data [*required*]       | object   | Data object for updating a secure embed.                                                                                                           |
| data                     | attributes [*required*] | object   | Attributes for updating a secure embed shared dashboard. All fields are optional.                                                                  |
| attributes               | global_time                  | object   | Default time range configuration for the secure embed.                                                                                             |
| global_time              | live_span                    | enum     | Dashboard global time live_span selection. Allowed enum values: `15m,1h,4h,1d,2d,1w,1mo,3mo`                                                       |
| attributes               | global_time_selectable       | boolean  | Updated time selectability.                                                                                                                        |
| attributes               | selectable_template_vars     | [object] | Updated template variables.                                                                                                                        |
| selectable_template_vars | default_values               | [string] | Default selected values for the variable.                                                                                                          |
| selectable_template_vars | name                         | string   | Name of the template variable. Usually matches the prefix unless you want a different display name.                                                |
| selectable_template_vars | prefix                       | string   | Tag prefix for the variable (e.g., `environment`, `service`).                                                                                      |
| selectable_template_vars | visible_tags                 | [string] | Restrict which tag values are visible to the viewer.                                                                                               |
| attributes               | status                       | enum     | The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. Allowed enum values: `active,paused` |
| attributes               | title                        | string   | Updated title.                                                                                                                                     |
| attributes               | viewing_preferences          | object   | Display settings for the secure embed shared dashboard.                                                                                            |
| viewing_preferences      | high_density                 | boolean  | Whether widgets are displayed in high density mode.                                                                                                |
| viewing_preferences      | theme                        | enum     | The theme of the shared dashboard view. `system` follows the viewer's system default. Allowed enum values: `system,light,dark`                     |
| data                     | type [*required*]       | enum     | Resource type for secure embed update requests. Allowed enum values: `secure_embed_update_request`                                                 |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "global_time": {
        "live_span": "1h"
      },
      "global_time_selectable": true,
      "selectable_template_vars": [
        {
          "default_values": [
            "1"
          ],
          "name": "org_id",
          "prefix": "org_id",
          "visible_tags": [
            "1"
          ]
        }
      ],
      "status": "active",
      "title": "Q1 Metrics Dashboard (Updated)",
      "viewing_preferences": {
        "high_density": false,
        "theme": "system"
      }
    },
    "type": "secure_embed_update_request"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response for updating a secure embed shared dashboard.

| Parent field             | Field                        | Type     | Description                                                                                                                                        |
| ------------------------ | ---------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|                          | data [*required*]       | object   | Data object for a secure embed update response.                                                                                                    |
| data                     | attributes [*required*] | object   | Attributes of an updated secure embed shared dashboard.                                                                                            |
| attributes               | created_at                   | string   | Creation timestamp.                                                                                                                                |
| attributes               | credential_suffix            | string   | Last 4 characters of the credential. Defaults to `0000` if unavailable.                                                                            |
| attributes               | dashboard_id                 | string   | The source dashboard ID.                                                                                                                           |
| attributes               | global_time                  | object   | Default time range configuration for the secure embed.                                                                                             |
| global_time              | live_span                    | enum     | Dashboard global time live_span selection. Allowed enum values: `15m,1h,4h,1d,2d,1w,1mo,3mo`                                                       |
| attributes               | global_time_selectable       | boolean  | Whether time range is viewer-selectable.                                                                                                           |
| attributes               | id                           | string   | Internal share ID.                                                                                                                                 |
| attributes               | selectable_template_vars     | [object] | Template variables with their configuration.                                                                                                       |
| selectable_template_vars | default_values               | [string] | Default selected values for the variable.                                                                                                          |
| selectable_template_vars | name                         | string   | Name of the template variable. Usually matches the prefix unless you want a different display name.                                                |
| selectable_template_vars | prefix                       | string   | Tag prefix for the variable (e.g., `environment`, `service`).                                                                                      |
| selectable_template_vars | visible_tags                 | [string] | Restrict which tag values are visible to the viewer.                                                                                               |
| attributes               | share_type                   | enum     | The type of share. Always `secure_embed`. Allowed enum values: `secure_embed`                                                                      |
| attributes               | status                       | enum     | The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. Allowed enum values: `active,paused` |
| attributes               | title                        | string   | Display title.                                                                                                                                     |
| attributes               | token                        | string   | Public share token.                                                                                                                                |
| attributes               | url                          | string   | CDN URL for the shared dashboard.                                                                                                                  |
| attributes               | viewing_preferences          | object   | Display settings for the secure embed shared dashboard.                                                                                            |
| viewing_preferences      | high_density                 | boolean  | Whether widgets are displayed in high density mode.                                                                                                |
| viewing_preferences      | theme                        | enum     | The theme of the shared dashboard view. `system` follows the viewer's system default. Allowed enum values: `system,light,dark`                     |
| data                     | id [*required*]         | string   | Internal share ID.                                                                                                                                 |
| data                     | type [*required*]       | enum     | Resource type for secure embed update responses. Allowed enum values: `secure_embed_update_response`                                               |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "created_at": "2026-03-11T18:30:00.000000",
      "credential_suffix": "ab3f",
      "dashboard_id": "abc-def-ghi",
      "global_time": {
        "live_span": "1h"
      },
      "global_time_selectable": true,
      "id": "12345",
      "selectable_template_vars": [
        {
          "default_values": [
            "1"
          ],
          "name": "org_id",
          "prefix": "org_id",
          "visible_tags": [
            "1"
          ]
        }
      ],
      "share_type": "secure_embed",
      "status": "active",
      "title": "Q1 Metrics Dashboard (Updated)",
      "token": "s3cur3t0k3n-abcdef123456",
      "url": "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456",
      "viewing_preferences": {
        "high_density": false,
        "theme": "system"
      }
    },
    "id": "12345",
    "type": "secure_embed_update_response"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## json-request-body
# 
\# Path parametersexport dashboard_id="abc-def-ghi"export token="s3cur3t0k3n-abcdef123456"\# Curl commandcurl -X PATCH "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/dashboard/${dashboard_id}/shared/secure-embed/${token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "status": "active",
      "title": "Q1 Metrics Dashboard (Updated)"
    },
    "type": "secure_embed_update_request"
  }
}
EOF
                
{% /tab %}

## Delete a secure embed for a dashboard{% #delete-a-secure-embed-for-a-dashboard %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | DELETE https://api.ap1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| ap2.datadoghq.com | DELETE https://api.ap2.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| app.datadoghq.eu  | DELETE https://api.datadoghq.eu/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}      |
| app.ddog-gov.com  | DELETE https://api.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}      |
| app.datadoghq.com | DELETE https://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}     |
| us3.datadoghq.com | DELETE https://api.us3.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |
| us5.datadoghq.com | DELETE https://api.us5.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token} |

### Overview

Delete a secure embed share for a dashboard. This endpoint requires the `dashboards_embed_share` permission.

OAuth apps require the `dashboards_embed_share` authorization [scope](https://docs.datadoghq.com/api/latest/scopes/#dashboard-secure-embed) to access this endpoint.



### Arguments

#### Path Parameters

| Name                           | Type   | Description                                   |
| ------------------------------ | ------ | --------------------------------------------- |
| dashboard_id [*required*] | string | The ID of the dashboard.                      |
| token [*required*]        | string | The share token identifying the secure embed. |

### Response

{% tab title="204" %}
No Content
{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parametersexport dashboard_id="abc-def-ghi"export token="s3cur3t0k3n-abcdef123456"\# Curl commandcurl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/dashboard/${dashboard_id}/shared/secure-embed/${token}" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
                
{% /tab %}
