API referenceprojects
projects.list
List projects in a workspace
Returns one page of active or archived projects for a workspace you belong to. `search` matches project names case-insensitively, `sort` is limited to `newest` and `name`, and `pageSize` is capped at 50.
Transport: POST /api/rpc/projects/list using the oRPC RPC protocol. Call it through the typed client in app/sdk/client.ts; the request must be same-origin and carry a verified session cookie.
Input
| Field | Type | Required | Notes |
|---|---|---|---|
workspaceId | string | yes | min length 1 |
search | string | no | default ""; max length 120 |
page | integer | no | default 1; min 1; max 10000 |
pageSize | integer | no | default 25; min 1; max 50 |
sort | "name" | "newest" | no | default "newest" |
archived | boolean | no | default false |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
items | object[] | yes | |
items[].name | string | yes | min length 1; max length 120 |
items[].description | string | yes | default ""; max length 4000 |
items[].id | string | yes | |
items[].workspaceId | string | yes | |
items[].archived | boolean | yes | |
items[].version | integer | yes | min -9007199254740991; max 9007199254740991 |
items[].createdAt | string (ISO 8601 date-time, UTC) | yes | |
items[].updatedAt | string (ISO 8601 date-time, UTC) | yes | |
total | number | yes | |
page | number | yes | |
pageSize | number | yes |
Errors
| Code | Status | When |
|---|---|---|
UNAUTHENTICATED | 401 | No verified session was sent with the request. |
FORBIDDEN | 403 | You are not an active member of this workspace, or your role does not allow the action. |
NOT_FOUND | 404 | No project with this ID exists in the workspace. |
CONFLICT | 409 | The record changed since you loaded it; reload and try again. |
QUOTA_EXCEEDED | 403 | The workspace already holds its maximum number of projects (archived projects count). |