---
title: "New HTML (a new version at the same url), title, visibility, or project (moves it; same url)"
method: PUT
path: "/diagrams/{id}"
---

# New HTML (a new version at the same url), title, visibility, or project (moves it; same url)

`PUT /diagrams/{id}`

## Request

- Base URL: `https://diagram.la/api/v1`
- URL: `https://diagram.la/api/v1/diagrams/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `title` string
  - `html` string
  - `visibility` 'public' | 'private'
  - `kind` 'flowchart' | 'sequence' | 'architecture' | 'data_flow' | 'data_model' | 'state' | 'mind_map' | 'tree' | 'timeline' | 'gantt' | 'wireframe' | 'chart' | 'comparison' | 'exploded_view' | 'map' | 'infographic' | 'other': What kind of diagram this is (its form, not its subject): flowchart (process or decision flow, user journey); sequence (sequence diagram: messages between parts over time); architecture (system, cloud, component, C4 or network diagram); data_flow (data flow, pipeline, ETL); data_model (ER diagram, database schema, class diagram); state (state machine or lifecycle); mind_map (mind map or concept map); tree (org chart, hierarchy, decision tree, sitemap); timeline (timeline or roadmap); gantt (Gantt chart or project schedule); wireframe (UI mockup, wireframe, screen flow); chart (bar, line or pie chart, dashboard); comparison (comparison table, matrix, quadrant, Venn); exploded_view (exploded view, assembly, cutaway of a physical object); map (map, floor plan, layout of a place); infographic (infographic, poster, explainer page); other (none of these)
  - `project` string: Move the diagram to another project you own; the link stays the same
  - `publish` true: Publish a draft, so everyone who can see its project can see it

## Response `200`

{ diagram, changed }

- object

---

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