Time Entries
The Time Entries API allows you to create, read, update, and delete time tracking entries.
List Time Entries
Get a list of time entries with optional filtering.
GET /time-entries
Query Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | string | Filter by project ID |
start_date | string | Start date (ISO 8601) |
end_date | string | End date (ISO 8601) |
limit | integer | Number of entries to return (max 100) |
offset | integer | Number of entries to skip |
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.timo.app/v1/time-entries?project_id=123&start_date=2024-01-01"
Example Response
{
"success": true,
"data": [
{
"id": "entry_123",
"project_id": "proj_123",
"description": "Working on feature X",
"start_time": "2024-01-01T09:00:00Z",
"end_time": "2024-01-01T17:00:00Z",
"duration": 28800,
"created_at": "2024-01-01T09:00:00Z"
}
],
"pagination": {
"total": 1,
"limit": 50,
"offset": 0
}
}
Create Time Entry
Create a new time entry.
POST /time-entries
Request Body
{
"project_id": "proj_123",
"description": "Working on feature X",
"start_time": "2024-01-01T09:00:00Z",
"end_time": "2024-01-01T17:00:00Z"
}
Example Request
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project_id":"proj_123","description":"Working on feature X","start_time":"2024-01-01T09:00:00Z","end_time":"2024-01-01T17:00:00Z"}' \
https://api.timo.app/v1/time-entries
Update Time Entry
Update an existing time entry.
PUT /time-entries/{id}
Request Body
{
"description": "Updated description",
"start_time": "2024-01-01T09:30:00Z",
"end_time": "2024-01-01T17:30:00Z"
}
Delete Time Entry
Delete a time entry.
DELETE /time-entries/{id}
Example Request
curl -X DELETE \
-H "Authorization: Bearer YOUR_API_KEY" \
https://api.timo.app/v1/time-entries/entry_123
Start/Stop Timer
Start or stop a timer for real-time tracking.
Start Timer
POST /time-entries/start
{
"project_id": "proj_123",
"description": "Working on feature X"
}
Stop Timer
POST /time-entries/stop
Error Codes
| Code | Description |
|---|---|
INVALID_PROJECT | Project ID is invalid or doesn't exist |
INVALID_TIME_RANGE | Start time is after end time |
TIMER_ALREADY_RUNNING | A timer is already running |
NO_ACTIVE_TIMER | No timer is currently running |