---
title: Update Dashboard
description: "Update dashboard name, description, or defaults. Include the revision from an editable or references read. Omitted fields remain unchanged; an empty descript…"
product: general
lang: en
token_estimate: 1364
---
# Update Dashboard

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Update Dashboard

**PATCH** `/console/v1/dashboards/{id}`

Full URL: `https://statsigapi.net/console/v1/dashboards/{id}`

Update Dashboard

Update dashboard name, description, or defaults. Include the revision from an editable or references read. Omitted fields remain unchanged; an empty description clears it and defaults:null resets dashboard defaults. Read again after a revision conflict.

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| STATSIG-API-KEY | string | Yes | — | apiKey (header) |

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id (path) | string | Yes | — | id |

## Body (application/json)

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| revision | string | Yes | — | Include the `revision` returned by an editable or references read. Read the dashboard again after a revision conflict. |
| name | string | No | — | Constraints: min length: 1, max length: 200 |
| description | string | No | — | Set an empty string to clear the dashboard description. Constraints: max length: 10000 |
| defaults | object | No | — | Update only the supplied defaults. Set `null` to reset to 30 days and daily granularity. Constraints: nullable |
| defaults.date | oneOf | No | — | Constraints: object, object, object, object |
| defaults.date.value | integer or number | No | — | Constraints: min: 0 |
| defaults.date.unit | string | No | — | Allowed values: day, week, month, minute, hour |
| defaults.date.mode | string | No | — | Allowed values: chart_default, since, relative |
| defaults.date.since_ms | number | No | — | — |
| defaults.granularity | string | No | — | Allowed values: auto, daily, weekly, monthly |

## Response (application/json)

**200** — Updated dashboard identity and revision.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | Yes | — | A simple string explaining the result of the operation. |
| data | object | Yes | — | — |
| data.id | string | Yes | — | — |
| data.revision | string | Yes | — | — |

```json
{
  "message": "string",
  "data": {
    "id": "string",
    "revision": "string"
  }
}
```

**400** — Invalid request. Please check the request input and try again.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 400 |
| message | string | Yes | — | — |

```json
{
  "status": 400,
  "message": "Invalid request. Please check the request input and try again."
}
```

**404** — Not Found. The requested resource could not be found.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 404 |
| message | string | Yes | — | — |

```json
{
  "status": 404,
  "message": "Not Found. The requested resource could not be found."
}
```

**412** — The revision changed. Read the dashboard again and reapply the edit.

## Code samples

### cURL

```bash
curl -X PATCH "https://statsigapi.net/console/v1/dashboards/{id}" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.patch(
    "https://statsigapi.net/console/v1/dashboards/{id}",
    headers={
        "Content-Type": "application/json",
        "STATSIG-API-KEY": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://statsigapi.net/console/v1/dashboards/{id}", {
  method: "PATCH",
  headers: {
    "Content-Type": "application/json",
    "STATSIG-API-KEY": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://statsigapi.net/console/v1/dashboards/{id}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "STATSIG-API-KEY: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
req, _ := http.NewRequest("PATCH", "https://statsigapi.net/console/v1/dashboards/{id}", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("STATSIG-API-KEY", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://statsigapi.net/console/v1/dashboards/{id}"))
      .method("PATCH", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("STATSIG-API-KEY", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://statsigapi.net/console/v1/dashboards/{id}")
request = Net::HTTP::Patch.new(uri)
request["Content-Type"] = "application/json"
request["STATSIG-API-KEY"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

