# WebWork Tracker REST API V2 Modern REST API for WebWork Tracker with OAuth2 authentication. This API provides access to workspaces, members, projects, and time tracking features. Version: 2.0.0 ## Servers Production Server ``` https://api.webwork-tracker.com/api/v2 ``` ## Security ### oauth2 OAuth2 authentication using Authorization Code flow. Register your application to get client credentials. Type: oauth2 ### apiKey Personal access token for API authentication. Generate tokens in Settings > REST API. Type: http Scheme: bearer Bearer Format: JWT ## Download OpenAPI description [WebWork Tracker REST API V2](https://api-docs.webwork-tracker.com/_bundle/@v2/api.yaml) ## Workspaces Read workspace information for the authenticated user for using it in the other endpoints ### Get All Workspaces - [GET /workspaces](https://api-docs.webwork-tracker.com/api/workspaces/getworkspaces.md): Retrieve all active workspaces for the authenticated user. Returns paginated list of workspaces where the user is a member, including workspace details and status. Only non-blocked, non-deleted workspaces are returned. ## Members Manage workspace members - invite, update roles, and remove members ### Get All Workspace Members - [GET /members](https://api-docs.webwork-tracker.com/api/members/getmembers.md): Retrieve all team members in your workspace. Members are automatically filtered based on your role and permissions. You can apply additional filters to narrow down results. Rate and financial information is only visible if you have permission to view rates. Security: Only members of the specified workspace can access its member list. ### Invite New Member - [POST /members](https://api-docs.webwork-tracker.com/api/members/invitemember.md): Invite a new member to your workspace. This endpoint is only accessible to Owners and Executive Managers. An invitation email will be sent to the provided email address. ### Get Single Member - [GET /members/{memberId}](https://api-docs.webwork-tracker.com/api/members/getmember.md): Retrieve detailed information about a specific member in your workspace. Rate and financial information is only visible if you have permission to view rates. ### Update Member - [PUT /members/{memberId}](https://api-docs.webwork-tracker.com/api/members/updatemember.md): Update member information. This endpoint is only accessible to Owners and Executive Managers. You can update profile information, role, rate settings, and other member attributes. Security: You must be a member of the workspace AND have Owner/Executive Manager role. You can only update members within workspaces you have access to. ### Delete (Archive) Member - [DELETE /members/{memberId}](https://api-docs.webwork-tracker.com/api/members/deletemember.md): Delete (archive) a member from your workspace. This is a soft delete - the member can be restored later. This endpoint is only accessible to Owners and Executive Managers. ### Restore Archived Member - [POST /members/{memberId}/restore](https://api-docs.webwork-tracker.com/api/members/restoremember.md): Restore a previously deleted (archived) member to your workspace. This endpoint is only accessible to Owners and Executive Managers. ## Projects Manage projects within workspaces ### Get All Workspace Projects - [GET /projects](https://api-docs.webwork-tracker.com/api/projects/getprojects.md): Retrieve all projects in your workspace. Projects are automatically filtered based on your role and permissions. Role-based access: Owners and Executive Managers see all projects; Project Managers and Project Viewers see only managed projects; Team Managers see projects from managed teams; Regular Users see only projects they are assigned to. You can apply additional filters to narrow down results. ### Create New Project - [POST /projects](https://api-docs.webwork-tracker.com/api/projects/createproject.md): Create a new project in your workspace. This endpoint is only accessible to Owners and Executive Managers. ### Get Single Project - [GET /projects/{projectId}](https://api-docs.webwork-tracker.com/api/projects/getproject.md): Retrieve detailed information about a specific project in your workspace. Projects are filtered based on your role and permissions. ### Update Project - [PUT /projects/{projectId}](https://api-docs.webwork-tracker.com/api/projects/updateproject.md): Update an existing project in your workspace. This endpoint is only accessible to Owners and Executive Managers. ### Delete (Archive) Project - [DELETE /projects/{projectId}](https://api-docs.webwork-tracker.com/api/projects/deleteproject.md): Delete (archive) a project from your workspace. This is a soft delete - the project can be restored later if needed. This endpoint is only accessible to Owners and Executive Managers. ## Contracts Manage contracts (project-member assignments) within workspaces. Contracts define which members are assigned to which projects, with settings for rates, hours limits, and screenshot modes. Rate information is only visible if you have permission to view rates and the project is billable. ### Get All Workspace Contracts - [GET /contracts](https://api-docs.webwork-tracker.com/api/contracts/getcontracts.md): Retrieve all contracts (project-member assignments) in your workspace. Contracts are automatically filtered based on your role and permissions: Role-based access: Owners and Executive Managers see all contracts; Project Managers see contracts for managed projects + their own contracts; Team Managers see contracts for managed teams + their own contracts; Regular Users see only their own contracts; Clients see only contracts for projects they have access to. Rate information is only visible if you have permission to view rates AND the project is billable. You can apply additional filters (project_id, user_id, status) to narrow down results. ### Create New Contract - [POST /contracts](https://api-docs.webwork-tracker.com/api/contracts/createcontract.md): Create a new contract (assign a member to a project) in your workspace. This endpoint is only accessible to Owners and Executive Managers. Rate information will only be saved if you have permission to view rates. ### Get Single Contract - [GET /contracts/{contractId}](https://api-docs.webwork-tracker.com/api/contracts/getcontract.md): Retrieve detailed information about a specific contract in your workspace. Contracts are filtered based on your role and permissions. Rate information is only visible if you have permission to view rates AND the project is billable. ### Update Contract - [PUT /contracts/{contractId}](https://api-docs.webwork-tracker.com/api/contracts/updatecontract.md): Update an existing contract in your workspace. This endpoint is only accessible to Owners and Executive Managers. Rate information will only be updated if you have permission to view rates. ### Delete Contract - [DELETE /contracts/{contractId}](https://api-docs.webwork-tracker.com/api/contracts/deletecontract.md): Delete (soft delete) a contract from your workspace. This endpoint is only accessible to Owners and Executive Managers. ## Tasks Manage tasks within projects ### Get All Tasks - [GET /tasks](https://api-docs.webwork-tracker.com/api/tasks/gettasks.md): Retrieve all tasks for a specific workspace and project. Requires workspace_id and project_id as query parameters. ### Create Task - [POST /tasks](https://api-docs.webwork-tracker.com/api/tasks/createtask.md) ### Get Task - [GET /tasks/{taskId}](https://api-docs.webwork-tracker.com/api/tasks/gettask.md) ### Update Task - [PUT /tasks/{taskId}](https://api-docs.webwork-tracker.com/api/tasks/updatetask.md) ### Delete Task - [DELETE /tasks/{taskId}](https://api-docs.webwork-tracker.com/api/tasks/deletetask.md) ### Get Task Assignees - [GET /tasks/{taskId}/assignees](https://api-docs.webwork-tracker.com/api/tasks/gettaskassignees.md) ### Assign User to Task - [POST /tasks/{taskId}/assign/{userId}](https://api-docs.webwork-tracker.com/api/tasks/assigntask.md) ### Unassign User from Task - [DELETE /tasks/{taskId}/unassign/{userId}](https://api-docs.webwork-tracker.com/api/tasks/unassigntask.md) ## Project Viewers Manage project viewers - external users who can view specific projects ### Get All Project Viewers - [GET /project-viewers](https://api-docs.webwork-tracker.com/api/project-viewers/getprojectviewers.md): Retrieve all project viewers for a specific workspace. Requires workspace_id as query parameter. ### Create Project Viewer - [POST /project-viewers](https://api-docs.webwork-tracker.com/api/project-viewers/createprojectviewer.md) ### Get Project Viewer - [GET /project-viewers/{viewerId}](https://api-docs.webwork-tracker.com/api/project-viewers/getprojectviewer.md) ### Delete Project Viewer - [DELETE /project-viewers/{viewerId}](https://api-docs.webwork-tracker.com/api/project-viewers/deleteprojectviewer.md) ### Restore Project Viewer - [POST /project-viewers/{viewerId}/restore](https://api-docs.webwork-tracker.com/api/project-viewers/restoreprojectviewer.md) ### Assign Project to Viewer - [POST /project-viewers/{viewerId}/assign-project](https://api-docs.webwork-tracker.com/api/project-viewers/assignprojecttoviewer.md) ### Unassign Project from Viewer - [DELETE /project-viewers/{viewerId}/unassign-project](https://api-docs.webwork-tracker.com/api/project-viewers/unassignprojectfromviewer.md) ## Timesheets Manage timesheet approvals and submissions ### Get All Timesheets - [GET /timesheets](https://api-docs.webwork-tracker.com/api/timesheets/gettimesheets.md): Retrieve all timesheets for a specific workspace. Supports filtering by status, date range, user ID, and specific timesheet ID. Results are paginated and can be sorted by creation date. Filters: - id: Filter by specific encrypted timesheet ID - status: Filter by timesheet status (e.g., open, submitted, approved, rejected) - date_from / date_to: Filter by date range - user_id: Filter by user ID - order_by: Sort by creation date (asc or desc) Response Structure: - Totals: Each timesheet includes user information (user_id, member), date range (date_from, date_to), total_minutes, submission details, and status. - Daily Breakdown: The daily_breakdown object contains daily tracked time grouped by date. Each date has an array of project entries showing project_id, project_name, contract_id, and total_minutes for that day. - Amount Information: total_amount fields (both at timesheet level and in daily breakdown) are only included if the authenticated user has permission to see rates in the workspace. Pagination: - Results are paginated with configurable page size - Default: 20 items per page, maximum: 100 ### Approve Timesheet - [PUT /timesheets/{timesheetId}/approve](https://api-docs.webwork-tracker.com/api/timesheets/approvetimesheet.md): Approve a submitted timesheet. Only workspace owners and executive managers can approve timesheets. The timesheet must be in 'submitted' status to be approved. ### Reject Timesheet - [PUT /timesheets/{timesheetId}/reject](https://api-docs.webwork-tracker.com/api/timesheets/rejecttimesheet.md): Reject a submitted timesheet with a reason. Only workspace owners and executive managers can reject timesheets. The timesheet must be in 'submitted' status to be rejected. A reason must be provided. ### Submit Timesheet - [PUT /timesheets/{timesheetId}/submit](https://api-docs.webwork-tracker.com/api/timesheets/submittimesheet.md): Submit a timesheet for approval. The timesheet must be in 'pending' or 'rejected' status to be submitted. Once submitted, it will be reviewed by workspace owners or executive managers. ### Unsubmit Timesheet - [PUT /timesheets/{timesheetId}/unsubmit](https://api-docs.webwork-tracker.com/api/timesheets/unsubmittimesheet.md): Unsubmit a previously submitted timesheet. This returns the timesheet to 'pending' status, allowing the user to make changes before resubmitting. ## Time Requests Manage manual time requests and approvals ### Get All Time Requests - [GET /time-requests](https://api-docs.webwork-tracker.com/api/time-requests/gettimerequests.md): Retrieve all time requests for a specific workspace. Requires workspace_id as query parameter. ### Create Time Request - [POST /time-requests](https://api-docs.webwork-tracker.com/api/time-requests/createtimerequest.md): Create a new time request. The system will use existing logic based on user permissions and workspace auto-approval settings to determine whether the time is added immediately or creates a pending request. ### Approve Time Request - [POST /time-requests/{timeRequestId}/approve](https://api-docs.webwork-tracker.com/api/time-requests/approvetimerequest.md): Approve a pending time request. ### Reject Time Request - [POST /time-requests/{timeRequestId}/reject](https://api-docs.webwork-tracker.com/api/time-requests/rejecttimerequest.md): Reject a pending time request. Requires a comment explaining the rejection reason. ## Leaves Manage leave requests, balances, and policies ### Get All Leaves - [GET /leaves](https://api-docs.webwork-tracker.com/api/leaves/getleaves.md): Retrieve all leave requests for a specific workspace. Requires workspace_id as query parameter. ### Get Leave Balances - [GET /leaves/balances](https://api-docs.webwork-tracker.com/api/leaves/getleavebalances.md) ### Get Leave Policies - [GET /leaves/policies](https://api-docs.webwork-tracker.com/api/leaves/getleavepolicies.md) ### Approve Leave Request - [PUT /leaves/{leaveRequestId}/approve](https://api-docs.webwork-tracker.com/api/leaves/approveleaverequest.md) ### Reject Leave Request - [PUT /leaves/{leaveRequestId}/reject](https://api-docs.webwork-tracker.com/api/leaves/rejectleaverequest.md) ## Expenses Manage expenses and expense categories ### Get All Expenses - [GET /expenses](https://api-docs.webwork-tracker.com/api/expenses/getexpenses.md): Retrieve all expenses for a specific workspace. Requires workspace_id as query parameter. ### Create Expense - [POST /expenses](https://api-docs.webwork-tracker.com/api/expenses/createexpense.md) ### Get Expense Categories - [GET /expenses/categories](https://api-docs.webwork-tracker.com/api/expenses/getexpensecategories.md) ### Update Expense - [PUT /expenses/{expenseId}](https://api-docs.webwork-tracker.com/api/expenses/updateexpense.md) ### Delete Expense - [DELETE /expenses/{expenseId}](https://api-docs.webwork-tracker.com/api/expenses/deleteexpense.md) ## Time Tracking Track and manage time entries ### Start Time Tracking - [POST /time-tracking/start](https://api-docs.webwork-tracker.com/api/time-tracking/starttimetracking.md): 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. ### Stop Time Tracking - [POST /time-tracking/stop](https://api-docs.webwork-tracker.com/api/time-tracking/stoptimetracking.md): Stop time tracking (clock out) for a user. Only workspace owners and executive managers can use this endpoint. They can stop tracking for any member in their workspace. The user must have an active tracker running to stop it. ### Get Current Running Tracker Data - [GET /time-tracking/current-data](https://api-docs.webwork-tracker.com/api/time-tracking/getcurrenttrackerdata.md): Get current running tracker actual time data for a user. Only workspace owners and executive managers can use this endpoint. They can get tracker data for any member in their workspace. Important: This endpoint only works when the tracker is running from the API or from the browser. In other cases, it will not retrieve current tracking information. ## Reports Generate and retrieve various reports including tracked hours, timeline, activity descriptions, tasks, and activity level reports ### Get Tracked Hours Report - [GET /reports/tracked-hours](https://api-docs.webwork-tracker.com/api/reports/gettrackedhoursreport.md): Retrieve tracked hours report data for a workspace. Supports filtering by users, projects, teams, and titles. Data is always grouped by day. Always returns: Day-by-day breakdown grouped by date (date as key), with users array inside each date. Tracked time is returned in minutes (total_minutes field), aggregated across all tracking methods and grouped by user_id, project_id, and contract_id. If user has access to rates (rate_status = 1), also returns total_amount as an object with currency codes as keys. When user_id is provided: Results are filtered to that specific user only. Date range is limited to maximum 31 days (1 month) when user_id is provided. Security: Only workspace owners and executive managers can access this endpoint. ### Get Daily Timeline Report - [GET /reports/daily-timeline](https://api-docs.webwork-tracker.com/api/reports/getdailytimelinereport.md): Retrieve daily timeline report data for a specific date, paginated by user IDs. Returns time entries with details for each user including start/end times, project, task, activity description, tracking method, and activity metrics.\n\nKey Features:\n- Single date only: This endpoint accepts only one date (not a date range). Date must be within the last year and not more than a year in the future.\n- Pagination: Results are paginated by user_ids. Default is 30 users per page, maximum 100.\n- Rate visibility: total_amount and currency fields are only included if the workspace has rate_status = 1 (rate visibility enabled).\n- Activity metrics: Both user-level and time entry-level activity_level are calculated using the TimelineService::activity() method based on mouse, keyboard, and scroll actions.\n- Timezone handling: Times are returned in ISO 8601 format with timezone offset based on the workspace owner's system_timezone.\n- Security: Only workspace owners and executive managers can access this endpoint. ### Get Activity Level Report - [GET /reports/activity-level](https://api-docs.webwork-tracker.com/api/reports/getactivitylevelreport.md): Retrieve activity level report data for a date range, paginated by day. Returns activity level percentage per user per day, with overall statistics across all users and days. Key Features: - Date range: Accepts start_date and end_date parameters (YYYY-MM-DD format). Maximum date range is 1 month (31 days). - Pagination: Results are paginated by day. Default is 30 days per page, maximum 100. - Filtering: Can filter by contract_id and user_ids. - Activity metrics: Activity level is calculated based on mouse, keyboard, and scroll actions. - Overall statistics: Includes aggregated activity data across all users and days in the report range. - Security: Only workspace owners and executive managers can access this endpoint. ### Get Task Report - [GET /reports/task-report](https://api-docs.webwork-tracker.com/api/reports/gettaskreport.md): Retrieve task-based time tracking report data for a date range, paginated by user. Returns time tracked per task for each user, with daily breakdown and overall task breakdown. Key Features: - Date range: Accepts start_date and end_date parameters (YYYY-MM-DD format). Maximum date range is 1 month (31 days). - Pagination: Results are paginated by user. Default is 30 users per page, maximum 100. - Filtering: Can filter by users, project_id, and task_id. - No Task entries: Entries without a task (task_id is null) are included by default. Use include_no_task=false to exclude them. - Tasks breakdown: Each user has an overall tasks_breakdown showing total time per task across the date range. - Daily breakdown: Each user has a daily_breakdown showing time per task for each day. - Security: Only workspace owners and executive managers can access this endpoint. ### Get Daily Attendance Report - [GET /reports/daily-attendance](https://api-docs.webwork-tracker.com/api/reports/getdailyattendancereport.md): Retrieve daily attendance report data for a specific date, paginated by user. Returns attendance information including statuses, times, breaks, and productivity metrics for each user. Key Features: - Single date only: This endpoint accepts only one date (not a date range). Date must be in YYYY-MM-DD format. - Pagination: Results are paginated by user. Default is 30 users per page, maximum 100. - Statuses array: Each user can have multiple statuses (e.g., ["Late", "Left early"]). Possible statuses: "Present", "Late", "Left early", "Tracked less", "Absent", "On leave", "Holiday". - Time values in minutes: All time-related fields are returned as integers representing total minutes (e.g., 303 instead of "5h 3m"). - Filtering: Can filter by users and status. Status filter accepts string values: "late", "left_early", "tracked_less", "absent", "on_leave". - Break intervals: Returns break time intervals as an array of strings (e.g., ["14:30 - 15:25", "16:00 - 16:15"]). - Security: Only workspace owners and executive managers can access this endpoint. ### Get Activity Description Report - [GET /reports/activity-description](https://api-docs.webwork-tracker.com/api/reports/getactivitydescriptionreport.md): Retrieve activity description-based time tracking report data for a date range, paginated by user. Returns time tracked per activity description (memo) for each user, with daily breakdown and overall breakdown. Key Features: - Date range: Accepts start_date and end_date parameters (YYYY-MM-DD format). Maximum date range is 1 month (31 days). - Pagination: Results are paginated by user. Default is 30 users per page, maximum 100. - Filtering: Can filter by users, project_id, and task_id. - No Description entries: Entries without an activity description (memo is null) are included by default. Use include_no_description=false to exclude them. - Activities breakdown: Each user has an overall activities_breakdown showing total time per activity description across the date range. - Daily breakdown: Each user has a daily_breakdown showing time per activity description for each day. - Security: Only workspace owners and executive managers can access this endpoint. ## Webhooks Manage webhooks for event notifications ### Get All Webhooks - [GET /webhooks](https://api-docs.webwork-tracker.com/api/webhooks/getwebhooks.md): Retrieve all webhooks for a specific workspace. Requires workspace_id as query parameter. ### Create Webhook - [POST /webhooks](https://api-docs.webwork-tracker.com/api/webhooks/createwebhook.md) ### Get Webhook - [GET /webhooks/{webhookId}](https://api-docs.webwork-tracker.com/api/webhooks/getwebhook.md) ### Update Webhook - [PUT /webhooks/{webhookId}](https://api-docs.webwork-tracker.com/api/webhooks/updatewebhook.md) ### Delete Webhook - [DELETE /webhooks/{webhookId}](https://api-docs.webwork-tracker.com/api/webhooks/deletewebhook.md)