Skip to main content

Projects endpoints

Projects group documents inside a workspace. Every workspace has a Default project, which can't be renamed or deleted. Default-project documents live at /<workspace>/<slug>; others at /<workspace>/projects/<project>/<slug>.

All endpoints accept an API key or a session.

ActionWho
List, resolveAny active member
CreateAny active member
Rename, change slug, deleteOwners and admins

The project record​

{
"id": "proj_456",
"workspaceId": "ws_123",
"name": "Investors",
"slug": "investors",
"isDefault": false
}

Project slugs are 1 to 64 characters of lowercase letters, numbers and single hyphens. tag, tags, project, projects, new, edit and settings are reserved.

GET /api/v1/projects?workspaceId=...​

Lists the workspace's projects, Default first, then by name. Each one carries enough for an agent to decide where a new document belongs:

{
"projects": [
{
"id": "proj_123",
"workspaceId": "ws_123",
"name": "Default",
"slug": "default",
"isDefault": true,
"postCount": 14,
"updatedAt": "2026-01-10T12:00:00.000Z",
"recentTitles": ["Hiring plan 2027", "Office move checklist"],
"lastPublishedAt": "2026-10-20T16:04:00.000Z"
},
{
"id": "proj_456",
"workspaceId": "ws_123",
"name": "Investors",
"slug": "investors",
"isDefault": false,
"postCount": 6,
"updatedAt": "2026-03-02T09:00:00.000Z",
"recentTitles": ["Q3 investor update", "Q2 investor update", "Seed round memo"],
"lastPublishedAt": "2026-10-12T10:00:00.000Z"
}
],
"defaultProject": { "id": "proj_123", "name": "Default", "slug": "default", "isDefault": true, "...": "..." }
}
  • postCount counts every document in the project, published or not.
  • recentTitles holds up to three of the most recently updated published titles you can read.
  • lastPublishedAt is when the newest of those was last updated, or null.

GET /api/v1/projects/default?workspaceId=...​

{ "project": { "id": "proj_123", "workspaceId": "ws_123", "name": "Default", "slug": "default", "isDefault": true } }

GET /api/v1/projects/resolve?workspaceId=...&projectSlug=...​

Looks a project up by projectSlug or projectId (omit both for the Default project). Returns { "project": { ... } }, or 404 not_found when there's no match or you aren't a member.

POST /api/v1/projects​

{
"workspaceId": "ws_123",
"name": "Board",
"slug": "board"
}
FieldRequiredNotes
workspaceIdyes
nameyes1 to 120 characters
slugnoUp to 64 characters. Without it, a slug is made from the name and suffixed (board-2) if taken or reserved

Status 201: { "project": { ... } }.

An explicit slug that another project in the workspace already uses isn't suffixed; the request fails with 409 slug_taken. Pick another slug or leave slug out.

PATCH /api/v1/projects/:projectId​

Renames a project or changes its slug. Send at least one field. Changing the slug changes the URL of every document in the project.

{
"name": "Board of directors",
"slug": "board-of-directors"
}

Returns { "project": { ... } }.

DELETE /api/v1/projects/:projectId​

Deletes an empty, non-default project. Move or delete its documents first.

{ "deleted": true, "projectId": "proj_789" }

Errors​

StatuserrorWhen
400invalid_requestMissing workspaceId or name, or PATCH with neither field
400invalid_slugThe slug doesn't fit the rules above
400reserved_slugA reserved project slug
400default_projectRenaming or deleting the Default project
400project_not_emptyDeleting a project that still has documents (postCount is included)
403forbiddenYou aren't an active member, or you're a member trying to rename or delete
404not_foundNo such project (rename, delete, resolve)
409slug_takenAnother project in the workspace has that slug (create with an explicit slug, or rename)

Using projects with documents​

POST /publish takes projectId or projectSlug. The list, get, raw, update, export and delete routes take ?projectId= to scope a slug. Move a document with POST /posts/:postId/move.