# WebWork Tracker REST API V2 WebWork Tracker REST API V2 provides programmatic access to your workspace data. This API allows you to manage members, projects, tasks, time tracking, leaves, and expenses. Access is restricted to workspace owners and executive managers only. Version: 2.0.0 ## Servers Production Server ``` https://api.webwork-tracker.com/api/v2 ``` ## Security ### oauth2 OAuth2 authentication using Authorization Code flow. To use OAuth2 authentication, you must first create an OAuth2 application in your WebWork account settings. Go to Settings > REST API > OAuth2 Apps and click 'Create App' to register your application and obtain client credentials (Client ID and Client Secret). **Authorization Flow:** 1. Redirect users to the authorization URL with your client_id, redirect_uri, and requested scopes 2. User authorizes your application 3. Receive authorization code via redirect_uri 4. Exchange authorization code for access token and refresh token using the token URL 5. Use access token in API requests as Bearer token 6. Refresh access token when it expires using refresh_token **Token Expiration:** - Access tokens expire after 15 days - Refresh tokens expire after 30 days - Use the refresh token to obtain a new access token before expiration **Create OAuth2 App:** https://webwork-tracker.com/app/settings/rest-api Type: oauth2 ### apiKey Personal Access Token authentication provides a simple way to authenticate API requests without implementing the full OAuth2 flow. Personal Access Tokens are long-lived tokens (6 months expiration) that you can generate directly from your WebWork account. **How to Create a Personal Access Token:** 1. Log in to your WebWork account 2. Go to Settings > REST API 3. Click 'Create Token' in the Personal Access Tokens section 4. Enter a descriptive name for your token 5. Copy the token immediately (you won't be able to see it again) 6. Use this token in API requests as: `Authorization: Bearer ` **Token Management:** - Tokens expire after 6 months - You can view all your active tokens in Settings > REST API - Archive (revoke) tokens anytime if they're compromised - When a token expires, create a new one (Personal Access Tokens don't support refresh) **Create Personal Access Token:** https://webwork-tracker.com/app/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/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. You can apply filters to narrow down results by email, status, or role. ### 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. ### Update Member - [PUT /members/{memberId}](https://api-docs.webwork-tracker.com/api/members/updatemember.md): Update member information. You can update profile information, role, rate settings, and other member attributes. ### 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. You can apply 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. ### 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. ## Tasks Manage tasks within projects. As a workspace owner or executive manager, you have full access to all tasks in your workspace. ### Get All Project Tasks - [GET /tasks](https://api-docs.webwork-tracker.com/api/tasks/gettasks.md): Retrieve all tasks in a specific project. You can apply filters by status or priority to narrow down results. ### Create New Task - [POST /tasks](https://api-docs.webwork-tracker.com/api/tasks/createtask.md): Create a new task in a project. This endpoint is accessible to Owners, Executive Managers, Project Managers, and Team Managers. ### Get Single Task - [GET /tasks/{taskId}](https://api-docs.webwork-tracker.com/api/tasks/gettask.md): Retrieve detailed information about a specific task. ### Update Task - [PUT /tasks/{taskId}](https://api-docs.webwork-tracker.com/api/tasks/updatetask.md): Update an existing task. This endpoint is accessible to Owners, Executive Managers, Project Managers, and Team Managers. ### Delete Task - [DELETE /tasks/{taskId}](https://api-docs.webwork-tracker.com/api/tasks/deletetask.md): Delete (soft delete) a task from a project. This endpoint is accessible to Owners, Executive Managers, Project Managers, and Team Managers. ### Get Task Assignees - [GET /tasks/{taskId}/assignees](https://api-docs.webwork-tracker.com/api/tasks/gettaskassignees.md): Retrieve all users assigned to a specific task. ### Assign Task to User - [POST /tasks/{taskId}/assign/{userId}](https://api-docs.webwork-tracker.com/api/tasks/assigntask.md): Assign a task to a specific user. The user must be a member of the project. This endpoint is accessible to Owners, Executive Managers, Project Managers, and Team Managers. ### Unassign Task from User - [DELETE /tasks/{taskId}/unassign/{userId}](https://api-docs.webwork-tracker.com/api/tasks/unassigntask.md): Remove a user assignment from a task. This endpoint is accessible to Owners, Executive Managers, Project Managers, and Team Managers. ## Project Viewers Manage project viewers (clients) within workspaces. Project viewers are users with read-only access to specific projects. Project viewers can only view projects they are assigned to. ### Get All Project Viewers - [GET /project-viewers](https://api-docs.webwork-tracker.com/api/project-viewers/getprojectviewers.md): Retrieve all project viewers in your workspace. Project viewers are users with read-only access to specific projects. You can filter by email to find a specific viewer. ### Create New Project Viewer - [POST /project-viewers](https://api-docs.webwork-tracker.com/api/project-viewers/createprojectviewer.md): Create a new project viewer (client) in your workspace. This endpoint is only accessible to Owners and Executive Managers. An invitation email will be sent to the viewer. ### Get Single Project Viewer - [GET /project-viewers/{viewerId}](https://api-docs.webwork-tracker.com/api/project-viewers/getprojectviewer.md): Retrieve detailed information about a specific project viewer. ### Delete (Archive) Project Viewer - [DELETE /project-viewers/{viewerId}](https://api-docs.webwork-tracker.com/api/project-viewers/deleteprojectviewer.md): Delete (archive) a project viewer from your workspace. This is a soft delete - the viewer can be restored later if needed. ### Restore Archived Project Viewer - [POST /project-viewers/{viewerId}/restore](https://api-docs.webwork-tracker.com/api/project-viewers/restoreprojectviewer.md): Restore a previously deleted (archived) project viewer to your workspace. ### Assign Project to Viewer - [POST /project-viewers/{viewerId}/assign-project](https://api-docs.webwork-tracker.com/api/project-viewers/assignprojecttoviewer.md): Assign a project to a project viewer, giving them read-only access to that project. ### Unassign Project from Viewer - [DELETE /project-viewers/{viewerId}/unassign-project](https://api-docs.webwork-tracker.com/api/project-viewers/unassignprojectfromviewer.md): Remove a project assignment from a project viewer, revoking their access to that project. ## 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. ### 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. ## 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. 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. ### Stop Time Tracking - [POST /time-tracking/stop](https://api-docs.webwork-tracker.com/api/time-tracking/stoptimetracking.md): Stop the current active time tracker (clock out) for the authenticated user. If there is no active tracker, the request will be rejected. The system will forward the stop request to the background service. ## Timesheets Manage timesheet approvals - view, approve, reject, submit, and unsubmit timesheets. ### Get All Timesheets - [GET /timesheets](https://api-docs.webwork-tracker.com/api/timesheets/gettimesheets.md): Retrieve all timesheets in your workspace. Supports filtering by status (open, submitted, rejected, approved), date range, and ID. Results are paginated. ### Approve Timesheet - [PUT /timesheets/{timesheetId}/approve](https://api-docs.webwork-tracker.com/api/timesheets/approvetimesheet.md): Approve a submitted timesheet. Only Owners and Executive Managers can approve timesheets. The timesheet must be in 'submitted' status. ### Reject Timesheet - [PUT /timesheets/{timesheetId}/reject](https://api-docs.webwork-tracker.com/api/timesheets/rejecttimesheet.md): Reject a submitted timesheet with a reason. Only Owners and Executive Managers can reject timesheets. The timesheet must be in 'submitted' status. ### 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 'open' status. ### Unsubmit Timesheet - [PUT /timesheets/{timesheetId}/unsubmit](https://api-docs.webwork-tracker.com/api/timesheets/unsubmittimesheet.md): Unsubmit a timesheet, returning it to 'open' status. The timesheet must be in 'submitted' status. ## Time Requests Manage manual time requests - create time requests for team members, approve or reject pending requests. ### Get All Time Requests - [GET /time-requests](https://api-docs.webwork-tracker.com/api/time-requests/gettimerequests.md): Retrieve all time requests in your workspace. Supports filtering by status (pending, approved, rejected), user_id, date range, and ID. If status is not specified, returns all statuses. Results are paginated. ### Create Time Request - [POST /time-requests](https://api-docs.webwork-tracker.com/api/time-requests/createtimerequest.md): Create a new time request for a team member. The request will be in pending status and can be approved or rejected by authorized users. ### Get Time Request - [GET /time-requests/{id}](https://api-docs.webwork-tracker.com/api/time-requests/gettimerequest.md): Retrieve a specific time request by ID. ### Approve Time Request - [POST /time-requests/{id}/approve](https://api-docs.webwork-tracker.com/api/time-requests/approvetimerequest.md): Approve a pending time request. Once approved, the time will be tracked and added to the user's timesheet. ### Reject Time Request - [POST /time-requests/{id}/reject](https://api-docs.webwork-tracker.com/api/time-requests/rejecttimerequest.md): Reject a pending time request. A comment explaining the rejection reason is required. ## Leaves Manage leave requests - view, approve, reject leave requests, view leave balances and policies. ### Get All Leave Requests - [GET /leaves](https://api-docs.webwork-tracker.com/api/leaves/getleaves.md): Retrieve all leave requests in your workspace. Supports filtering by ID, policy_id, is_paid, status, date range, and user_id. Results are paginated. ### Approve Leave Request - [PUT /leaves/{leaveRequestId}/approve](https://api-docs.webwork-tracker.com/api/leaves/approveleaverequest.md): Approve a pending leave request. Only Owners and Executive Managers can approve leave requests. The leave request must be in 'pending' status. ### Reject Leave Request - [PUT /leaves/{leaveRequestId}/reject](https://api-docs.webwork-tracker.com/api/leaves/rejectleaverequest.md): Reject a pending leave request with a reason. Only Owners and Executive Managers can reject leave requests. The leave request must be in 'pending' status. ### Get Leave Balances - [GET /leaves/balances](https://api-docs.webwork-tracker.com/api/leaves/getleavebalances.md): Retrieve leave balances for users within a given date range. Requires date_from and date_to parameters. ### Get Leave Policies - [GET /leaves/policies](https://api-docs.webwork-tracker.com/api/leaves/getleavepolicies.md): Retrieve all leave policies (leave types) in your workspace. Supports filtering by ID. ## Expenses Manage expenses - create, update, delete expenses and view expense categories. ### Get All Expenses - [GET /expenses](https://api-docs.webwork-tracker.com/api/expenses/getexpenses.md): Retrieve all expenses in your workspace. Supports filtering by ID and date range. Results are paginated. ### Create Expense - [POST /expenses](https://api-docs.webwork-tracker.com/api/expenses/createexpense.md): Create a new expense in your workspace. Requires expense_name, date, amount, and category_id. ### Update Expense - [PUT /expenses/{expenseId}](https://api-docs.webwork-tracker.com/api/expenses/updateexpense.md): Update an existing expense. All fields are required. ### Delete Expense - [DELETE /expenses/{expenseId}](https://api-docs.webwork-tracker.com/api/expenses/deleteexpense.md): Delete an expense from your workspace. ### Get Expense Categories - [GET /expenses/categories](https://api-docs.webwork-tracker.com/api/expenses/getexpensecategories.md): Retrieve all expense categories in your workspace. Supports filtering by ID. ## Webhooks Manage webhooks - register callback URLs to receive real-time event notifications from the platform. ### List All Webhooks - [GET /webhooks](https://api-docs.webwork-tracker.com/api/webhooks/getwebhooks.md): Retrieve all webhooks in your workspace. By default, results are paginated with 50 rows per page. Use this resource to manage and administer your webhooks. With this resource, you can register callback URLs to receive real-time event notifications from our platform. Once registered, you'll automatically receive notifications whenever new events occur—such as data updates, member actions, or system alerts. ### Create a Webhook - [POST /webhooks](https://api-docs.webwork-tracker.com/api/webhooks/createwebhook.md): Create a new webhook by registering a callback URL and specifying which events to listen for. You can create a new webhook using POST method and adding all necessary parameters to request body. Include one of the following content types in your request header: Content-Type: application/x-www-form-urlencoded or application/json ### Get a Single Webhook - [GET /webhooks/{webhookId}](https://api-docs.webwork-tracker.com/api/webhooks/getwebhook.md): Retrieve information about a specific webhook by its ID. If you need to get information regarding a specific webhook, you need to add the webhook_id at the end of the URL. ### Update a Webhook - [PUT /webhooks/{webhookId}](https://api-docs.webwork-tracker.com/api/webhooks/updatewebhook.md): Update an existing webhook. To update a webhook, you should send a request to the same URL using PUT method and adding a webhook_id at the end of it. Include one of the following content types in your request header: Content-Type: application/x-www-form-urlencoded or application/json ### Delete a Webhook - [DELETE /webhooks/{webhookId}](https://api-docs.webwork-tracker.com/api/webhooks/deletewebhook.md): Delete a webhook by its ID. To delete a webhook, you should send a request to the same URL using DELETE method and adding a webhook_id at the end of it, as shown in the example. ## 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.