> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update dashboard

> Replaces a complete dashboard.

`axiom.updateDashboard` replaces a complete dashboard. Pass its current `version` for optimistic concurrency or set `overwrite: true`.

```ts automations/axiom-update-dashboard.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("Update dashboard", () => {
  onHttpRequest({ scope: "automation" })
  axiom.updateDashboard({
    dashboardUid: "operations",
    version: "1751546157768154000",
    dashboard: {
      name: "Operations",
      owner: "X-AXIOM-EVERYONE",
      charts: [],
      layout: [],
      refreshTime: 60,
      schemaVersion: 2,
      timeWindowStart: "qr-now-1h",
      timeWindowEnd: "qr-now",
    },
  })
})
```

## Inputs

`dashboardUid` and the complete schema-version 2 `dashboard` document are required. By default, `overwrite` is `false`, so provide the dashboard's current positive decimal `version` string; alternatively set `overwrite: true`. The string preserves Axiom's 64-bit version exactly. Optional `message` records the change.

This action replaces the entire document. Include every chart, layout entry, section, description, comparison setting, and time-window value to retain.

## Output

Returns `status` (`"created"` or `"updated"`) and the complete resulting dashboard resource. `overwritten` appears when Axiom reports it.

## Permission and failures

The API token needs the organization-level `dashboards|update` capability. Axiom rejects invalid documents and returns `409` or `412` when the supplied version conflicts with the current resource. This replacement mutation is not retried automatically after an ambiguous provider response.
