# Start Time Tracking Start time tracking (clock in) for a user. Only workspace owners and executive managers can use this endpoint. They can start tracking for any member in their workspace. If a user is already tracking time, they must stop the current tracker before starting a new one. Endpoint: POST /time-tracking/start Version: 2.0.0 Security: oauth2, apiKey ## Request fields (application/json): - `workspace_id` (integer, required) ID of the workspace Example: 1 - `user_id` (integer, required) ID of the user to start tracking for. Must be a member of the specified workspace. Example: 100 - `contract_id` (integer,null) Optional contract ID (project-member assignment). If provided, the time will be tracked for the associated project. If not provided, time will be tracked without a project assignment. Example: 20 - `task_id` (integer,null) Optional task ID. Can only be provided if contract_id is also provided. The task must belong to the project associated with the contract. Example: 5 - `activity_description` (string,null) Optional description of the activity being tracked Example: "Working on feature implementation" ## Response 200 fields (application/json): - `success` (boolean) Example: true - `data` (object) - `data.message` (string) Example: "Time tracking started successfully" - `data.start_time` (string) ISO 8601 timestamp when tracking started Example: "2024-01-15T10:30:00+00:00" - `data.contract_id` (integer,null) Contract ID if provided Example: 20 - `data.project_id` (integer,null) Project ID from the contract if contract_id was provided Example: 10 - `data.task_id` (integer,null) Task ID if provided Example: 5 - `data.activity_description` (string,null) Activity description if provided Example: "Working on feature implementation" - `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 422 fields (application/json): - `success` (boolean, required) - `message` (string, required) Example: "Validation failed" - `errors` (object, required) Object containing validation error messages for each field Example: {"email":["The email field is required.","The email must be a valid email address."],"firstname":["The firstname field is required."],"role":["The selected role is invalid."]} - `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)