> ## 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.

# Create dashboard

> Creates a schema-version 2 dashboard.

`axiom.createDashboard` creates a schema-version 2 dashboard. Query charts require exactly one APL or MPL query. Note, monitor-list, and smart-filter charts require their chart-specific content. Layout heights are whole grid units from 1 through 100, and time windows use Axiom's `qr-now` form, timestamps, or dates. Axiom can generate the UID; use `X-AXIOM-EVERYONE` as owner for organization visibility.

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

export default automation("Create dashboard", () => {
  onHttpRequest({ scope: "automation" })
  axiom.createDashboard({
    uid: "operations",
    dashboard: {
      name: "Operations",
      owner: "X-AXIOM-EVERYONE",
      charts: [],
      layout: [],
      refreshTime: 60,
      schemaVersion: 2,
      timeWindowStart: "qr-now-30m",
      timeWindowEnd: "qr-now",
    },
  })
})
```

## Inputs

`dashboard` is required and must contain a 1–100 character `name`, non-empty `owner`, up to 200 charts and layout entries, `refreshTime` of `15`, `60`, or `300`, `schemaVersion: 2`, and valid `timeWindowStart` and `timeWindowEnd`. Use values such as `"qr-now-30m"` and `"qr-now"`, numeric timestamps, or ISO 8601 dates. Each layout entry uses a 12-column grid and references a chart ID. Optional dashboard fields configure description, comparison window, sections, and UID.

`uid` and commit `message` are optional. Axiom generates the stable UID when `uid` is omitted. Automate.ax adds no other defaults.

## Output

Returns `status` (`"created"` or `"updated"`) and the complete dashboard resource with `id`, stable `uid`, exact decimal `version` string, document, and audit metadata. `overwritten` appears when Axiom reports it.

## Permission and failures

The API token needs the organization-level `dashboards|create` capability. Axiom rejects invalid chart or layout documents and can return `409` or `412` for a UID or version conflict. This mutation is not retried automatically after an ambiguous provider response.
