New Bring your own storage. Keep your diagrams in your own private GitHub repository, on Pro and Team.Bring your own storage on GitHub, for Pro and Team. Learn more about bring your own storage

REST API

/v1/diagrams does the same work as the MCP tools, through the same code. The full contract, with every field and status code, is in the OpenAPI spec. The first version, /v1/scenes, is retired: every path answers 410 with code: "MOVED" and the method and path that replace it.

Authentication

Send an API key as Authorization: Bearer <key> (or in X-API-Key) on every call except these, which need none: POST /v1/diagrams/validate, POST /v1/diagrams/preview, GET /v1/public/diagrams/{ref} (a published diagram’s or a share link’s page and images) and its /changes, POST /v1/public/diagrams/{ref}/report, and the signed image links a render returns. Create keys under Dashboard → API keys once the account’s email is verified; sign-up makes no key. A key starts with dsp_sk_ and is shown once, when it is created. It acts in the workspace selected when it was made.

The MCP server also signs people in with their Zindex account (OAuth 2.1) as their client connects (MCP tools). Those sign-in tokens work only on /mcp.

To create another key with an existing one:

curl -s https://api.zindex.ai/v1/auth/keys \
  -H "Authorization: Bearer $ZINDEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Production Key" }'

The response holds the new key, which can’t be retrieved again, with its scope and workspaceId. The new key acts in the same workspace as the key that made it. Add "scope": "read" for a read key; the default is write when the caller can write, and read otherwise. Asking for write with a read key, or as a viewer, answers 403 with code: "READ_ONLY". Add "expiresInDays" (a whole number from 1 to 366) for a key that expires; leave it out, or send null, for one that doesn’t. Any other value returns 400 with code: "INVALID_EXPIRES_IN_DAYS". The number of keys a workspace can have depends on its plan (Limits); a viewer can hold 3 in a workspace.

Endpoints

Method and pathDoes
POST /v1/diagramsSave a diagram: { scene or mermaid, key?, brief?, message?, project? }
GET /v1/diagramsFind diagrams, latest version first: query, key, limit, cursor, and the filters below; each item as diagram_find answers it
GET /v1/diagrams/{id}Read: view (outline, dsp or mermaid), revision, asOf, knownRevision, elements, cursor
POST /v1/diagrams/{id}/revisionsChange it with ops or edited mermaid, making the next revision
GET /v1/diagrams/{id}/revisionsHistory: limit, cursor, asOf
GET /v1/diagrams/{id}/compareWhat changed between from and to (revision numbers or dates)
GET /v1/diagrams/{id}/renderSVG and PNG links to one version (revision or asOf): permanent for a published diagram until it’s made private or deleted, otherwise signed and valid for 7 days
GET /v1/diagrams/{id}/exportThe whole history as JSON Lines, oldest first (see Export)
GET /v1/workspace/exportEvery diagram in the workspace, each with its whole history, in one file (see Export); also at GET /v1/account/export
GET /v1/images/{id}@{revision}.svg or .pngOne version’s image
GET /v1/images/{id}@{revision}.thumbnail.pngA 640 x 360 thumbnail of one version, as the dashboard’s list shows it: the whole diagram on its canvas color, or the top of one more than about 1.1 times as tall as it is wide across its full width, without its address line. Can be cached for a year
POST /v1/diagrams/validateCheck without saving: { scene }, { mermaid }, or the scene document itself as the body (no key needed)
POST /v1/diagrams/previewThe image of a scene or Mermaid without saving it, in the scene’s theme, or the one the Mermaid config maps to: SVG, or PNG with format: "png" (no key needed)
DELETE /v1/diagrams/{id}?confirm=trueDelete, with a 24-hour undo
POST /v1/diagrams/{id}/undeleteUndo a delete
PUT /v1/diagrams/{id}/star and DELETEStar a diagram for yourself, or unstar it. Stars are yours alone; anyone who can read the diagram can star it
PUT /v1/diagrams/{id}/sharing{ "visibility": "public" } or "private"; publishing returns the public link and madePublicAt
POST /v1/diagrams/{id}/linksCreate a share link (see Share links)
GET /v1/diagrams/{id}/linksThe diagram’s live share links, newest first, each with who made it (createdBy); state=ended or all for the record of links that ended or were revoked
DELETE /v1/diagrams/{id}/links/{linkId}Revoke a share link; its record stays
POST /v1/diagrams/{id}/reports/previewPreview a problem report (see Report a problem)
POST /v1/diagrams/{id}/reportsReport a problem with one version
GET /v1/diagrams/{id}/reportsYour reports on the diagram, newest first
GET /v1/diagrams/{id}/reports/{reportId}One report, drawn as Zindex support sees it
DELETE /v1/diagrams/{id}/reports/{reportId}Withdraw a report
POST /v1/feedbackSend Zindex feedback, with or without a diagram (see Feedback)
GET /v1/feedbackYour feedback, newest first, with its status
GET /v1/public/diagrams/{ref}What a published diagram’s or a share link’s page shows; add .svg or .png for the image (no key needed)
GET /v1/public/diagrams/{ref}@{revision}/changes?from={revision}How many elements a version added, changed, removed and moved since another version the link shows, for a published diagram or an every-version link (no key needed)
POST /v1/public/diagrams/{ref}/reportReport a diagram seen at its page, published or shared with a link, that breaks the content policy (no key needed)

Wherever {id} appears, the diagram’s ID or your key for it works, except under /v1/public, which takes the ID, or a share link’s token, but never a key.

The list’s filters: diagramFamily lists one family (none for diagrams without one), starred=true only the ones you starred, and project one project’s diagrams (none for diagrams in no project). deleted=true lists the ones deleted in the last 24 hours, which can still be restored. key and deleted=true ignore the other filters.

Save

curl -s https://api.zindex.ai/v1/diagrams \
  -H "Authorization: Bearer $ZINDEX_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "key": "payments-architecture",
    "brief": "Checkout payment services, left to right.",
    "scene": {
      "schemaVersion": "0.1",
      "scene": { "title": "Payments" },
      "layoutStrategy": { "direction": "LR" },
      "elements": [
        { "id": "api", "kind": "node", "nodeType": "service", "label": "API" },
        { "id": "db", "kind": "node", "nodeType": "database", "label": "Ledger" },
        { "id": "e1", "kind": "edge", "from": { "elementId": "api" }, "to": { "elementId": "db" }, "label": "writes" }
      ]
    }
  }'
{"id":"dgm_7Q2kD9a1B2c3","key":"payments-architecture","revision":1,"hash":"sha256:3f9a…","chain":"sha256:fdac…","warnings":[],"created":true}

Instead of scene you can send Mermaid text as mermaid, for an erDiagram, a flowchart (graph) or a sequenceDiagram. Element IDs come from the Mermaid IDs (in a sequence diagram, only participants’ do), and the same text always gives the same diagram. What Mermaid leaves out is listed in warnings, and other Mermaid types are refused: see Mermaid scope.

warnings lists what checking the scene and drawing it noticed, each with the element when there is one and a one-line fix. For example:

The diagram is saved either way; an edit fixes it. POST /v1/diagrams/validate reports the same warnings without saving.

A create, a saved edit, a restore or a render that leaves the workspace at 80% or more of a plan limit also carries LIMIT_NEAR, with the count and the limit. No edit clears it, and validate doesn’t return it (Limits: Before a limit).

Zindex mints the ID; any scene.id you send is ignored. The key is your own name for the diagram, unique among the workspace’s live diagrams. Sending the same create again, with the same key and content, returns the existing diagram with created: false and status 200 (a new diagram answers 201), so retries are safe. The same key with different content, including after an edit, is a 409, KEY_EXISTS, and so is a teammate’s create with a key the team workspace already has, whatever its content: read and edit that diagram instead. Without a key, every create makes a new diagram.

project files the new diagram under a project, by name: 1 to 40 characters, matched ignoring case, and not none or all. A name no project has makes a new project, so a typo makes a stray one; leave project out for a diagram in no project. A create repeated with the same key and content leaves the project as it was. The answer doesn’t say whether the create made the project, so list the diagrams and read their project to see the names in use first.

hash is the version’s content hash, the SHA-256 of the scene that view=dsp returns, in RFC 8785 canonical form. chain is its chain hash. It also covers the version’s stored image and the chain hash of the version before it, so it changes if anything up to that version changes. chain is null until Zindex has computed it, normally when the version is saved; a render, an export or the next edit computes a missing one. Reads and the history never compute it. Verifying shows how to check a whole history with them.

Read

A read answers JSON: { id, revision, text }, with nextCursor when a long outline continues. GET /v1/diagrams/payments-architecture returns this outline as its text:

dgm_7Q2kD9a1B2c3 "Payments" r1 2026-10-05T09:12Z sha256:3f9a0c1d2e4b
key: payments-architecture
brief: Checkout payment services, left to right.
recent: r1 curl/8.7.1
outline: 2 nodes, 1 edges
  api service "API"
  db database "Ledger"
  e1: api -> db "writes"

Change

curl -s https://api.zindex.ai/v1/diagrams/payments-architecture/revisions \
  -H "Authorization: Bearer $ZINDEX_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "baseRevision": 1,
    "message": "Add the job queue",
    "requestId": "6f1c2e7a-4b0d-4c55-9a51-2f1f8f7c9d10",
    "ops": [{ "op": "createNode", "id": "queue", "nodeType": "queue", "label": "Jobs" }]
  }'
{"id":"dgm_7Q2kD9a1B2c3","revision":2,"hash":"sha256:9b1c…","chain":"sha256:e665…","warnings":[],"changed":{"added":["queue"],"updated":[],"removed":[],"moved":[]}}

Every edit needs baseRevision, the revision you planned it against. Send exactly one of ops (operations, up to 500), mermaid (below), restoreRevision (a revision number, or { "asOf": "2026-09-26" }), or brief on its own. brief may also go with ops or mermaid; null removes it.

Edit as Mermaid

Send the whole diagram as mermaid instead of ops, usually text you read with view=mermaid and changed. Zindex compares it with the baseRevision version and applies only the differences, as operations, so everything you didn’t change keeps its ID. Nodes and edges missing from the text are deleted. Groups never change this way. Frames change only in a sequence diagram, as its blocks, box and rect lines (Mermaid scope: Sequence diagram edits). It works on architecture, flowchart, entity-relationship and sequence diagrams, and diagrams without a family; Mermaid scope has the rules.

Images

GET /v1/images/dgm_7Q2kD9a1B2c3@2.svg with your API key returns that version’s SVG; .png returns a PNG. Each version’s image is drawn once, when it is saved, and kept, so it never changes; add ?engine=current to draw it again with today’s engine instead (not stored). Versions and their images are in Zindex’s own storage by default, on every plan; a Pro or Team workspace whose owner connected its own GitHub repository keeps them there instead, and these endpoints answer the same (Bring your own storage). Add ?from=1 to draw that version with what changed since revision 1 colored: added in green, removed in red and changed in amber; what only moved is drawn as unchanged (from must be another revision of the diagram; anything else is a 400). GET /v1/diagrams/{id}/render, like the MCP tool diagram_render, returns links to the same images that a person can open from a chat without a key, with the image’s width and height in pixels, the version’s savedAt, the latest revision and the diagram’s title (left out when it has none): a published diagram’s links, which don’t expire but stop if the diagram is made private or deleted, with url for the version’s page; for any other diagram, signed links that work for 7 days, with expires. With knownRevision, a revision you already have, it answers only { id, revision, unchanged: true } when that is the version it would render, and doesn’t count it as a render. Render links draw the plain version, and diagram_render has no from. For a published diagram they are its page’s links, which take from with no key: add ?from= to the svg or png it returns (What changed, through a link), as you can to an every-version link’s. For a private diagram, an agent connected only through MCP sign-in gets changes as text from diagram_history with compare rather than as a colored image.

A published diagram, and a diagram shared with a link, has a page and an image that anyone can open without a key. Sharing says what each kind of share link shows and who it’s for.

LinkShows
https://zindex.ai/d/{ref}A published diagram or an every-version link: the latest version, its number and date, and the other versions. A version link or a latest link: its one picture
https://zindex.ai/d/{ref}@{revision}That version, which never changes. A version link or a latest link answers 404
The same with .svg or .pngThe image itself

{ref} is a published diagram’s ID, or a share link’s token. An image is the one Zindex kept for the version. A version link’s or latest link’s picture is that image with a stamp of its own in place of the version’s address (What a recipient sees). The website answers these links from GET /v1/public/diagrams/{ref}, which you can call directly; add .svg or .png for the image. Its answer gives the image’s size in pixels, width and height, the same for the SVG and the PNG. A share link’s answer never has the title.

Over MCP, diagram_render takes these links as id too, from any workspace (MCP tools).

A link’s page has what a viewer can do: Present shows the diagram alone on the screen, fitted and zoomable; Download saves the picture shown as PNG or SVG. A published diagram’s or every-version link’s page also steps through the versions the link shows, and Color what changed colors what changed since the version before. Nothing an owner does is on it: sharing, the embed links and the scene JSON stay on the diagram’s page in the dashboard.

Putting a diagram in a doc, issue or README

Embedding and linking says which link to use where, with the text to paste for each place. It also shows how a Claude artifact, which can’t load images from other sites, shows a diagram.

Scope:

POST /v1/diagrams/{id}/links makes a share link: anyone who has it sees what it shows, never the scene JSON, the title or the description, and making it doesn’t publish the diagram. Sharing says which kind of link suits whom. The body is optional, and a field left out takes its default:

FieldMeaningDefault
showsversion: one version, which never changes. latest: the newest version each time the link is opened, without earlier ones. every: every version and what each changed, including versions saved laterversion
revisionThe version a version link showsThe latest
nameWho the link is for, up to 60 characters, with at least one visible. Anyone with the link sees it, and a version link or latest link prints it on its pictureNone
endsThe link’s last day, YYYY-MM-DD, today or later: it stops at 23:59:59 UTC that day. null for no end date90 days for a version link, 30 for an every-version link, none for a latest link; 7 days on Free

A version link to version 2, for an auditor, until a date:

curl -s -X POST https://api.zindex.ai/v1/diagrams/payments-architecture/links \
  -H "Authorization: Bearer $ZINDEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"revision": 2, "name": "Halden Assurance", "ends": "2027-02-25"}'
{"id":"dgm_7Q2kD9a1B2c3","linkId":"lnk_8sV2nQx7LpWe","url":"https://zindex.ai/d/4tYhB8mKqZ3wRc6NpDs2Jf","svg":"https://zindex.ai/d/4tYhB8mKqZ3wRc6NpDs2Jf.svg","png":"https://zindex.ai/d/4tYhB8mKqZ3wRc6NpDs2Jf.png","shows":"version","revision":2,"name":"Halden Assurance","ends":"2027-02-25","fingerprint":"sha256:9b1c…","createdAt":"2026-11-27T09:31:00.000Z","state":"live"}

fingerprint is the version’s content hash, which its picture prints the start of (Verifying a shared picture). The link’s url, svg and png show version 2 alone and take no @{revision}. Anyone with the link can read what its page shows:

curl -s https://api.zindex.ai/v1/public/diagrams/4tYhB8mKqZ3wRc6NpDs2Jf
{"access":"link","shows":"version","name":"Halden Assurance","at":"2026-10-08T09:14:00.000Z","sharedAt":"2026-11-27T09:31:00.000Z","ends":"2027-02-25T23:59:59.000Z","fingerprint":"sha256:9b1c…","width":717,"height":323}

It names no diagram, version number or other version, and gives ends as the moment the link stops. A latest link’s answer has the same fields, for the newest version.

An every-version link, with no end date:

curl -s -X POST https://api.zindex.ai/v1/diagrams/payments-architecture/links \
  -H "Authorization: Bearer $ZINDEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"shows": "every", "ends": null}'
{"id":"dgm_7Q2kD9a1B2c3","linkId":"lnk_4kP9wXr2TmQa","url":"https://zindex.ai/d/9xWqTk4PmZr7Hb2NcVd8Ls","svg":"https://zindex.ai/d/9xWqTk4PmZr7Hb2NcVd8Ls.svg","png":"https://zindex.ai/d/9xWqTk4PmZr7Hb2NcVd8Ls.png","shows":"every","revision":null,"name":null,"ends":null,"fingerprint":null,"createdAt":"2026-10-08T09:31:00.000Z","state":"live"}

The link follows the latest version; add @2 for version 2. Its svg and png do the same, and so does its link preview in Slack, Teams or iMessage, though an app may keep a preview it already made. The page’s Download saves the version it shows. Anyone with the link can read what its page shows, every version’s number and date included:

curl -s https://api.zindex.ai/v1/public/diagrams/9xWqTk4PmZr7Hb2NcVd8Ls
{"id":"dgm_7Q2kD9a1B2c3","access":"link","revision":2,"latest":2,"at":"2026-10-08T09:14:00.000Z","shows":"every","name":null,"ends":null,"width":717,"height":323,"versions":[{"revision":2,"at":"2026-10-08T09:14:00.000Z"},{"revision":1,"at":"2026-10-08T09:12:00.000Z"}]}

GET /v1/diagrams/{id}/links lists the diagram’s live links, newest first, each with who made it. With ?state=ended it lists the links that ended or were revoked, which stay as the record of what was shared, and ?state=all lists both. DELETE /v1/diagrams/{id}/links/{linkId} revokes one:

curl -s -X DELETE https://api.zindex.ai/v1/diagrams/payments-architecture/links/lnk_4kP9wXr2TmQa \
  -H "Authorization: Bearer $ZINDEX_API_KEY"
{"id":"dgm_7Q2kD9a1B2c3","linkId":"lnk_4kP9wXr2TmQa","revoked":true}

From then on the link opens nothing, the same as a link that ended:

curl -s https://api.zindex.ai/v1/public/diagrams/9xWqTk4PmZr7Hb2NcVd8Ls
{"error":"No public diagram or share link with that ID.","code":"NOT_FOUND"}

Published diagrams

PUT /v1/diagrams/{id}/sharing with { "visibility": "public" } publishes a diagram: anyone can then open its links by ID, its page also shows its title and description, and GET /v1/public/diagrams/{id} returns its scene JSON.

curl -s -X PUT https://api.zindex.ai/v1/diagrams/payments-architecture/sharing \
  -H "Authorization: Bearer $ZINDEX_API_KEY" -H "Content-Type: application/json" \
  -d '{ "visibility": "public" }'
{"id":"dgm_7Q2kD9a1B2c3","visibility":"public","url":"https://zindex.ai/d/dgm_7Q2kD9a1B2c3","madePublicAt":"2026-10-08T09:32:00.000Z"}
curl -s -o payments-v1.svg https://api.zindex.ai/v1/public/diagrams/dgm_7Q2kD9a1B2c3@1.svg

GET /v1/public/diagrams/{id} returns { id, access, title, description, revision, latest, at, width, height, madePublicAt, versions, scene, svg }: the version’s scene, its kept image and the image’s size. { "visibility": "private" } takes the diagram’s links by ID down again; its share links keep working until they end or are revoked.

Add ?from={revision} to a version’s image to draw it with what changed since that version colored, as the page does (Rendering: Visual diff); https://zindex.ai/d/{ref}@2.svg?from=1 is the same picture. GET /v1/public/diagrams/{ref}@{revision}/changes?from={revision} counts it. Neither needs a key:

curl -s -o payments-v2-changes.svg "https://api.zindex.ai/v1/public/diagrams/dgm_7Q2kD9a1B2c3@2.svg?from=1"
curl -s "https://api.zindex.ai/v1/public/diagrams/dgm_7Q2kD9a1B2c3@2/changes?from=1"
{"from":1,"to":2,"added":1,"changed":0,"removed":0,"moved":0}

Scope:

Each answer’s Cache-Control says how long a browser or another cache may keep it:

AnswerCache-Control
An exact version’s image, which never changespublic, max-age=31536000, immutable
An image that follows the latest version, and a published diagram’s page answerpublic, max-age=60
What changed between two versions, colored or countedpublic, max-age=3600
A version link’s or latest link’s pictureprivate, no-cache
A share link’s page answerno-store

An exact version’s image has its version’s chain hash as its ETag, or its content hash while chain is null. Send If-None-Match, and an unchanged image answers 304. The colored image’s ETag names both versions and the engine that drew it, since a newer engine draws it again. A version link’s or latest link’s picture has an ETag of its own, and the browser asks again each time it shows it, so a revoked or ended link’s picture is gone on the next look.

An every-version link’s other answers are private rather than public: the visitor’s own browser may keep them, but no proxy, image proxy or chat preview may, so a revoked link stops for new viewers. Zindex’s own edge keeps none of a share link’s answers.

Reporting a diagram

Anyone, signed in or not, can report a diagram they can see that breaks the hosted-content policy with POST /v1/public/diagrams/{ref}/report and { "reason": "spam", "description": "...", "reporterEmail": "..." }. {ref} is the page’s own: a published diagram’s ID or an every-version link’s token, with @{revision} for the version seen (without it, the latest), or a version link’s or latest link’s token alone. The page at zindex.ai/d/{ref} sends its ref with the version it shows. reason is spam, hate, violence, abuse, illegal, copyright or other; description is 50 to 2,000 characters; the email is optional and never shown to the diagram’s owner.

A report is kept only when GET /v1/public/diagrams/{ref} would show that version, so one through a private diagram’s ID, a revoked, ended or unknown link, or a deleted diagram is dropped. The answer is the same 200 either way, so it doesn’t reveal which IDs or tokens exist. A report through a share link records the link’s ID, never its token. Moderators see what the ref shows: a published diagram’s page, or, while a report through it is open, what the share link has shown, never the scene.

What happens when a diagram breaks the policy:

A revoked link can’t be restored; the owner can make a new one.

Report a problem

When a version draws wrong, send it to Zindex support. A report is its own record of one version, with a one-line problem; the diagram stays as private or public as it was.

  1. POST /v1/diagrams/{id}/reports/preview with { "revision": 2, "anonymize": true } (both optional; the default is the latest version, anonymized) returns { id, revision, anonymized, svg }, plus a seed when anonymized: the version drawn as support will see it. Nothing is stored.
  2. POST /v1/diagrams/{id}/reports with { "problem": "The label sits on the edge", "revision": 2, "anonymize": true, "seed": 123 } returns 201 with { reportId, id, revision, reported: true, anonymized }. Pass the preview’s seed and support sees exactly the copy you previewed; without it, a new random substitution is made. problem is one line of up to 500 characters.
  3. GET /v1/diagrams/{id}/reports/{reportId} returns { id, reportId, revision, anonymized, svg }: what support sees, at any time after sending. DELETE on the same path withdraws the report.

An anonymized report keeps that anonymized copy, and staff see only it. With anonymize: false, staff see the version as it is. Deleting the diagram hides its reports from staff at once; they are removed with the diagram 24 hours later.

Feedback

Tell Zindex staff about a bug, a place where the docs and the engine disagree, or something you needed that is missing. Feedback needs an account but no saved diagram. Staff read every item; no model does. An item has:

The person confirms each item before it is sent. The first request stores nothing: it answers 400 with code: "CONFIRMATION_REQUIRED", a confirm token and preview, the item exactly as staff will see it, with the engine version and client Zindex adds.

curl -s -X POST https://api.zindex.ai/v1/feedback \
  -H "Authorization: Bearer $ZINDEX_API_KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "docs", "summary": "The guide says an edge may end on a frame", "expected": "The edge draws to the frame", "observed": "EDGE_ENDPOINT_KIND_INVALID", "confidence": "seen" }'
{"error":"Nothing was sent. Show the person the preview, and only if they agree, send the same body again with confirm set to the token; it expires in 10 minutes.","code":"CONFIRMATION_REQUIRED","confirm":"1791541440.Qm8rT2vXk9LpZ4nWc7HbYd","preview":{"kind":"docs","summary":"The guide says an edge may end on a frame","expected":"The edge draws to the frame","observed":"EDGE_ENDPOINT_KIND_INVALID","confidence":"seen","engine":"6.0.0+build.1690","client":"curl/8.7.1","diagram":null,"anonymized":null,"snippet":null}}

Show the person the preview. Only if they agree, send the same body again with confirm. The token works for 10 minutes, for that account and that item only:

curl -s -X POST https://api.zindex.ai/v1/feedback \
  -H "Authorization: Bearer $ZINDEX_API_KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "docs", "summary": "The guide says an edge may end on a frame", "expected": "The edge draws to the frame", "observed": "EDGE_ENDPOINT_KIND_INVALID", "confidence": "seen", "confirm": "1791541440.Qm8rT2vXk9LpZ4nWc7HbYd" }'
{"feedbackId":"fb_6tJ3wNq8KxPa","sent":true,"status":"new"}

GET /v1/feedback lists your items newest first (limit up to 50, default 20, and cursor from nextCursor), each with what staff see and its status: new, accepted, fixed, wont-fix or duplicate. note is from Zindex staff, and a fixed item’s fixedIn names the version that fixed it. Dashboard → Usage shows the same list under Your feedback.

curl -s https://api.zindex.ai/v1/feedback \
  -H "Authorization: Bearer $ZINDEX_API_KEY"
{"feedback":[{"feedbackId":"fb_6tJ3wNq8KxPa","kind":"docs","summary":"The guide says an edge may end on a frame","expected":"The edge draws to the frame","observed":"EDGE_ENDPOINT_KIND_INVALID","confidence":"seen","engine":"6.0.0+build.1690","client":"curl/8.7.1","diagram":null,"anonymized":null,"snippet":null,"status":"new","note":null,"fixedIn":null,"sentAt":"2026-10-09T10:15:00.000Z","updatedAt":null}]}

An account can send 20 items in any 24 hours; past that, the answer is 429 with code: "RATE_LIMITED" and retryAfter, the seconds until the next can go. Deleting a diagram hides the feedback that carries it from staff at once, and removes it with the diagram 24 hours later; closing the account removes all of it. Over MCP, diagram_share with action: "feedback" takes the same fields and needs the person’s agreement (MCP tools: Confirmation).

History and compare

GET /v1/diagrams/{id}/revisions lists versions newest first, with the time, who saved each one (by, their name, else their email) and how (credential: session, api_key or oauth, never which key), the client, its message, its chain hash and how many elements it added, changed, removed and moved. GET /v1/diagrams/{id}/compare?from=2026-09-01&to=2026-10-01 returns the element IDs added, changed, removed and moved between two versions, and authors, each distinct { by, client } that saved a version between them.

Export

GET /v1/diagrams/{id}/export downloads one diagram’s whole history as JSON Lines. The first line is a header with the diagram’s id, key, title and revisions. One line per version follows, oldest first, with its scene, its hash and chain, and its stored image. That is all you need to check the history yourself (Verifying).

GET /v1/workspace/export downloads every diagram in the workspace the key acts in, in one file, in the format zindex-account-history/1; GET /v1/account/export is the same download. Settings → Account on zindex.ai downloads the same file for the selected workspace. In a team workspace only its owners can download it, with the dashboard or their own keys; anyone else gets 403 with code: "OWNER_REQUIRED", and can still download each diagram’s history. Its first line names the format and the workspace (kind is personal or team). Each diagram follows in ID order, written as its own export is, but its header also has project, the diagram’s project name, when it has one. The last line counts the diagrams:

{"format":"zindex-account-history/1","workspace":{"id":"0b7e4c1a-…","name":"Personal workspace (ana@acme.com)","kind":"personal"},"exportedAt":"2026-10-13T09:00:00.000Z"}
{"format":"zindex-history/1","chain":"zindex-chain/1","id":"dgm_7Q2kD9a1B2c3","key":"payments-architecture","title":"Payments","revisions":2,"exportedAt":"2026-10-13T09:00:00.004Z"}
{"revision":1,"at":"2026-10-05T09:12:00.000Z","by":"Ana Lima","actor":{"userId":"…","credential":"api_key","credentialId":"…"},"client":"curl/8.7.1","message":null,"hash":"sha256:3f9a…","chain":"sha256:fdac…","scene":{…},"image":{…}}
{"revision":2,…}
{"format":"zindex-history/1","chain":"zindex-chain/1","id":"dgm_Hq3vT8bWm2Xa","key":null,"title":"Orders","revisions":1,"exportedAt":"2026-10-13T09:00:00.019Z"}
{"revision":1,…}
{"end":true,"diagrams":2}

A line with "format": "zindex-history/1" starts the next diagram. A file without the closing line was cut short; download it again. Deleted diagrams are left out, even while they can be restored, and so are share links, problem reports and feedback. Both exports are sent a line at a time as Zindex writes them, so a large workspace starts downloading at once.

Errors

Errors are JSON with error, a short message, and a code.

Every response, an error or not, carries an X-Request-Id header: Zindex’s own ID for that request, never one you send. Quote it to support@zindex.ai when something looks wrong. It isn’t the requestId you choose for an edit.

CodeStatusMeans
INVALID_REQUEST400A parameter is wrong; error says which
CONFIRMATION_REQUIRED400A delete without ?confirm=true, or feedback without its confirm token; nothing was deleted or sent
INVALID_PROJECT_NAME400project isn’t an allowed name: use 1 to 40 characters, not none or all, or leave it out. On the list, none means diagrams in no project and all is refused: leave project out to list every diagram
AUTH_REQUIRED401No API key was sent
API_KEY_INVALID, API_KEY_REVOKED, API_KEY_EXPIRED401The key sent is unknown, was revoked or has expired; use another key
LIMIT_REACHED403The workspace is at a plan limit (Limits)
PROJECT_LIMIT403The workspace can’t hold another project, and nothing was saved. Send the create again under an existing project or without project. nearest, when present, names up to 5 projects that read like the name sent
PLAN_LIMIT_EXCEEDED403A new API key would pass the workspace’s apiKeys limit, or a viewer’s 3 keys; current and maximumAllowed give the numbers. Revoke a key first
FEATURE_UNAVAILABLE403The workspace’s plan doesn’t include the feature (feature): a latest or every-version share link, or one that ends more than 7 days out or never, needs Pro or Team. Make a version link that ends within 7 days instead, or tell the person; don’t retry (Paid-plan features)
EMAIL_NOT_VERIFIED403Verify the account’s email before saving or creating a key
READ_ONLY403A read key, or a viewer in the workspace, can read diagrams but not change or share them or report a problem with them; reason is credential or role. Don’t retry the change
SHARING_DISABLED403The workspace’s owners turned public sharing off: no publishing and no new share links. Don’t retry; tell the person an owner can turn sharing back on
OWNER_REQUIRED403Only an owner of the team workspace can export all of it
SESSION_REQUIRED403Managing a workspace, moving a diagram into a team workspace and billing work only from the signed-in dashboard, not with a key
NOT_FOUND404No such diagram or version in this workspace; another workspace’s diagram answers the same way. Also a path with no endpoint
NO_REVISION_AS_OF404The diagram had no version yet at that date
KEY_EXISTS409The key belongs to another diagram in the workspace, with different content or a teammate’s; id names it
REVISION_CONFLICT409The diagram changed since baseRevision; see revision and changes
STORAGE_HOLD409The connection to the workspace’s own GitHub repository needs a workspace owner; reason says what for and detail names the cause. Don’t retry; tell the person a workspace owner must act in Settings → Storage
MOVED410A /v1/scenes path; method and path name the request to send instead
INPUT_TOO_LARGE413The request body is over 4 MiB, or the Mermaid text or a feedback snippet is over 64 KB
VALIDATION_FAILED422Nothing was saved; errors lists each problem with a code, the element when there is one, and a one-line fix (Validation rules)
REQUEST_ID_REUSED422The requestId already made a different revision
PARSE_ERROR422Mermaid couldn’t read the text; error says where or what, and line and column are there when Mermaid names them (Mermaid: Refused)
UNSUPPORTED_DIAGRAM_TYPE422The Mermaid isn’t an erDiagram, a flowchart or a sequenceDiagram; send the diagram as a scene
IMPORT_TIMEOUT, IMPORT_FAILED422The Mermaid parser took too long or stopped; send shorter text, or a scene
MERMAID_FAMILY_MISMATCH422A Mermaid edit doesn’t fit the diagram’s family
DRAW_TIMEOUT422Drawing the scene took longer than the drawing budget (5 s without a key or sign-in, 20 s with one and for every save, edit and render), or needed more memory than it allows. A save or edit saved nothing. The error says what to change: split the diagram, draw fewer edges into one node, or bring the elements closer together
RATE_LIMITED429Over a rate limit, or 20 feedback items in 24 hours; retryAfter gives the seconds to wait
INTERNAL_ERROR500Zindex failed while answering; error doesn’t say how. Retry, sending an edit’s requestId again. If it keeps failing, quote the X-Request-Id that error names to support
UNSUPPORTED501The server doesn’t offer that feature; api.zindex.ai offers every one
BUSY503Every drawing worker is busy; retryAfter and Retry-After give the seconds to wait, half the refused drawing’s budget
UNAVAILABLE503Reporting a diagram is unavailable right now; try again later
STORAGE_UNAVAILABLE503The workspace’s own GitHub repository didn’t answer; retryAfter and Retry-After give the seconds to wait, and detail names the cause. Retry after that

STORAGE_UNAVAILABLE and STORAGE_HOLD come only from a workspace that keeps its diagrams in its own GitHub repository (Bring your own storage); Zindex’s own storage, the default, never returns them. STORAGE_HOLD’s reason is installation_missing, installation_suspended, repository_missing, repository_public (the repository was made public; the hold lifts once it is private or internal), branch_missing, push_refused, credentials, external_change (a change made in the repository outside Zindex) or disconnected (an owner disconnected the workspace’s storage). On such a workspace a save takes a few seconds and a read under a second, and a connected repository takes about 80 saves a minute and 500 an hour, GitHub’s limits for the App; past them Zindex answers STORAGE_UNAVAILABLE with retryAfter, never a plan-limit error.