---
title: NerdGraph tutorial: Move dashboards to other accounts
source: https://docs.newrelic.com/docs/apis/nerdgraph/examples/export-import-dashboards-using-api
---

You can export your [dashboards](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards) and import them into a new account using queries and mutations in [NerdGraph](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph).

> #### 💡 TIP
>
> You can also export your dashboards [as an image](https://docs.newrelic.com/docs/apis/nerdgraph/examples/export-dashboards-pdfpng-using-api).

To do so:

1.  Go to the [GraphiQL explorer](https://api.newrelic.com/graphiql).
2.  Find out [which dashboards are available](#list).
3.  [Export the desired dashboard](#export).
4.  [Import the selected dashboard](#import) into a new account.

## List your dashboards [#list]

Use the following query to retrieve a list of your existing dashboards:

```graphql
{
  actor {
    entitySearch(queryBuilder: {type: DASHBOARD}) {
      results {
        entities {
          ... on DashboardEntityOutline {
            guid
            name
            accountId
          }
        }
      }
    }
  }
}
```

## Export a dashboard [#export]

Use the following query to export, then extract the dashboard's entity information from the output:

```graphql
{
  actor {
    entity(guid: "YOUR_DASHBOARD_GUID") {
      ... on DashboardEntity {
        name
        permissions
        pages {
          name
          widgets {
            visualization { id }
            title
            layout { row width height column }
            rawConfiguration
          }
        }
      }
    }
  }
}
```

Example entity information in GraphiQL output:

![dashboards_api_entity_section.png](https://docs.newrelic.com/images/apis-and-data_screenshot-full_NerdGraph-dashboard-entity.webp "dashboards_api_entity_section.png")

## Import a dashboard into a new account [#import]

Use the following mutation to import the dashboard into another account:

```graphql
mutation create($dashboard: DashboardInput!) {
  dashboardCreate(accountId: YOUR_NEW_ACCOUNT_ID, dashboard: $dashboard) {
    entityResult {
      guid
      name
    }
    errors {
      description
    }
  }
}
```

Follow these steps:

1.  In the **Query variables** section, name the entity `dashboard` (since we declared the input variable as `$dashboard`).
2.  Copy and paste the [entity's output](#export) into the new account. It will be copied as an entity.
3.  Change `entity` to `dashboard`.

    ![dashboards_api_paste_entity.png](https://docs.newrelic.com/images/apis-and-data_screenshot-full_NerdGraph-dashboard-paste.webp "dashboards_api_paste_entity.png")
