# Start Time Tracking Start time tracking (clock in) for a user. Workspace owners and executive managers can start tracking for any member in their workspace. Regular users can only start tracking for themselves. If the user already has an active tracker, the request will be rejected. The system will forward the tracking request to the background service. Endpoint: POST /time-tracking/start Version: 2.0.0 Security: oauth2, apiKey ## Request fields (application/json): - `workspace_id` (integer, required) ID of the workspace (Team.id from owner_user_rel table) Example: 1 - `user_id` (integer, required) ID of the user to start tracking for. Regular users can only track for themselves. Owners and executive managers can track for any workspace member. Example: 100 - `contract_id` (integer, required) ID of the contract (project-member assignment). Must belong to the user and workspace. Example: 560314 - `task_id` (integer,null) ID of the task to track time for Example: 12345 - `activity_description` (string,null) Description of the activity being tracked Example: "Working on API documentation" ## Response 200 fields (application/json): - `success` (boolean) Example: true - `message` (string) Example: "Time tracking started successfully" - `data` (object) - `data.start_time` (string) Example: "2024-01-15T10:30:00Z" - `data.contract_id` (integer) Example: 560314 - `data.project_id` (integer) Example: 285469 - `data.task_id` (integer,null) Example: 12345 - `meta` (object) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 400 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 401 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 403 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 404 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string) ## Response 500 fields (application/json): - `success` (boolean, required) - `message` (string, required) Error message describing what went wrong Example: "An error occurred" - `error` (string,null) Optional additional error details Example: "Internal Server Error" - `meta` (object, required) - `meta.api_version` (string) Example: "2.0.0" - `meta.timestamp` (string)