Skip to main content

Projects endpoints

Projects organize documents inside a workspace. Every workspace has a non-deletable Default project. Default project documents use /<workspace>/<slug>, while non-default projects use /<workspace>/projects/<project>/<slug>.

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

Lists projects in a workspace the caller belongs to.

POST /api/v1/projects

Creates a non-default project.

{
"workspaceId": "ws_123",
"name": "Launch docs",
"slug": "launch-docs"
}

slug is optional. If omitted, OpenDocs generates one from the name and suffixes reserved/colliding values.

PATCH /api/v1/projects/:projectId

Renames a non-default project or changes its slug.

{
"name": "Launch documentation",
"slug": "launch-documentation"
}

DELETE /api/v1/projects/:projectId

Deletes a non-default project only when it contains zero posts. The Default project cannot be deleted.

Using projects with posts

Publish accepts projectId or projectSlug. List/get/update/export/delete routes accept projectId as a query parameter for slug disambiguation.