---
schema_version: "1"
id: ea6214bcc0c95e44f043813f50a93aa6e6a0869993f287223be4c9a16a2856cc
title: Save a Dashboard with a Custom Lightning Web Component (Beta)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/api_analytics/guides/examples/dashboards/analytics-api-dashboard-save-lwc-in-dashboard.md
canonical_url: https://developer.salesforce.com/docs/analytics/salesforce-analytics-rest-api/guide/analytics-api-dashboard-save-lwc-in-dashboard.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2d64a1fed5540e8b5ed58ef41b84eb4819f7b40d69a8ccda3c61452bc793eaf7
products:
  - Salesforce Reports and Dashboards REST API Developer Guide
  - analytics
---

# Save a Dashboard with a Custom Lightning Web Component (Beta)

You can save a dashboard with a custom Lightning web component by sending a PATCH request to the Dashboard Results resource.

**note:** This feature is a pilot or beta service that is subject to the Beta Services Terms at [Agreements - Salesforce.com](https://www.salesforce.com/company/legal/) or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the [Product Terms Directory](https://ptd.salesforce.com/). Use of this pilot or beta service is at the Customer’s sole discretion.

## Example Usage

```nolang
/services/data/v31.0/analytics/dashboards/01ZD00000007S89MAE
```

## Example Request Body

```nolang
{
    "components": [{
        "header": "",
        "properties": {
            "content": {
                "componentParameters": "{\"componentApiName\":\"c:kpiDashboard\",\"properties\":\"{\\\"maxCards\\\":1,\\\"showProgressBars\\\":true,\\\"showSummary\\\":false}\"}"
            },
            "visualizationType": "LightningWebComponent"
        },
        "type": "Dashboard",
        "componentData": 0
    }]
}
```

## Example Response Body

```nolang
components" : [{
    "chartTheme" : null,
    "componentData" : null,
    "footer" : null,
    "header" : null,
    "id" : "01aSG0000088inFYAQ",
    "lastModifiedDate" : "2025-12-18T05:03:56Z",
    "properties" : {
        "content" : {
            "componentParameters" : "{\"componentApiName\":\"c:kpiDashboard\",\"properties\":\"{\\\"maxCards\\\":1,\\\"showProgressBars\\\":true,\\\"showSummary\\\":false}\"}"
        },
        "visualizationType" : "LightningWebComponent"
    },
    "reportId" : null,
    "title" : null,
    "type" : "Dashboard"
}]
```

