Projects
The Projects API allows you to create, read, update, and delete projects.
List Projects
Get a list of projects.
GET /projects
Query Parameters
| Parameter | Type | Description |
|---|---|---|
client_id | string | Filter by client ID |
status | string | Filter by status (active, archived) |
limit | integer | Number of projects to return (max 100) |
offset | integer | Number of projects to skip |
Example Response
{
"success": true,
"data": [
{
"id": "proj_123",
"name": "Website Redesign",
"client_id": "client_123",
"client_name": "Acme Corp",
"status": "active",
"color": "#3B82F6",
"created_at": "2024-01-01T00:00:00Z",
"total_time": 14400
}
]
}
Create Project
Create a new project.
POST /projects
Request Body
{
"name": "Website Redesign",
"client_id": "client_123",
"color": "#3B82F6",
"description": "Complete redesign of company website"
}
Example Request
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Website Redesign","client_id":"client_123","color":"#3B82F6"}' \
https://api.timo.app/v1/projects
Update Project
Update an existing project.
PUT /projects/{id}
Request Body
{
"name": "Updated Project Name",
"color": "#10B981",
"status": "archived"
}
Delete Project
Delete a project.
DELETE /projects/{id}
:::warning Data Loss Deleting a project will also delete all associated time entries. Consider archiving instead. :::
Get Project Details
Get detailed information about a specific project.
GET /projects/{id}
Example Response
{
"success": true,
"data": {
"id": "proj_123",
"name": "Website Redesign",
"client_id": "client_123",
"client_name": "Acme Corp",
"status": "active",
"color": "#3B82F6",
"description": "Complete redesign of company website",
"created_at": "2024-01-01T00:00:00Z",
"total_time": 14400,
"time_entries_count": 25
}
}
Project Statistics
Get statistics for a project.
GET /projects/{id}/stats
Example Response
{
"success": true,
"data": {
"total_time": 14400,
"time_entries_count": 25,
"average_session_duration": 576,
"most_productive_day": "Tuesday",
"time_by_week": [
{ "week": "2024-W01", "time": 3600 },
{ "week": "2024-W02", "time": 7200 }
]
}
}