Projects API
Endpoints for creating and managing projects.
List Projects
GET /v1/projects Example
curl https://api.erold.dev/v1/projects \
-H "Authorization: Bearer erold_xxx" Response
{
"data": [
{
"id": "proj_abc123",
"key": "MYAPP",
"name": "My Application",
"description": "Main product backend",
"taskCount": 42,
"createdAt": "2024-01-01T00:00:00Z"
}
]
} Get Project
GET /v1/projects/:projectId Example
curl https://api.erold.dev/v1/projects/proj_abc123 \
-H "Authorization: Bearer erold_xxx" Create Project
POST /v1/projects Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Project name |
key | string | Yes | 2-5 uppercase letters (e.g., "MYAPP") |
description | string | No | Project description |
Example
curl -X POST https://api.erold.dev/v1/projects \
-H "Authorization: Bearer erold_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "My Application",
"key": "MYAPP",
"description": "Main product backend"
}' Update Project
PATCH /v1/projects/:projectId Example
curl -X PATCH https://api.erold.dev/v1/projects/proj_abc123 \
-H "Authorization: Bearer erold_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "My Application v2",
"description": "Updated description"
}' Note: The project
keycannot be changed after creation.
Delete Project
DELETE /v1/projects/:projectId Warning: This permanently deletes the project and all its tasks. This action cannot be undone.
Example
curl -X DELETE https://api.erold.dev/v1/projects/proj_abc123 \
-H "Authorization: Bearer erold_xxx" Get Project Statistics
GET /v1/projects/:projectId/stats Response
{
"data": {
"taskCount": 42,
"tasksByStatus": {
"todo": 15,
"in_progress": 8,
"done": 19
},
"tasksByPriority": {
"urgent": 2,
"high": 10,
"medium": 20,
"low": 10
},
"memberCount": 5
}
}