Time Tracking Endpoints
API endpoints for time logs, timesheets, activity tracking, and screenshots.
Time Logs
List Time Logs
GET /api/timesheet/time-log?startDate=2024-01-01&endDate=2024-01-31
Authorization: Bearer {token}
Response (200 OK):
{
"items": [
{
"id": "...",
"startedAt": "2024-01-15T09:00:00.000Z",
"stoppedAt": "2024-01-15T17:00:00.000Z",
"duration": 28800,
"logType": "TRACKED",
"source": "DESKTOP",
"description": "Working on feature X",
"employeeId": "...",
"projectId": "...",
"taskId": "...",
"organizationId": "..."
}
],
"total": 150
}
Create Time Log
POST /api/timesheet/time-log
Authorization: Bearer {token}
Content-Type: application/json
{
"startedAt": "2024-01-15T09:00:00.000Z",
"stoppedAt": "2024-01-15T17:00:00.000Z",
"logType": "MANUAL",
"source": "WEB_TIMER",
"description": "Working on feature X",
"projectId": "project-uuid",
"taskId": "task-uuid",
"organizationId": "org-uuid",
"isBillable": true
}
Update Time Log
PUT /api/timesheet/time-log/{id}
Authorization: Bearer {token}
Content-Type: application/json
{
"stoppedAt": "2024-01-15T18:00:00.000Z",
"description": "Updated description"
}
Delete Time Log
DELETE /api/timesheet/time-log/{id}
Authorization: Bearer {token}
Log Types
| Type | Description | Source |
|---|---|---|
TRACKED | Tracked by desktop timer | Desktop Timer app |
MANUAL | Manually entered | Web UI or API |
IDLE | Idle time (automatically detected) | Desktop Timer |
RESUMED | Resumed from idle | Desktop Timer |
Log Sources
| Source | Description |
|---|---|
WEB_TIMER | Browser-based timer |
DESKTOP | Desktop Timer app |
MOBILE | Mobile app |
BROWSER_EXTENSION | Browser extension |
HUBSTAFF | HubStaff integration |
UPWORK | Upwork integration |
Timesheets
List Timesheets
GET /api/timesheet?startDate=2024-01-01&endDate=2024-01-31
Authorization: Bearer {token}
Submit Timesheet
PUT /api/timesheet/submit
Authorization: Bearer {token}
Content-Type: application/json
{
"ids": ["timesheet-uuid-1", "timesheet-uuid-2"],
"status": "PENDING"
}
Approve Timesheet
PUT /api/timesheet/approve
Authorization: Bearer {token}
Content-Type: application/json
{
"ids": ["timesheet-uuid-1"]
}
Deny Timesheet
PUT /api/timesheet/deny
Authorization: Bearer {token}
Content-Type: application/json
{
"ids": ["timesheet-uuid-1"]
}
Timesheet Statuses
| Status | Description |
|---|---|
DRAFT | Not yet submitted |
PENDING | Submitted, awaiting approval |
IN_REVIEW | Under review |
APPROVED | Approved by manager |
DENIED | Rejected by manager |