API referenceprojects
projects.create
Create a project
Creates a project inside the workspace quota. The free plan allows five projects per workspace, archived projects included; the count and the insert run as one database statement so concurrent requests cannot exceed the limit.
Transport: POST /api/rpc/projects/create 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 |
|---|---|---|---|
name | string | yes | min length 1; max length 120 |
description | string | no | default ""; max length 4000 |
workspaceId | string | yes | min length 1 |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | min length 1; max length 120 |
description | string | yes | default ""; max length 4000 |
id | string | yes | |
workspaceId | string | yes | |
archived | boolean | yes | |
version | integer | yes | min -9007199254740991; max 9007199254740991 |
createdAt | string (ISO 8601 date-time, UTC) | yes | |
updatedAt | string (ISO 8601 date-time, UTC) | 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). |