Projects API

Create and manage projects within workspaces.

Overview

Projects are containers for work items, sprints, and backlogs. Each project belongs to a workspace and can be assigned to teams for access control.

List Projects

Retrieve all projects in a workspace. Returns filtered results based on team membership.

Request
bash
GET /api/projects?workspaceId=ws_abc123

curl -X GET "https://api.fairlx.com/v1/projects?workspaceId=ws_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
json
{
  "data": {
    "documents": [
      {
        "$id": "proj_xyz789",
        "name": "Mobile App v2",
        "description": "Next generation mobile application",
        "imageUrl": "https://...",
        "workspaceId": "ws_abc123",
        "spaceId": null,
        "deadline": "2024-06-30",
        "assignedTeamIds": ["team_001"],
        "customWorkItemTypes": [],
        "customPriorities": [],
        "customLabels": [],
        "$createdAt": "2024-01-15T10:00:00Z"
      }
    ],
    "total": 1
  }
}
Note
Workspace admins see all projects. Regular members only see projects assigned to their teams or projects with no team restrictions.

Get Project

Retrieve details for a specific project.

Request
bash
GET /api/projects/:projectId

curl -X GET "https://api.fairlx.com/v1/projects/proj_xyz789" \
  -H "Authorization: Bearer YOUR_API_KEY"

Create Project

Create a new project in a workspace.

Request
bash
POST /api/projects
Content-Type: multipart/form-data

curl -X POST "https://api.fairlx.com/v1/projects" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "name=Mobile App v2" \
  -F "description=Next generation mobile application" \
  -F "workspaceId=ws_abc123" \
  -F "deadline=2024-06-30" \
  -F "spaceId=space_001" \
  -F "image=@/path/to/logo.png"

Request Body

FieldTypeRequiredDescription
namestringYesProject name
workspaceIdstringYesParent workspace ID
descriptionstringNoProject description
deadlinestringNoISO date string
spaceIdstringNoSpace to organize under
imageFileNoProject image

Update Project

Update an existing project.

Request
bash
PATCH /api/projects/:projectId
Content-Type: multipart/form-data

curl -X PATCH "https://api.fairlx.com/v1/projects/proj_xyz789" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "name=Mobile App v3" \
  -F "customWorkItemTypes=[{...}]" \
  -F "customPriorities=[{...}]"

Delete Project

Delete a project and all related work items and time logs.

Warning
Deleting a project permanently removes all tasks, time logs, and related data.
Request
bash
DELETE /api/projects/:projectId

curl -X DELETE "https://api.fairlx.com/v1/projects/proj_xyz789" \
  -H "Authorization: Bearer YOUR_API_KEY"

Project Analytics

Get task analytics for a specific project.

Request
bash
GET /api/projects/:projectId/analytics

curl -X GET "https://api.fairlx.com/v1/projects/proj_xyz789/analytics" \
  -H "Authorization: Bearer YOUR_API_KEY"

Team Assignment

Assign or unassign teams to projects for access control.

Assign Team
bash
POST /api/projects/:projectId/teams/:teamId

curl -X POST "https://api.fairlx.com/v1/projects/proj_xyz789/teams/team_001" \
  -H "Authorization: Bearer YOUR_API_KEY"
Unassign Team
bash
DELETE /api/projects/:projectId/teams/:teamId

curl -X DELETE "https://api.fairlx.com/v1/projects/proj_xyz789/teams/team_001" \
  -H "Authorization: Bearer YOUR_API_KEY"
Tip
Use POST /projects/:id/copy-settings to copy custom settings from another project in the same workspace.