---
title: "Save (or move) a chart on a mission's dashboard"
method: POST
path: "/preview/missions/{name}/charts"
tags: ["missions"]
---

# Save (or move) a chart on a mission's dashboard

`POST /preview/missions/{name}/charts`

## Request

- Base URL: `https://autoresearch.sfcompute.com`
- URL: `https://autoresearch.sfcompute.com/preview/missions/{name}/charts`
- Auth: HTTP bearer

Save (or update) a chart on a mission's page - design the view the human should see: told to train a model, save the loss chart in the same breath as open_mission. Spec is small versioned JSON: {v: 1, title, viz: line|area|stat|bars, unit?, window?, queries: [{signal: "metrics", query: <PromQL>, legend?}]} (1-4 queries, 32 KiB cap). One chart per mission is the default (default: true moves it; the first saved chart starts as it). Charts group into dashboards: pass dashboard: <name> to place a chart ("main" if omitted) - naming a new dashboard creates it, and the page's Charts tab shows one dashboard at a time with a picker. Charts and dashboards are views, not records - freely updated and deleted.

## Path parameters

- `name` string, required: Mission name (from open_mission / list_missions).

## Query parameters

- `workspace` string

## Request body

- object
  - `dashboard` string, nullable: Dashboard to place the chart on (lowercase letters, digits, '-'; default "main"). Dashboards are named groups of charts - the mission page's Charts tab shows one at a time. Naming a new dashboard creates it; re-saving a chart moves it; a dashboard whose last chart is deleted disappears.
  - `default` boolean, nullable: Make this the mission's default chart (the one its page opens on). The first chart saved is the default automatically.
  - `name` string, required: Chart name: lowercase letters, digits, '-' (unique per mission).
  - `spec` object, required: The chart document, v1: {v: 1, title, viz: line|area|stat|bars, unit?, window?, queries: [{signal: "metrics", query, legend?}]}, 1-4 queries, <=32 KiB. Pass the JSON object itself; a JSON-encoded string of the object is also accepted.

## Response `200`

The capability's JSON result.

- Result: The capability's result: the same object the MCP tool returns as structuredContent. Resources carry an `object` type discriminator and an immutable id; money is integer micro-dollars in `*_usd_micros` fields.
  - `object` string: The resource type, when the result is one resource.

## Other responses

- `400`: Malformed request: bad JSON, a parameter that does not parse, or a value outside its range. Code `invalid`.
- `401`: No bearer token, or one this API cannot verify. Code `unauthenticated`.
- `403`: Authenticated, but the token's scopes or the account's role do not reach this operation. The message names the scope word to request. Code `forbidden`.
- `404`: No such route. Code `not_found`; the body names the OpenAPI document.
- `422`: A well-formed request the platform declined: no such node, a cap reached, a state that forbids the move. The message says which, and what to do instead. Code `refused`.
- `429`: Over this door's per-customer budget. Wait `Retry-After` seconds. Code `rate_limited`.
- `500`: Our fault. Retry; if it persists, quote the request-id. Code `internal`.

---

[API](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api.md) · [All operations](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/revisions/f88dcb70ac6c?raw)
