Skip to Content
aiMermaid
API

Manage projects

Move projects to Trash and back, sort them into folders, tag them, duplicate them and share them through the API.

The API manages whole projects the same way the Projects page does. The same rules apply: folder depth and count, tags, Trash, project and storage limits.

None of these calls change the diagram or its version, except duplicate, which makes a new project.

Trash and restore

  • DELETE /v1/projects/{id} moves a project to Trash, like Move to Trash on the Projects page.
  • GET /v1/projects?trash=true lists the projects in Trash, with trashed_at.
  • POST /v1/projects/{id}/restore brings one back. It is refused with plan_limit when your plan has no room for another project.

Trash is emptied by your plan: Free keeps 7 days and at most 5 projects, PRO keeps 30 days and at most 50. A project already in Trash answers not_found to DELETE.

Folders

CallWhat it does
GET /v1/foldersEvery folder with its parent (null = top level)
POST /v1/foldersCreate a folder: name, and parent_id (left out or null = top level)
PATCH /v1/folders/{id}Rename or move a folder. It moves with everything inside. parent_id: null moves it to the top.
DELETE /v1/folders/{id}Delete a folder and its subfolders. Their projects are kept and go to Unfiled.

Folders go 3 levels deep, with at most 200 per account.

Folder and tags of a project

PATCH /v1/projects/{id}
{ "folder_id": "7d3c2a10-9b1e-4c55-8f0a-1e2d3c4b5a69", "tags": ["Q4", "Leads"] }
  • folder_id: null moves the project to Unfiled.
  • tags replaces all tags. At most 10 tags of 24 characters each. Spaces are trimmed and duplicates dropped. [] removes them all.

Duplicate a project

POST /v1/projects/{id}/duplicate makes a new project with the same diagram, notes, files, folder and tags. It is named "Copy of …" unless you send a name. It counts against your project limit and your file storage.

CallWhat it does
GET /v1/projects/{id}/shareThe link (url), whether it is on, its expiry, how often it was opened, and whether it has a password. 404 if the project has no link yet.
PUT /v1/projects/{id}/shareCreates the link if needed and turns it on. enabled (default true) and expires_at (null = never).
DELETE /v1/projects/{id}/shareTurns the link off. PUT turns the same link on again.
{ "enabled": true, "expires_at": "2026-12-31T23:59:00Z" }

Anyone with the link can view the diagram. A password can be set only in the editor, so it never travels in API requests or logs. A password set there is kept.

Keys limited to a folder or project

A key for one folder only sees and changes projects in that folder. New projects and folders it makes land there, and it cannot move or delete its own folder. A key for one project cannot make projects or touch folders. See keys for one folder or one project.

Reference pages: move to Trash, restore, folder and tags, duplicate, folders, share link.

On this page