Skip to main content

List projects

Retrieve a paginated list of projects ordered by creation date (most recent first).

Input parameters

limit
number
default:"20"
Number of projects to return (1-100)
cursor
number
default:"0"
Number of items to skip for pagination

Response

items
Project[]
Array of project objects
id
string
Unique project identifier (CUID)
name
string
Project name
description
string
Project description
slug
string | null
Optional URL-friendly project slug
userId
string
ID of the user who owns the project
createdAt
DateTime
Project creation timestamp
updatedAt
DateTime
Last update timestamp
nextCursor
number
Cursor position for the next page of results

Example

Request
{
  "limit": 20,
  "cursor": 0
}
Response
{
  "items": [
    {
      "id": "clx1234567890",
      "name": "My Project",
      "description": "A sample project",
      "slug": "my-project",
      "userId": "clx0987654321",
      "createdAt": "2026-03-03T10:00:00Z",
      "updatedAt": "2026-03-03T10:00:00Z"
    }
  ],
  "nextCursor": 20
}

Get project

Retrieve a single project by its ID.

Input parameters

id
string
required
Unique project identifier

Response

Returns a project object with the following fields:
id
string
Unique project identifier (CUID)
name
string
Project name
description
string
Project description
slug
string | null
Optional URL-friendly project slug
userId
string
ID of the user who owns the project
createdAt
DateTime
Project creation timestamp
updatedAt
DateTime
Last update timestamp

Example

Request
{
  "id": "clx1234567890"
}
Response
{
  "id": "clx1234567890",
  "name": "My Project",
  "description": "A sample project",
  "slug": "my-project",
  "userId": "clx0987654321",
  "createdAt": "2026-03-03T10:00:00Z",
  "updatedAt": "2026-03-03T10:00:00Z"
}

Create project

Create a new project. Requires authentication.

Input parameters

name
string
required
Project name (minimum 1 character)
description
string
default:""
Project description (optional)

Response

Returns the created project object:
id
string
Unique project identifier (CUID)
name
string
Project name
description
string
Project description
slug
string | null
Optional URL-friendly project slug
userId
string
ID of the authenticated user
createdAt
DateTime
Project creation timestamp
updatedAt
DateTime
Last update timestamp

Example

Request
{
  "name": "New Project",
  "description": "This is a new project"
}
Response
{
  "id": "clx1234567890",
  "name": "New Project",
  "description": "This is a new project",
  "slug": null,
  "userId": "clx0987654321",
  "createdAt": "2026-03-03T10:00:00Z",
  "updatedAt": "2026-03-03T10:00:00Z"
}

Update project

Update an existing project. Requires authentication and ownership.

Input parameters

id
string
required
Unique project identifier
name
string
required
Updated project name
description
string
required
Updated project description

Response

Returns the updated project object:
id
string
Unique project identifier (CUID)
name
string
Updated project name
description
string
Updated project description
slug
string | null
Optional URL-friendly project slug
userId
string
ID of the user who owns the project
createdAt
DateTime
Project creation timestamp
updatedAt
DateTime
Last update timestamp

Example

Request
{
  "id": "clx1234567890",
  "name": "Updated Project Name",
  "description": "Updated description"
}
Response
{
  "id": "clx1234567890",
  "name": "Updated Project Name",
  "description": "Updated description",
  "slug": null,
  "userId": "clx0987654321",
  "createdAt": "2026-03-03T10:00:00Z",
  "updatedAt": "2026-03-03T10:30:00Z"
}

Delete project

Delete a project by its ID.

Input parameters

id
string
required
Unique project identifier

Response

success
boolean
Returns true if deletion was successful

Example

Request
{
  "id": "clx1234567890"
}
Response
{
  "success": true
}

List projects for sidebar

Retrieve projects grouped by month for sidebar navigation. Requires authentication.

Input parameters

limit
number
default:"20"
Maximum number of projects to return (1-50)

Response

groups
MonthGroup[]
Array of month groups, sorted newest to oldest
monthLabel
string
Human-readable month label (e.g., “March 2026”)
monthKey
string
Machine-readable month key (e.g., “2026-3”)
projects
Project[]
Array of projects created in this month

Example

Request
{
  "limit": 20
}
Response
{
  "groups": [
    {
      "monthLabel": "March 2026",
      "monthKey": "2026-3",
      "projects": [
        {
          "id": "clx1234567890",
          "name": "My Project",
          "description": "A sample project",
          "slug": "my-project",
          "userId": "clx0987654321",
          "createdAt": "2026-03-03T10:00:00Z",
          "updatedAt": "2026-03-03T10:00:00Z"
        }
      ]
    },
    {
      "monthLabel": "February 2026",
      "monthKey": "2026-2",
      "projects": []
    }
  ]
}

Build docs developers (and LLMs) love