📁 Projects API

Projects

Manage your development projects with our comprehensive Projects API.

Overview
Complete CRUD operations for project management

Create

Start new projects with templates

Update

Modify project details and settings

Delete

Remove projects permanently

API Endpoints

GET
/api/projects
Get all projects for the authenticated user

Parameters

page
number
Page number (default: 1)
limit
number
Items per page (default: 10)
status
string
Filter by status (active, archived, draft)

Headers

AuthorizationBearer <token>
Required

Example Request

curl -X GET "/api/projects" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "description": "Project description"}'

Response

Success
Status: 200
Response:
{
  "projects": [
    {
      "id": "uuid",
      "name": "My Project",
      "description": "Project description",
      "status": "active",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1
  }
}
Error
Status: 401
Response:
{
  "error": "Unauthorized"
}
POST
/api/projects
Create a new project

Parameters

name
string
Required
Project name
description
string
Project description
template
string
Template ID to use

Headers

AuthorizationBearer <token>
Required

Example Request

curl -X POST "/api/projects" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "description": "Project description"}'

Response

Success
Status: 201
Response:
{
  "project": {
    "id": "uuid",
    "name": "New Project",
    "description": "Description",
    "status": "active",
    "createdAt": "2024-01-01T00:00:00Z"
  }
}
Error
Status: 400
Response:
{
  "error": "Invalid project data"
}
GET
/api/projects/:id
Get a specific project by ID

Parameters

id
string
Required
Project ID

Headers

AuthorizationBearer <token>
Required

Example Request

curl -X GET "/api/projects/:id" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "description": "Project description"}'

Response

Success
Status: 200
Response:
{
  "project": {
    "id": "uuid",
    "name": "My Project",
    "description": "Description",
    "status": "active",
    "createdAt": "2024-01-01T00:00:00Z"
  }
}
Error
Status: 404
Response:
{
  "error": "Project not found"
}
PUT
/api/projects/:id
Update a project

Parameters

id
string
Required
Project ID
name
string
New project name
description
string
New project description
status
string
New project status

Headers

AuthorizationBearer <token>
Required

Example Request

curl -X PUT "/api/projects/:id" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "description": "Project description"}'

Response

Success
Status: 200
Response:
{
  "project": {
    "id": "uuid",
    "name": "Updated Project",
    "description": "Updated description",
    "status": "active",
    "updatedAt": "2024-01-01T00:00:00Z"
  }
}
Error
Status: 404
Response:
{
  "error": "Project not found"
}
DELETE
/api/projects/:id
Delete a project

Parameters

id
string
Required
Project ID

Headers

AuthorizationBearer <token>
Required

Example Request

curl -X DELETE "/api/projects/:id" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "My Project", "description": "Project description"}'

Response

Success
Status: 200
Response:
{
  "message": "Project deleted successfully"
}
Error
Status: 404
Response:
{
  "error": "Project not found"
}
Project Statuses
Available project status values
active
Active development
draft
Work in progress
archived
Completed or archived