Note : This endpoint is in preview and is subject to change.
If you have any feedback, contact Datadog support .
POST https://api.ap1.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed https://api.ap2.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed https://api.datadoghq.eu/api/v2/dashboard/{dashboard_id}/shared/secure-embed https://api.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed https://api.us2.ddog-gov.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed https://api.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed https://api.us3.datadoghq.com/api/v2/dashboard/{dashboard_id}/shared/secure-embed 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 to access this endpoint.
Arguments Path Parameters Request Body Data (required) Secure embed creation request body.
Expand All
Data object for creating a secure embed.
Attributes for creating a secure embed shared dashboard.
Default time range configuration for the secure embed.
Dashboard global time live_span selection.
Allowed enum values: 15m,1h,4h,1d,2d,1w,1mo,3mo
global_time_selectable [required ]
Whether viewers can change the time range.
selectable_template_vars [required ]
Template variables viewers can modify.
Default selected values for the variable.
Name of the template variable. Usually matches the prefix unless you want a different display name.
Tag prefix for the variable (e.g., environment, service).
Restrict which tag values are visible to the viewer.
The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not.
Allowed enum values: active,paused
Display title for the shared dashboard.
viewing_preferences [required ]
Display settings for the secure embed shared dashboard.
Whether widgets are displayed in high density mode.
The theme of the shared dashboard view. system follows the viewer's system default.
Allowed enum values: system,light,dark
Resource type for secure embed create requests.
Allowed enum values: secure_embed_request
{
"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"
}
} Response OK
Response for creating a secure embed shared dashboard.
Expand All
Data object for a secure embed create response.
Attributes of a newly created secure embed shared dashboard.
The secret credential used for HMAC signing. Returned only on creation. Store securely — it cannot be retrieved again.
Default time range configuration for the secure embed.
Dashboard global time live_span selection.
Allowed enum values: 15m,1h,4h,1d,2d,1w,1mo,3mo
Whether time range is viewer-selectable.
Template variables with their configuration.
Default selected values for the variable.
Name of the template variable. Usually matches the prefix unless you want a different display name.
Tag prefix for the variable (e.g., environment, service).
Restrict which tag values are visible to the viewer.
The type of share. Always secure_embed.
Allowed enum values: secure_embed
The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not.
Allowed enum values: active,paused
CDN URL for the shared dashboard.
Display settings for the secure embed shared dashboard.
Whether widgets are displayed in high density mode.
The theme of the shared dashboard view. system follows the viewer's system default.
Allowed enum values: system,light,dark
Resource type for secure embed create responses.
Allowed enum values: secure_embed_create_response
{
"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"
}
} Forbidden
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Dashboard Not Found
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Conflict — max 1000 share URLs per dashboard exceeded
API error response.
Expand All
A human-readable explanation specific to this occurrence of the error.
Non-standard meta-information about the error
References to the source of the error.
A string indicating the name of a single request header which caused the error.
A string indicating which URI query parameter caused the error.
A JSON pointer to the value in the request document that caused the error.
Status code of the response.
Short human-readable summary of the error.
{
"errors" : [
{
"detail" : "Missing required attribute in body" ,
"meta" : {},
"source" : {
"header" : "Authorization" ,
"parameter" : "limit" ,
"pointer" : "/data/attributes/title"
},
"status" : "400" ,
"title" : "Bad Request"
}
]
} Too many requests
{
"errors" : [
"Bad Request"
]
} Code Example Copy
## default
#
# Path parameters export dashboard_id = "abc-def-ghi" # Curl command curl -X POST "https://api.ap1.datadoghq.com "https://api.ap2.datadoghq.com "https://api.datadoghq.eu "https://api.ddog-gov.com "https://api.us2.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