{"info":{"title":"Hubstaff V2 API","description":"# Documentation\n\nWelcome to the Hubstaff API v2. This API provides access to time tracking, project management, and team data.\n\n# Webhooks\n\nWebhooks allow you to receive real-time notifications when events occur in your Hubstaff organization.\n\n## Quick Start\n\n1. Create a webhook with your endpoint URL\n2. Respond to the verification request\n3. Activate the webhook\n4. Start receiving events\n\n## Creating a Webhook\n\n```bash\nPOST /v2/organizations/{org_id}/webhooks\n```\n\n```json\n{\n  \"events\": [\"*\"],\n  \"target_url\": \"https://example.com/webhook\"\n}\n```\n\nThe response includes the webhook `id` needed for activation.\n\n## Endpoint Verification\n\nAfter creation, we send a POST request to your URL with an `X-Hook-Secret` header. Respond with:\n- Status `200`\n- Echo the `X-Hook-Secret` header back\n\n```javascript\n// Node.js\napp.post('/webhook', (req, res) =\u003e {\n  const secret = req.headers['x-hook-secret'];\n  if (secret) {\n    res.setHeader('X-Hook-Secret', secret);\n    return res.sendStatus(200);\n  }\n  // Handle events...\n});\n```\n\n```python\n# Python\n@app.route('/webhook', methods=['POST'])\ndef webhook():\n    secret = request.headers.get('X-Hook-Secret')\n    if secret:\n        response = make_response('OK', 200)\n        response.headers['X-Hook-Secret'] = secret\n        return response\n    # Handle events...\n```\n\n```ruby\n# Ruby\npost '/webhook' do\n  secret = request.env['HTTP_X_HOOK_SECRET']\n  if secret\n    response.headers['X-Hook-Secret'] = secret\n    return status 200\n  end\n  # Handle events...\nend\n```\n\nSave the secret for signature verification.\n\n## Activation\n\n```bash\nPOST /v2/webhooks/{webhook_id}/activate\nX-Hook-Secret: {secret_from_verification}\n```\n\n## Events\n\n| Event | Description                    |\n|-------|--------------------------------|\n| `*` | All events                     |\n| `timer.start` | Time tracking started          |\n| `timer.stop` | Time tracking stopped          |\n| `project.create` | Project created                |\n| `client.create` | Client created                 |\n| `task.create` | Task created                   |\n| `task.assign` | Task assigned                  |\n| `task.unassign` | Task unassigned                |\n| `schedule.create` | Schedule created               |\n| `schedule.update` | Schedule updated               |\n| `schedule.delete` | Schedule deleted               |\n| `shift.ontime` | Shift started on time          |\n| `shift.early` | Shift started early            |\n| `shift.late` | Shift started late             |\n| `shift.abandoned` | Shift abandoned                |\n| `shift.missed` | Shift missed                   |\n| `work_break.create` | Break started                  |\n| `activity.create` | Activity created (on request)  |\n| `activity.update` | Activity updated (on request)             |\n| `activity.delete` | Activity deleted (on request)             |\n| `idle_time.start` | Idle time started (beta)       |\n| `billing.occupied_seats` | Occupied seats snapshot |\n\n## Occupied Seats Event\n\nFor `billing.occupied_seats`:\n- `occupied_seats` represents the latest available occupied-seat value up to the previous UTC day when the event is sent.\n- The value is snapshot-based (not recalculated live at delivery time).\n- `occupied_seats` is different from purchased/paid seat quota.\n\n## Payload Format\n\n```json\n{\n  \"id\": \"69d37f9f-483e-4be1-92c3-b2377203a8cd\",\n  \"event\": \"timer.start\",\n  \"created_at\": \"2024-06-20T14:10:55.196912\",\n  \"payload\": {\n    \"organization_id\": 13,\n    \"project_id\": 841201,\n    \"project_name\": \"DevSecOps\",\n    \"task_id\": null,\n    \"task_summary\": null,\n    \"user_id\": 651956,\n    \"user_name\": \"Alex Yarotsky\",\n    \"tracking_started_at\": \"2024-06-20T14:10:46.235Z\"\n  }\n}\n```\n\n## Signature Verification\n\nAll requests include `X-Hook-Signature` (HMAC-SHA256). Always verify signatures:\n\n```javascript\n// Node.js\nconst crypto = require('crypto');\n\nfunction verify(payload, signature, secret) {\n  const expected = crypto.createHmac('sha256', secret).update(payload).digest('hex');\n  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));\n}\n```\n\n```python\n# Python\nimport hmac, hashlib\n\ndef verify(payload, signature, secret):\n    expected = hmac.new(secret.encode(), payload, hashlib.sha256).hexdigest()\n    return hmac.compare_digest(expected, signature)\n```\n\n```ruby\n# Ruby\ndef verify(payload, signature, secret)\n  expected = OpenSSL::HMAC.hexdigest('sha256', secret, payload)\n  Rack::Utils.secure_compare(expected, signature)\nend\n```\n\n## Deleting a Webhook\n\n```bash\nDELETE /v2/webhooks/{webhook_id}\n```\n","contact":{"email":"api@hubstaff.com"},"version":"2.0"},"swagger":"2.0","produces":["application/json"],"securityDefinitions":{"oauth2":{"type":"oauth2","description":"Hubstaff Account OpenID Connect Authentication","flow":"accessCode","x-nonce":true,"authorizationUrl":"https://account.hubstaff.com/authorizations/new","tokenUrl":"https://account.hubstaff.com/access_tokens","scopes":{"hubstaff:write":"Write only access to the Hubstaff API","hubstaff:read":"Read only access to the Hubstaff API"}}},"security":[{"oauth2":["hubstaff:read","hubstaff:write"]}],"host":"api.hubstaff.com","schemes":["https"],"x-changelog":[{"id":"2026-09-10-public-api-available-on-all-plans","title":"Public API available on all plans","date":"2026-09-10","label":"breaking","tags":["errors","screenshot_settings","app_and_url_tracking_settings","overtime_policies"],"operations":["getV2OrganizationsOrganizationIdScreenshotSettings","putV2OrganizationsOrganizationIdScreenshotSettings","getV2OrganizationsOrganizationIdAppAndUrlTrackingSettings","putV2OrganizationsOrganizationIdAppAndUrlTrackingSettings","getV2OrganizationsOrganizationIdOvertimePolicies","postV2OrganizationsOrganizationIdOvertimePolicies","getV2OvertimePoliciesOvertimePolicyId","putV2OvertimePoliciesOvertimePolicyId","postV2OvertimePoliciesOvertimePolicyIdArchive","postV2OvertimePoliciesOvertimePolicyIdRestore"],"summary":"The Public API is no longer restricted by plan, and the error code for plan-restricted features changed from 10005 to 10006.","changes":[{"label":"Plan requirement","before":"Organization-scoped endpoints required a Team or Enterprise plan, for organizations subject to the restriction","after":"No plan requirement"},{"label":"Organization access tokens","before":"Could not be created on a plan without API access, for the same organizations","after":"Can be created on any plan"},{"label":"Error code 10005 (plan_restricted)","before":"Returned when the plan did not include API access","after":"Retired; no longer returned"},{"label":"Error code 10006 (feature_not_available)","before":"Returned by other feature checks","after":"Also returned by screenshot settings, app \u0026 URL tracking settings and overtime policies"}],"body":"Organization-scoped endpoints and organization access tokens no longer check the organization's plan, so requests that previously failed with `403 plan_restricted` now succeed. The restriction never applied to every account — organizations that predated it kept access regardless of plan — so you may see no change. Rate limits are unchanged.\n\nThree endpoints still require the plan to include the underlying feature — screenshot settings, app \u0026 URL tracking settings, and overtime policies. They now answer `403` with `code: \"feature_not_available\"` and `error_code: 10006` instead of `code: \"plan_restricted\"` and `error_code: 10005`. **If your integration branches on `10005` or on `plan_restricted`, update it to `10006` / `feature_not_available`.** Code `10005` is retired and will not be reused."},{"id":"2026-09-07-automated-activity-type-value","title":"New type value for automated activity instances","date":"2026-09-07","label":"update","tags":["unusual_activities"],"operations":["getV2OrganizationsOrganizationIdInsightsUnusualActivities"],"summary":"Unusual activity instances found by automated (bot) behavior analysis are reported with the type automation_like_activity.","changes":[],"body":"Returned only for organizations with automated activity detection enabled. The value is also accepted by the `unusual_activity_type` filter. No other `type` value changed."},{"id":"2026-07-24-members-invite-link-filter","title":"Filter members by invite link","date":"2026-07-24","label":"update","tags":["members"],"operations":["getV2OrganizationsOrganizationIdMembers"],"summary":"The organization members endpoint accepts a new optional invite_link_id filter returning only members who joined via that invite link.","body":"Requires invite link management access (organization owners and managers with the invite members permission)."},{"id":"2026-07-24-invite-links-crud","title":"Invite links endpoints","date":"2026-07-24","label":"new_endpoint","tags":["invite_links"],"operations":["getV2OrganizationsOrganizationIdInviteLinks","postV2OrganizationsOrganizationIdInviteLinks","getV2InviteLinksInviteLinkId","putV2InviteLinksInviteLinkId","deleteV2InviteLinksInviteLinkId"],"summary":"Manage shareable invite links: list, create, update (including enable/disable), and delete them.","body":"New endpoints let organization owners and managers manage invite links with configurable name, role, project \u0026 team assignment, pay rate, expiration date, and usage cap. `PUT` accepts `enabled` to disable or re-enable a link."},{"id":"2026-07-20-manual-time-requests-api","title":"Manual time requests API","date":"2026-07-20","label":"new_endpoint","tags":["manual_time_requests"],"operations":[],"summary":"Manual time requests are now available in Public API v2 for listing, reading, and approving or denying requests.","body":"Use the organization-scoped list endpoint to filter requests by date, update time, status, member, project, task, or team. Status updates support approving and denying requests, including denial reasons and approval conflict options.\n\nSee the [Manual time requests guide](https://developer.hubstaff.com/manual-time-requests) for request/response examples and conflict handling."},{"id":"2026-07-10-tracking-states-endpoint","title":"Tracking states endpoint","date":"2026-07-10","label":"new_endpoint","tags":["tracking_states"],"operations":["getV2OrganizationsOrganizationIdTrackingStates"],"summary":"List timer start and stop events per member.","body":"Returns timer `start`/`stop` events for an organization's members, each with its `project_type` (`project`/`work_order`/`work_break`). Filterable by `occurred[start]`/`occurred[stop]` (maximum 7-day range), `user_ids`, `project_ids`, and `task_ids`. Events on deleted projects are excluded; events from members removed from the organization are excluded unless `include_removed=true`. Keyset-paginated by `id`; requires the `hubstaff:read` scope."},{"id":"2026-07-09-error-codes-all-endpoints","title":"Machine-readable error codes on all endpoints","date":"2026-07-09","label":"update","tags":["errors"],"summary":"Every error response now includes a numeric error_code, and validation failures include a per-field details array.","changes":[{"label":"error_code","before":"Present on a few endpoints only","after":"Present on every error response"},{"label":"details","before":"Not returned","after":"Array of {attribute, error} on validation failures"}],"body":"All 4xx/5xx responses now carry a stable numeric `error_code` alongside the human-readable `error`; see `GET /v2/error_codes` for the full list. Validation errors additionally return a `details` array pinpointing the offending fields. Several conditions that previously surfaced as a generic `500` (e.g. tracking time against a task the member is not assigned to, a project budget limit, an overlapping work break, deleting an imported time-off request, or an unknown job-site rule id) now return a specific coded 4xx instead. All fields are additive; existing integrations that key off the HTTP status keep working."},{"id":"2026-07-08-insights-widget-endpoints","title":"Insights widget endpoints: work time classification, focus time, activity, idle time \u0026 meetings","date":"2026-07-08","label":"new_endpoint","tags":["insights"],"operations":["getV2OrganizationsOrganizationIdInsightsWorkTimeClassification","getV2OrganizationsOrganizationIdInsightsFocusTime","getV2OrganizationsOrganizationIdInsightsActivity","getV2OrganizationsOrganizationIdInsightsIdleTime","getV2OrganizationsOrganizationIdInsightsMeetings"],"summary":"Read the five Insights dashboard widgets via the API as per-day, per-member, per-project rows (meetings per-day, per-member).","changes":[],"body":"New read-only endpoints returning raw seconds/counts at `(date, user_id, project_id)` grain (meetings at `(date, user_id)`): work time classification, focus time, activity, idle time, and meetings. Filter by `date`, `user_ids`, `team_ids`, and `project_ids` (not on meetings). Pass `remote_vs_office=true` to add a per-row `location` field (`remote`, `on_site`, or `unknown`). Requires the Insights add-on and is available to organization owners and managers."},{"id":"2026-07-06-overtime-policies-api","title":"Overtime policies API","date":"2026-07-06","label":"new_endpoint","tags":["overtime_policies"],"operations":["getV2OrganizationsOrganizationIdOvertimePolicies","postV2OrganizationsOrganizationIdOvertimePolicies","getV2OvertimePoliciesOvertimePolicyId","putV2OvertimePoliciesOvertimePolicyId","postV2OvertimePoliciesOvertimePolicyIdArchive","postV2OvertimePoliciesOvertimePolicyIdRestore"],"summary":"List, create, read, edit, archive, and restore overtime policies and their member assignments.","body":"A new `overtime_policy` entity exposes the policy type (`weekly`/`daily`), threshold, pay rate multiplier, notification settings, and assigned members. Notes: `threshold` is in hours; edits take effect at the start of the next week; `policy_type` cannot be changed after creation; archived policies cannot be edited. When assigning members (on create or edit), pass `override: true` to move members that already belong to another active policy of the same type; otherwise the request is rejected. `daily` policies require the flexible overtime feature."},{"id":"2026-07-03-timesheet-status-update","title":"Update timesheet status","date":"2026-07-03","label":"new_endpoint","tags":["timesheets"],"operations":["putV2TimesheetsTimesheetId"],"summary":"New endpoint to change a timesheet's status: open, submitted, approved, or denied.","body":"A `denial_reason` is required when denying. Approving a period with pending manual time requests or time off requests returns `422` (error_code `14905` / `14906`); repeat the request with `confirm_pending_manual_time_request_denial` or `acknowledge_pending_time_off_requests` set to `true`."},{"id":"2026-07-02-member-limits-api","title":"Member limits API","date":"2026-07-02","label":"new_endpoint","tags":["member_limits"],"operations":["getV2ProjectsProjectIdMemberLimits","postV2ProjectsProjectIdMemberLimits","getV2ProjectsProjectIdMemberLimitsMemberLimitId","putV2ProjectsProjectIdMemberLimitsMemberLimitId","deleteV2ProjectsProjectIdMemberLimitsMemberLimitId"],"summary":"Full CRUD for per-member budget limit groups on projects.","body":"List, create, read, update, and delete member limit groups, including member assignments and project-level alerts."},{"id":"2026-06-29-screenshot-settings-batch","title":"Batch endpoints for screenshot settings","date":"2026-06-29","label":"new_endpoint","tags":["screenshot_settings"],"operations":["getV2OrganizationsOrganizationIdScreenshotSettings","putV2OrganizationsOrganizationIdScreenshotSettings"],"summary":"Read and batch-update the screenshot frequency setting for organization members.","changes":[],"body":"A new `screenshot_setting` entity exposes the per-member screenshot frequency, so you can change it for many members in one request."},{"id":"2026-06-29-member-provisioning-type","title":"Member provisioning type in members responses","date":"2026-06-29","label":"update","tags":["members"],"operations":["getV2OrganizationsOrganizationIdMembers","getV2ProjectsProjectIdMembers","getV2TeamsTeamIdMembers"],"summary":"Member objects now include a type field describing how each member was provisioned.","changes":[{"label":"Member `type` field","before":"Not present","after":"standard · scim · silent · sso"}],"body":"The field is additive — existing integrations are unaffected."},{"id":"2026-06-29-insights-tool-classifications-network-locations","title":"Insights endpoints: tool classifications, network locations, categories \u0026 job types","date":"2026-06-29","label":"new_endpoint","tags":["tool_classifications","network_locations","job_types"],"operations":["getV2OrganizationsOrganizationIdInsightsToolClassifications","patchV2OrganizationsOrganizationIdInsightsToolClassifications","getV2OrganizationsOrganizationIdInsightsToolCategories","getV2OrganizationsOrganizationIdInsightsNetworkLocations","postV2OrganizationsOrganizationIdInsightsNetworkLocations","getV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId","patchV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId","deleteV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId","getV2OrganizationsOrganizationIdJobTypes"],"summary":"Manage Insights productivity/category classifications for apps and URL sites, manage network location definitions, and list tool categories and job types.","changes":[],"body":"New endpoints: list and update tool classifications, full CRUD for network locations, and read-only lists of tool categories and job types for classification scoping."},{"id":"2026-06-29-apps-urls-tracking-batch","title":"Batch endpoints for Apps \u0026 URLs tracking settings","date":"2026-06-29","label":"new_endpoint","tags":["app_and_url_tracking_settings"],"operations":["getV2OrganizationsOrganizationIdAppAndUrlTrackingSettings","putV2OrganizationsOrganizationIdAppAndUrlTrackingSettings"],"summary":"Read and batch-update the Track Apps \u0026 URLs setting for organization members.","changes":[],"body":"A new `app_and_url_tracking_setting` entity exposes the per-member tracking flag. You can read it and update many members in a single request instead of one call per member."},{"id":"2026-06-24-ignored-users-read-only","title":"Read-only endpoints for Silent app ignored users","date":"2026-06-24","label":"new_endpoint","tags":["ignored_user_matches","ignored_user_patterns"],"operations":["getV2OrganizationsOrganizationIdSilentAppIgnoredUserMatches","getV2OrganizationsOrganizationIdSilentAppIgnoredUserPatterns"],"summary":"View the users and username patterns the Silent app skips during device provisioning.","changes":[]},{"id":"2026-06-18-activity-location-type","title":"Location type on activity responses","date":"2026-06-18","label":"update","tags":["activities"],"operations":["getV2OrganizationsOrganizationIdActivities","getV2ProjectsProjectIdActivities"],"summary":"Activity objects now include a location_type field indicating remote vs in-office status.","changes":[{"label":"Activity `location_type` field","before":"Not present","after":"unknown · remote · on_site"}],"body":"The field is additive — existing integrations are unaffected."},{"id":"2026-05-29-project-budget-fields","title":"Expanded project budget options","date":"2026-05-29","label":"update","tags":["projects","budgets"],"operations":["postV2OrganizationsOrganizationIdProjects","putV2ProjectsProjectId","getV2ProjectsProjectIdBudgetHistories","getV2OrganizationsOrganizationIdBudgetHistories"],"summary":"Project budgets now support weekly recurrence and expose additional notification and auto-stop settings on create/update and in responses.","changes":[{"label":"Budget recurrence","before":"monthly only","after":"weekly · monthly (with recurrence_start)"},{"label":"Budget alert fields","before":"near_limit only","after":"notify_enabled · notify_all_members · notify_group"},{"label":"Auto-stop fields","before":"Not available","after":"stop_timer_when_budget_reached · stop_at"}],"body":"The budget `rate` field is now returned only when the budget type is `cost`."},{"id":"2026-05-27-audit-log-entries-list","title":"List endpoint for organization audit log entries","date":"2026-05-27","label":"new_endpoint","tags":["audit_log_entries"],"operations":["getV2OrganizationsOrganizationIdAuditLogEntries"],"summary":"List an organization's audit log entries via the API.","changes":[]},{"id":"2026-05-19-members-batch-too-many-members-error","title":"Batch size limit on members updates","date":"2026-05-19","label":"breaking","tags":["members"],"operations":["putV2OrganizationsOrganizationIdUpdateMembers","putV2ProjectsProjectIdUpdateMembers","putV2TeamsTeamIdUpdateMembers"],"summary":"Batch member updates now reject requests that exceed the per-request limit instead of processing them.","changes":[{"label":"Oversized member batch","before":"Processed","after":"Rejected with HTTP 400, code \"too_many_members\""}],"body":"Split member batches into chunks no larger than the `max_size` returned in the error payload (error code `11005`)."}],"x-tagGroups":[{"name":"Endpoints","tags":["activities","app_and_url_tracking_settings","attendance_schedules","attendance_shifts","audit_log_entries","budgets","client_invoices","clients","global_todos","holidays","ignored_user_matches","ignored_user_patterns","insights","integrations","invites","invite_links","job_site_visits","job_sites","job_types","limits","locations","manual_time_requests","member_limits","members","network_locations","notes","organizations","overtime_policies","projects","rates","screenshot_settings","screenshots","smart_notification_rules","smart_notifications","tasks","team_invoices","team_payments","teams","time_edit_logs","time_entries","time_off_balances","time_off_policies","time_off_requests","timesheets","tool_categories","tool_classifications","tool_usages","tracking_states","unusual_activities","users","webhooks"]},{"name":"Reference","tags":["errors"]}],"tags":[{"name":"activities","description":"Get tracked keyboard, mouse, and overall activity levels"},{"name":"app_and_url_tracking_settings","description":"Read and batch-update the Track Apps \u0026 URLs setting for members"},{"name":"attendance_schedules","description":"Define work schedules and expected attendance for team members"},{"name":"attendance_shifts","description":"Monitor shift attendance, punctuality, and missed shifts"},{"name":"audit_log_entries","description":"Read organization audit log entries"},{"name":"budgets","description":"View project budget history and spending data"},{"name":"client_invoices","description":"View invoices generated for clients"},{"name":"clients","description":"Manage client accounts and associate them with projects"},{"name":"global_todos","description":"Manage global to-dos"},{"name":"holidays","description":"View company holidays and non-working days"},{"name":"ignored_user_matches","description":"View users the Silent app skipped during device provisioning"},{"name":"ignored_user_patterns","description":"View username patterns the Silent app skips during device provisioning"},{"name":"insights","description":"Read Insights widget metrics: work time classification, focus time, activity, idle time, and meetings"},{"name":"integrations","description":"View connected third-party tools and services"},{"name":"invite_links","description":"Manage shareable links for joining an organization"},{"name":"invites","description":"Send and manage team member invitations"},{"name":"job_site_visits","description":"Track visits to physical job site locations"},{"name":"job_sites","description":"Define physical locations for field work tracking"},{"name":"job_types","description":"List job types available for Insights productivity classification scoping"},{"name":"limits","description":"View daily and weekly hour limits for users"},{"name":"locations","description":"GPS location data captured during time tracking"},{"name":"manual_time_requests","description":"List and approve/deny manual time entry requests"},{"name":"member_limits","description":"Manage per-member budget limit groups, member assignments, and project-level alerts"},{"name":"members","description":"View members and add new members"},{"name":"network_locations","description":"Manage office and remote network location definitions for Insights"},{"name":"notes","description":"Add notes and comments to time entries"},{"name":"organizations","description":"Manage organization settings and structure"},{"name":"overtime_policies","description":"Create, read, edit and archive overtime policies and their member assignments"},{"name":"projects","description":"Create and manage projects for time tracking"},{"name":"rates","description":"View hourly pay and bill rates"},{"name":"screenshot_settings","description":"Read and batch-update the screenshot frequency setting for members"},{"name":"screenshots","description":"Access screenshots captured during work sessions"},{"name":"smart_notification_rules","description":"Configure automated notification triggers"},{"name":"smart_notifications","description":"View triggered smart notifications"},{"name":"tasks","description":"Manage tasks within projects for detailed tracking"},{"name":"team_invoices","description":"View invoices for team payments"},{"name":"team_payments","description":"View payment records for team members"},{"name":"teams","description":"Organize members into teams within an organization"},{"name":"time_edit_logs","description":"Audit trail of manual time entry modifications"},{"name":"time_entries","description":"Create manual time entries"},{"name":"time_off_balances","description":"Manage time off balances"},{"name":"time_off_policies","description":"Manage time off policies"},{"name":"time_off_requests","description":"Manage time off requests"},{"name":"timesheets","description":"Weekly timesheet summaries for approval workflows"},{"name":"tool_categories","description":"List available tool category names for use in tool classification updates"},{"name":"tool_classifications","description":"Manage productivity and category classifications for applications and URL sites"},{"name":"tool_usages","description":"View application and tool usage data"},{"name":"tracking_states","description":"View timer start and stop events per member"},{"name":"unusual_activities","description":"Flagged activities that may require review"},{"name":"users","description":"View user accounts and profile information"},{"name":"webhooks","description":"Subscribe to real-time event notifications via HTTP callbacks"},{"name":"errors","description":"API error codes and troubleshooting guide"}],"paths":{"/v2/attendance_schedules/{attendance_schedule_id}":{"put":{"summary":"Update attendance schedule","description":"Updates an attendance schedule.\n\nReturns the updated attendance schedule.\n\nOnly pass in the fields you want to change. Use add_excluded_dates/remove_excluded_dates to modify exclusions incrementally, or excluded_dates to replace them entirely.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"attendance_schedule_id","description":"Attendance schedule ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2AttendanceSchedulesAttendanceScheduleId"}}],"responses":{"200":{"description":"An attendance schedule","schema":{"type":"object","properties":{"attendance_schedule":{"$ref":"#/definitions/AttendanceSchedule"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["attendance_schedules"],"operationId":"putV2AttendanceSchedulesAttendanceScheduleId"}},"/v2/budget_histories/{budget_history_id}":{"get":{"summary":"Get budget history","description":"Returns the budget history with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"budget_history_id","description":"Budget History ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A budget history","schema":{"type":"object","properties":{"budget_history":{"$ref":"#/definitions/BudgetHistory"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["budgets"],"operationId":"getV2BudgetHistoriesBudgetHistoryId"}},"/v2/clients/{client_id}":{"get":{"summary":"Get client","description":"Returns the client with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"client_id","description":"Client ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A client","schema":{"type":"object","properties":{"client":{"$ref":"#/definitions/Client"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["clients"],"operationId":"getV2ClientsClientId"},"put":{"summary":"Update client","description":"Updates a client.\n\nReturns the updated client.\n\nOnly pass in the fields you want to change. To unset the budget, specify null as the value. To update the budget, you must specify the complete budget configuration. To clear invoice_notes or net_terms (to use organization defaults), specify null as the value.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"client_id","description":"Client ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2ClientsClientId"}}],"responses":{"200":{"description":"A client","schema":{"type":"object","properties":{"client":{"$ref":"#/definitions/Client"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["clients"],"operationId":"putV2ClientsClientId"}},"/v2/clients/{client_id}/update_metadata":{"put":{"summary":"Update client metadata","description":"Updates metadata on the client.\n\nReturns the updated client.\n\nOnly specify the metadata keys you want to change. If the metadata key does not exist, it will be created. To remove a key, specify null as the value.\n\nKey requirements:\n- 2-30 characters\n- Lowercase letters, numbers, and underscores only\n\nValue requirements:\n- Valid UTF-8 string\n- Maximum 200 characters\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"client_id","description":"Client ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2ClientsClientIdUpdateMetadata"}}],"responses":{"200":{"description":"A client","schema":{"type":"object","properties":{"client":{"$ref":"#/definitions/Client"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["clients"],"operationId":"putV2ClientsClientIdUpdateMetadata"}},"/v2/clients/{client_id}/budget_histories":{"get":{"summary":"List client budget histories","description":"Returns budget configuration history (changes to budget settings over time) for the given client.\n\n\n","produces":["application/json"],"parameters":[{"in":"path","name":"client_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of budget histories","schema":{"type":"object","properties":{"budget_histories":{"type":"array","items":{"$ref":"#/definitions/BudgetHistory"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["budgets"],"operationId":"getV2ClientsClientIdBudgetHistories"}},"/v2/error_codes":{"get":{"summary":"List all error codes","description":"Returns all available error codes with their descriptions.\nUse these codes for programmatic error handling and i18n support.\n\nError code ranges:\n- 10000-10999: Authentication \u0026 Authorization\n- 11000-11999: Validation\n- 12000-12999: Resource\n- 13000-13999: Rate Limiting\n- 14000-14999: Time Entries / Activities\n- 15000-15999: System\n","produces":["application/json"],"responses":{"200":{"description":"List of error codes"}},"tags":["errors"],"operationId":"getV2ErrorCodes"}},"/v2/insights/smart_notification_rules/{rule_id}":{"get":{"summary":"Get smart notification rule","description":"Returns the smart notification rule with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"rule_id","description":"smart notification rule ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A smart notification rule","schema":{"type":"object","properties":{"smart_notification_rule":{"$ref":"#/definitions/SmartNotificationRule"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["smart_notification_rules"],"operationId":"getV2InsightsSmartNotificationRulesRuleId"},"put":{"summary":"Update smart notification rule","description":"Updates a smart notification rule.\n\nReturns the updated smart notification rule.\n\nOnly pass in the fields you want to change.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"rule_id","description":"smart notification rule ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2InsightsSmartNotificationRulesRuleId"}}],"responses":{"200":{"description":"A smart notification rule","schema":{"type":"object","properties":{"smart_notification_rule":{"$ref":"#/definitions/SmartNotificationRule"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["smart_notification_rules"],"operationId":"putV2InsightsSmartNotificationRulesRuleId"},"delete":{"summary":"Delete smart notification rule","description":"Deletes a smart notification rule.\n","produces":["application/json"],"parameters":[{"in":"path","name":"rule_id","description":"smart notification rule ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Deleted successfully"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["smart_notification_rules"],"operationId":"deleteV2InsightsSmartNotificationRulesRuleId"}},"/v2/insights/smart_notification_rules/{rule_id}/toggle_status":{"patch":{"summary":"Toggle smart notification rule","description":"Sets the status of a smart notification rule to either enabled or disabled.\nThe 'enabled' parameter determines the new status of the rule.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"rule_id","description":"smart notification rule ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/patchV2InsightsSmartNotificationRulesRuleIdToggleStatus"}}],"responses":{"200":{"description":"A smart notification rule","schema":{"type":"object","properties":{"smart_notification_rule":{"$ref":"#/definitions/SmartNotificationRule"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["smart_notification_rules"],"operationId":"patchV2InsightsSmartNotificationRulesRuleIdToggleStatus"}},"/v2/integrations/{integration_id}/project_links":{"get":{"summary":"List integration integration project links","description":"Returns a collection of active project links (mappings between Hubstaff projects and integration projects).\n","produces":["application/json"],"parameters":[{"in":"path","name":"integration_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"a list of project links","schema":{"type":"object","properties":{"project_links":{"type":"array","items":{"$ref":"#/definitions/IntegrationProjectLink"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["integrations"],"operationId":"getV2IntegrationsIntegrationIdProjectLinks"}},"/v2/integrations/{integration_id}/user_links":{"get":{"summary":"List integration integration user links","description":"Returns a collection of active user links (mappings between Hubstaff users and integration users).\n","produces":["application/json"],"parameters":[{"in":"path","name":"integration_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"a list of user links","schema":{"type":"object","properties":{"user_links":{"type":"array","items":{"$ref":"#/definitions/IntegrationUserLink"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["integrations"],"operationId":"getV2IntegrationsIntegrationIdUserLinks"}},"/v2/integrations/{integration_id}/tasks":{"get":{"summary":"List integration tasks","description":"Returns a collection of tasks (to-dos) for the given integration.\n\nResults can be filtered by status[] (active/completed/deleted), user_ids[], project_ids[], and global_todo_ids[].\n","produces":["application/json"],"parameters":[{"in":"path","name":"integration_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"status","description":"A status or list of statuses to filter","type":"array","items":{"type":"string","enum":["active","completed","deleted","archived","archived_native_active","archived_native_completed","archived_native_deleted"]},"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false},{"in":"query","name":"remote_ids","description":"List of remote_ids to search against remote_id or alternate_remote_id","type":"array","items":{"type":"string"},"required":false}],"responses":{"200":{"description":"A list of tasks","schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/definitions/Task"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"getV2IntegrationsIntegrationIdTasks"}},"/v2/invite_links/{invite_link_id}":{"get":{"summary":"Get invite link","description":"Returns the invite link with the given ID.\n\nOnly available to organization owners and managers with the invite members permission.\n","produces":["application/json"],"parameters":[{"in":"path","name":"invite_link_id","description":"Invite link ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"An invite link","schema":{"type":"object","properties":{"invite_link":{"$ref":"#/definitions/InviteLink"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invite_links"],"operationId":"getV2InviteLinksInviteLinkId"},"put":{"summary":"Update invite link","description":"Updates an invite link. Only pass in the fields you want to change.\n\nPass `enabled: false` to disable the link and `enabled: true` to enable it back.\nA link can only be enabled while it is assigned to at least one active project or a team.\n\nPass `pay_rate: null` to remove the pay rate (requires the manage financials permission).\n\nOnly available to organization owners and managers with the invite members permission.\n\nAvailable roles:\n- project_user - Invited as a project user\n- project_viewer - Invited as a project viewer\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"invite_link_id","description":"Invite link ID","type":"integer","format":"int32","required":true},{"name":"putV2InviteLinksInviteLinkId","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2InviteLinksInviteLinkId"}}],"responses":{"200":{"description":"An invite link","schema":{"type":"object","properties":{"invite_link":{"$ref":"#/definitions/InviteLink"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invite_links"],"operationId":"putV2InviteLinksInviteLinkId"},"delete":{"summary":"Delete invite link","description":"Deletes an invite link. The link stops working immediately; members who already joined stay in the organization.\n\nNote: The organization's default invite link cannot be deleted.\n\nOnly available to organization owners and managers with the invite members permission.\n","produces":["application/json"],"parameters":[{"in":"path","name":"invite_link_id","description":"Invite link ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Deletion successful","schema":{"type":"object","properties":{"invite_link":{"$ref":"#/definitions/InviteLink"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invite_links"],"operationId":"deleteV2InviteLinksInviteLinkId"}},"/v2/invites/{invite_id}":{"get":{"summary":"Get invite","description":"Returns the invite with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"invite_id","description":"Invite ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"An invite","schema":{"type":"object","properties":{"invite":{"$ref":"#/definitions/Invite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invites"],"operationId":"getV2InvitesInviteId"},"put":{"summary":"Update invite","description":"Updates an invite.\n\nReturns the updated invite.\n\nOnly pass in the fields you want to change. To clear project_ids or pay_rate, send the value 'none'.\n\nAvailable roles:\n- organization_manager - Invited as an organization manager\n- project_manager - Invited as a project manager\n- project_user - Invited as a project user\n- project_viewer - Invited as a project viewer\n\nIf no project_ids are set, any project_* role will default to project_viewer (no projects assigned).\n\nNote: Accepted invites cannot be updated.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"invite_id","description":"Invite ID","type":"integer","format":"int32","required":true},{"name":"putV2InvitesInviteId","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2InvitesInviteId"}}],"responses":{"200":{"description":"An invite","schema":{"type":"object","properties":{"invite":{"$ref":"#/definitions/Invite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invites"],"operationId":"putV2InvitesInviteId"},"delete":{"summary":"Delete invite","description":"Deletes an invite.\n\nNote: Accepted invites cannot be deleted.\n","produces":["application/json"],"parameters":[{"in":"path","name":"invite_id","description":"Invite ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Deletion successful","schema":{"type":"object","properties":{"invite":{"$ref":"#/definitions/Invite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invites"],"operationId":"deleteV2InvitesInviteId"}},"/v2/job_sites/{job_site_id}":{"get":{"summary":"Get job site","description":"Returns the job site with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"job_site_id","description":"Job site ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A job site","schema":{"type":"object","properties":{"job_site":{"$ref":"#/definitions/JobSite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_sites"],"operationId":"getV2JobSitesJobSiteId"},"put":{"summary":"Update job site","description":"Updates a job site.\n\nReturns the updated job site.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"job_site_id","description":"Job site ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2JobSitesJobSiteId"}}],"responses":{"201":{"description":"A job site","schema":{"type":"object","properties":{"job_site":{"$ref":"#/definitions/JobSite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_sites"],"operationId":"putV2JobSitesJobSiteId"}},"/v2/job_sites/{job_site_id}/update_rules":{"put":{"summary":"Update job site rules","description":"Updates rules on a job site.\n\nReturns the updated job site.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"job_site_id","description":"Job site ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2JobSitesJobSiteIdUpdateRules"}}],"responses":{"201":{"description":"A job site","schema":{"type":"object","properties":{"job_site":{"$ref":"#/definitions/JobSite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_sites"],"operationId":"putV2JobSitesJobSiteIdUpdateRules"}},"/v2/job_sites/{job_site_id}/add_rules":{"put":{"summary":"Add job site rules","description":"Adds new rules to a job site.\n\nReturns the updated job site.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"job_site_id","description":"Job site ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2JobSitesJobSiteIdAddRules"}}],"responses":{"201":{"description":"A job site","schema":{"type":"object","properties":{"job_site":{"$ref":"#/definitions/JobSite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_sites"],"operationId":"putV2JobSitesJobSiteIdAddRules"}},"/v2/job_sites/{job_site_id}/remove_rules":{"put":{"summary":"Remove job site rules","description":"Removes rules from a job site.\n\nReturns the updated job site.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"job_site_id","description":"Job site ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2JobSitesJobSiteIdRemoveRules"}}],"responses":{"201":{"description":"A job site","schema":{"type":"object","properties":{"job_site":{"$ref":"#/definitions/JobSite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_sites"],"operationId":"putV2JobSitesJobSiteIdRemoveRules"}},"/v2/limit_histories/{limit_history_id}":{"get":{"summary":"Get limit history","description":"Returns the limit history with the given ID.","produces":["application/json"],"parameters":[{"in":"path","name":"limit_history_id","description":"Limit History ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A limit history","schema":{"type":"object","properties":{"limit_history":{"$ref":"#/definitions/LimitHistory"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["limits"],"operationId":"getV2LimitHistoriesLimitHistoryId"}},"/v2/manual_time_requests/{manual_time_request_id}":{"get":{"summary":"Get manual time request","description":"Returns the manual time request with the given ID.","produces":["application/json"],"parameters":[{"in":"path","name":"manual_time_request_id","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"","schema":{"type":"object","properties":{"manual_time_request":{"$ref":"#/definitions/ManualTimeRequest"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["manual_time_requests"],"operationId":"getV2ManualTimeRequestsManualTimeRequestId"}},"/v2/manual_time_requests/{manual_time_request_id}/status":{"put":{"summary":"Update manual time request status","description":"Approves or denies a submitted manual time request.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"manual_time_request_id","type":"integer","format":"int32","required":true},{"name":"putV2ManualTimeRequestsManualTimeRequestIdStatus","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2ManualTimeRequestsManualTimeRequestIdStatus"}}],"responses":{"200":{"description":"","schema":{"type":"object","properties":{"manual_time_request":{"$ref":"#/definitions/ManualTimeRequest"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["manual_time_requests"],"operationId":"putV2ManualTimeRequestsManualTimeRequestIdStatus"}},"/v2/notes/{note_id}":{"get":{"summary":"Get note","description":"Returns the note with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"note_id","description":"Note ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A note","schema":{"type":"object","properties":{"note":{"$ref":"#/definitions/Note"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["notes"],"operationId":"getV2NotesNoteId"}},"/v2/organizations":{"post":{"summary":"Create organization","description":"Creates a new organization.\n\nReturns the created organization.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"name":"postV2Organizations","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2Organizations"}}],"responses":{"200":{"description":"An organization","schema":{"type":"object","properties":{"organization":{"$ref":"#/definitions/Organization"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["organizations"],"operationId":"postV2Organizations"},"get":{"summary":"List organizations","description":"Returns a collection of organizations the authenticated user is an active member of.\n","produces":["application/json"],"parameters":[{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of organizations","schema":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/definitions/Organization"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["organizations"],"operationId":"getV2Organizations"}},"/v2/organizations/{organization_id}":{"get":{"summary":"Get organization","description":"Returns the organization with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","description":"Organization ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"An organization","schema":{"type":"object","properties":{"organization":{"$ref":"#/definitions/Organization"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["organizations"],"operationId":"getV2OrganizationsOrganizationId"}},"/v2/organizations/{organization_id}/update_members":{"put":{"summary":"Update organization members","description":"Updates organization members.\n\nReturns {success: true} on success.\n\nOnly pass in the members you want to change.\n\nAvailable roles:\n- user - Member role determined by project membership\n- manager - Organization manager\n- owner - Organization owner\n- remove - Removes user from organization (and all projects/teams)\n\nLimits: Specify full limits config. Missing limits will be removed. Empty \"limits\" removes all limits.\n\nProjects: Specify project memberships to change. Available project roles: viewer, user, manager, remove.\n\nMetadata: Only specify keys to change. Non-existent keys are created. Use null to remove a key.\n\nKey requirements:\n- 2-30 characters\n- Lowercase letters, numbers, and underscores only\n\nValue requirements:\n- Valid UTF-8 string\n- Maximum 200 characters\n\nBatch size: Up to 150 members per request. Larger requests are rejected with HTTP 400 and code \"too_many_members\".\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","description":"Organization ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2OrganizationsOrganizationIdUpdateMembers"}}],"responses":{"200":{"description":"Updated successfully"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["members"],"operationId":"putV2OrganizationsOrganizationIdUpdateMembers"}},"/v2/organizations/{organization_id}/update_metadata":{"put":{"summary":"Update organization metadata","description":"Updates metadata on the organization.\n\nReturns the updated organization.\n\nOnly specify the metadata keys you want to change. If the metadata key does not exist, it will be created. To remove a key, specify null as the value.\n\nKey requirements:\n- 2-30 characters\n- Lowercase letters, numbers, and underscores only\n\nValue requirements:\n- Valid UTF-8 string\n- Maximum 200 characters\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","description":"Organization ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2OrganizationsOrganizationIdUpdateMetadata"}}],"responses":{"200":{"description":"An organization","schema":{"type":"object","properties":{"organization":{"$ref":"#/definitions/Organization"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["organizations"],"operationId":"putV2OrganizationsOrganizationIdUpdateMetadata"}},"/v2/organizations/{organization_id}/activities":{"get":{"summary":"List organization activities","description":"Returns a collection of activities (10-minute time blocks) for the given organization.\n\nResults can be filtered by user, task, project, and time range (time_slot[start], time_slot[stop]).\n\nFor aggregated daily data, use the daily_activities endpoint instead.\n\nNote: Data may be delayed up to 20 minutes.\nNote: Date range limit is 7 days. Earliest date is 6 months ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"global_todo_ids","description":"List of global todo IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false},{"in":"query","name":"time_zone","description":"The time zone name for the activity","type":"string","required":false}],"responses":{"200":{"description":"A list of activities","schema":{"type":"object","properties":{"activities":{"type":"array","items":{"$ref":"#/definitions/Activity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2OrganizationsOrganizationIdActivities"}},"/v2/organizations/{organization_id}/activities/updates":{"get":{"summary":"List organization activities updates","description":"Returns activities that were updated within the given time range. Useful for syncing changes.\n\nResults can be filtered by updated[start]/[stop], user_ids[], task_ids[], global_todo_ids[], and project_ids[].\n\nNote: Data may be delayed up to 20 minutes. Date range limit is 7 days. Earliest date is 45 days ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"updated[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"updated[stop]","description":"Stop time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"global_todo_ids","description":"List of global todo IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of activities","schema":{"type":"object","properties":{"activities":{"type":"array","items":{"$ref":"#/definitions/Activity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2OrganizationsOrganizationIdActivitiesUpdates"}},"/v2/organizations/{organization_id}/app_and_url_tracking_settings":{"get":{"summary":"List member Track Apps \u0026 URLs settings","description":"Returns the Track Apps \u0026 URLs setting for the organization's members.\n\nResults can be filtered to specific members with `user_ids`. When no filter is given,\nall members are returned.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of member Track Apps \u0026 URLs settings","schema":{"type":"object","properties":{"app_and_url_tracking_settings":{"type":"array","items":{"$ref":"#/definitions/AppAndUrlTrackingSetting"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["app_and_url_tracking_settings"],"operationId":"getV2OrganizationsOrganizationIdAppAndUrlTrackingSettings"},"put":{"summary":"Update member Track Apps \u0026 URLs settings","description":"Sets the Track Apps \u0026 URLs setting for the organization's members.\n\nAllowed values: `off`, `apps`, `apps_and_urls`. Available only to organizations whose plan\nincludes Apps \u0026 URLs tracking.\n\nProvide `user_ids` to update specific members. To change the organization-wide default\ninstead — which cascades to every current and future member — set `apply_to_all_members`\nto `true` and omit `user_ids`. The organization-wide change is cautionary and irreversible\nin bulk: the response reports `scope: \"global\"`, and for large organizations it is applied\nin the background.\n\n`user_ids` and `apply_to_all_members` are mutually exclusive, and exactly one of them must\nbe given (this prevents an accidental org-wide change when filters are omitted). When\ntargeting `user_ids`, omit `apply_to_all_members` entirely — sending it as `false` is\nrejected.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"putV2OrganizationsOrganizationIdAppAndUrlTrackingSettings","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2OrganizationsOrganizationIdAppAndUrlTrackingSettings"}}],"responses":{"200":{"description":"Update result","schema":{"type":"object","properties":{"app_and_url_tracking_setting":{"$ref":"#/definitions/AppAndUrlTrackingSetting"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["app_and_url_tracking_settings"],"operationId":"putV2OrganizationsOrganizationIdAppAndUrlTrackingSettings"}},"/v2/organizations/{organization_id}/attendance_schedules":{"get":{"summary":"List organization attendance schedules","description":"Returns a collection of attendance schedules (expected work shifts) for the given organization.\n\nUse date[start] and date[stop] to filter schedules that cover the specified date range. Repeating schedules are included if any occurrence falls within the range.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of attendance schedules","schema":{"type":"object","properties":{"attendance_schedules":{"type":"array","items":{"$ref":"#/definitions/AttendanceSchedule"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["attendance_schedules"],"operationId":"getV2OrganizationsOrganizationIdAttendanceSchedules"},"post":{"summary":"Create attendance schedule","description":"Creates an expected work shift for a user.\n\nReturns the created attendance schedule.\n\nFor repeating schedules, specify repeat_schedule (weekly/bi_weekly) and weekdays. Use repeat_until to set an end date. Use excluded_dates to skip specific dates.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdAttendanceSchedules","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdAttendanceSchedules"}}],"responses":{"200":{"description":"attendance schedule created","schema":{"type":"object","properties":{"attendance_schedule":{"$ref":"#/definitions/AttendanceSchedule"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["attendance_schedules"],"operationId":"postV2OrganizationsOrganizationIdAttendanceSchedules"}},"/v2/organizations/{organization_id}/attendance_shifts":{"get":{"summary":"List organization attendance shifts","description":"Returns actual work shifts (clock-in/clock-out records) for the given organization.\n\nUse date[start] and date[stop] to filter shifts that fall within the specified date range.\n\nNote: The maximum allowed difference between date[start] and date[stop] is 31 days.\nData is only available within organization’s retention period.\nIf date[start] falls outside this window, the request will fail.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","attendance_schedules"]},"required":false}],"responses":{"200":{"description":"A list of attendance shifts","schema":{"type":"object","properties":{"attendance_shifts":{"type":"array","items":{"$ref":"#/definitions/AttendanceShift"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["attendance_shifts"],"operationId":"getV2OrganizationsOrganizationIdAttendanceShifts"}},"/v2/organizations/{organization_id}/audit_log_entries":{"get":{"summary":"List organization audit log entries","description":"Returns a collection of audit log entries for the given organization.\n\nRequires the organization to be on an Enterprise plan.\nRequires Owner or Organization Manager role (with view others data permission).\nPayment-scoped entries are visible only to Owners and Managers with the\nmanage billing permission.\n\nResults can be filtered by created[start]/[stop], event_action, record_type,\nsubject_user_id, and ip.\n\nDate range limit is 7 days. To walk a longer history,\nslide the `created[start]`/`created[stop]` window across the retention range.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"event_action","description":"Filter by event action","type":"string","required":false},{"in":"query","name":"record_type","description":"Filter by audited record type","type":"string","required":false},{"in":"query","name":"subject_user_id","description":"Filter by subject user ID","type":"integer","format":"int32","required":false},{"in":"query","name":"ip","description":"Filter by the IP recorded on the audit row","type":"string","required":false},{"in":"query","name":"include_removed_members","description":"Include rows whose subject user is a removed member","type":"boolean","default":false,"required":false},{"in":"query","name":"include_archived_projects","description":"Include rows for archived projects","type":"boolean","default":false,"required":false}],"responses":{"200":{"description":"A list of audit log entries","schema":{"type":"object","properties":{"organization_audit_log_entries":{"type":"array","items":{"$ref":"#/definitions/OrganizationAuditLogEntry"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["audit_log_entries"],"operationId":"getV2OrganizationsOrganizationIdAuditLogEntries"}},"/v2/organizations/{organization_id}/budget_histories":{"get":{"summary":"List organization budget histories","description":"Returns budget configuration history (changes to budget settings over time) for the given organization.\n\nThe project_ids and client_ids filters are processed as a complete set.\n\n- If project_ids 1,2,3 and client_ids 4,5,6 are provided then all budget histories for those\nproject and clients will be returned.\n- If only project_ids 1,2,3 (no client_ids filter) are provided then only budget histories for\nthose projects will be returned (no client budgets at all).\n- If only client_ids 1,2,3 (no project_ids filter) are provided then only budget histories for\nthose clients will be returned (no project budgets at all).\n\nFurther resource may be specified to restrict only returning budget histories for either projects\nor clients.\nThe resource filter is combined with the project_ids/client_ids filters thus\n- If only project_ids is provided and resource = 'client' then no records will be returned\n\nThe start_date filters only apply to the starting date of the start_date of the budget history records.\nThus to fetch only budget histories for this month for all projects specify this filter\n- resource=project and start_date[start]=2026-09-01\n\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"client_ids","description":"List of client IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"resource","description":"Only return budgets for this resource type","type":"string","enum":["project","client"],"required":false},{"in":"query","name":"start_date[start]","description":"Include budget histories with a start date on or after this date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"start_date[stop]","description":"Include budget histories with a start date on or before this date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["clients","projects"]},"required":false}],"responses":{"200":{"description":"A list of budget histories","schema":{"type":"object","properties":{"budget_histories":{"type":"array","items":{"$ref":"#/definitions/BudgetHistory"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["budgets"],"operationId":"getV2OrganizationsOrganizationIdBudgetHistories"}},"/v2/organizations/{organization_id}/client_invoices":{"get":{"summary":"List organization client invoices","description":"Returns invoices sent to clients for the given organization.\n\nResults can be filtered by client_ids[], issue_date[start]/[stop], and status. Use include_line_items=true to include invoice line items.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"client_ids","description":"List of client IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"issue_date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"issue_date[stop]","description":"Stop date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"status","description":"Invoice status","type":"string","enum":["draft","open","closed"],"required":false},{"in":"query","name":"include_line_items","description":"Include invoice line items","type":"boolean","default":false,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","clients","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of client invoices","schema":{"type":"object","properties":{"client_invoices":{"type":"array","items":{"$ref":"#/definitions/ClientInvoice"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["client_invoices"],"operationId":"getV2OrganizationsOrganizationIdClientInvoices"}},"/v2/organizations/{organization_id}/clients":{"get":{"summary":"List organization clients","description":"Returns a collection of clients for the given organization.\n\nResults can be filtered by status.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"status","description":"Client status","type":"string","default":"active","enum":["active","archived","all"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["projects"]},"required":false}],"responses":{"200":{"description":"A list of clients","schema":{"type":"object","properties":{"clients":{"type":"array","items":{"$ref":"#/definitions/Client"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["clients"],"operationId":"getV2OrganizationsOrganizationIdClients"},"post":{"summary":"Create client","description":"Creates a new client.\n\nReturns the created client.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdClients"}}],"responses":{"200":{"description":"A client","schema":{"type":"object","properties":{"client":{"$ref":"#/definitions/Client"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["clients"],"operationId":"postV2OrganizationsOrganizationIdClients"}},"/v2/organizations/{organization_id}/activities/daily":{"get":{"summary":"List organization daily activities","description":"Returns daily aggregated time tracking data for the given organization.\n\nResults can be filtered by user_ids[], task_ids[], project_ids[], and date[start]/[stop]. Data is aggregated by organization timezone date.\n\nNote: Date range limit is 31 days. Earliest date is 3 years ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of daily activities","schema":{"type":"object","properties":{"daily_activities":{"type":"array","items":{"$ref":"#/definitions/DailyActivity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2OrganizationsOrganizationIdActivitiesDaily"}},"/v2/organizations/{organization_id}/activities/daily/updates":{"get":{"summary":"List organization daily activities updates","description":"Returns daily activities that were modified within the specified time range. Useful for syncing changes.\n\nUse updated[start] and updated[stop] to specify the modification time range. Results can also be filtered by user_ids[], task_ids[], and project_ids[].\n\nNote: Updated time range limit is 31 days. Only returns activities from the last month.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"updated[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"updated[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of daily activities","schema":{"type":"object","properties":{"daily_activities":{"type":"array","items":{"$ref":"#/definitions/DailyActivity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2OrganizationsOrganizationIdActivitiesDailyUpdates"}},"/v2/organizations/{organization_id}/tool_usages/daily":{"get":{"summary":"List organization daily tool usages","description":"Returns daily aggregated time spent using productivity tools (apps and websites categorized by Hubstaff).\n\nResults can be filtered by user_ids[], task_ids[], project_ids[], tool_type, and date[start]/[stop].\n\nRequires Owner or Organization Manager role (with view others data permission).\n\nNote: Date range limit is 14 days. Earliest date is 1 month ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"tool_type","description":"Filter by tool type (application or url)","type":"string","enum":["application","url"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of daily tool usages","schema":{"type":"object","properties":{"daily_tool_usages":{"type":"array","items":{"$ref":"#/definitions/DailyToolUsage"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tool_usages"],"operationId":"getV2OrganizationsOrganizationIdToolUsagesDaily"}},"/v2/organizations/{organization_id}/global_todos":{"get":{"summary":"List organization global todos","description":"Returns a collection of global to-dos for the given organization.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["project_ids"]},"required":false}],"responses":{"200":{"description":"A list of to-dos","schema":{"type":"object","properties":{"global_todos":{"type":"array","items":{"$ref":"#/definitions/GlobalTodo"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["global_todos"],"operationId":"getV2OrganizationsOrganizationIdGlobalTodos"},"post":{"summary":"Create global to-do","description":"Creates a global to-do.\n\nReturns the created global to-do.\n\nGlobal to-dos can be added to multiple projects. All members of those projects can track time to them, and they cannot be marked as complete.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdGlobalTodos"}}],"responses":{"201":{"description":"A global to-do","schema":{"type":"object","properties":{"global_todo":{"$ref":"#/definitions/GlobalTodo"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["global_todos"],"operationId":"postV2OrganizationsOrganizationIdGlobalTodos"}},"/v2/organizations/{organization_id}/global_todos/{id}":{"put":{"summary":"Update global to-do","description":"Updates a global to-do.\n\nReturns the updated global to-do.\n\nGlobal to-dos can be added to multiple projects. All members of those projects can track time to them, and they cannot be marked as complete.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"path","name":"id","description":"Global to-do ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2OrganizationsOrganizationIdGlobalTodosId"}}],"responses":{"200":{"description":"A global to-do","schema":{"type":"object","properties":{"global_todo":{"$ref":"#/definitions/GlobalTodo"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["global_todos"],"operationId":"putV2OrganizationsOrganizationIdGlobalTodosId"},"delete":{"summary":"Delete global to-do","description":"Deletes a global to-do.\n\nNote: This action is irreversible. Deleted global to-dos cannot be combined and reported with any new global to-dos, even if they have the same name.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"path","name":"id","description":"Global to-do ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Global to-do deleted","schema":{"type":"object","properties":{"global_todo":{"$ref":"#/definitions/GlobalTodo"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["global_todos"],"operationId":"deleteV2OrganizationsOrganizationIdGlobalTodosId"}},"/v2/organizations/{organization_id}/holidays":{"get":{"summary":"List organization holidays","description":"Returns a collection of holidays for the given organization.\n\nResults can be filtered by created[start]/[stop] and date[start]/[stop].\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":false},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":false}],"responses":{"200":{"description":"A list of holidays","schema":{"type":"object","properties":{"holidays":{"type":"array","items":{"$ref":"#/definitions/Holiday"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["holidays"],"operationId":"getV2OrganizationsOrganizationIdHolidays"}},"/v2/organizations/{organization_id}/insights/activity":{"get":{"summary":"List activity","description":"Returns active and input-tracked seconds per date, user, and project. Requires the Insights add-on and organization owner or manager access. Rate limited to 120 requests per hour, separately from the global API limit.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"team_ids","description":"List of team IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"remote_vs_office","description":"Add a per-row location field (remote | on_site | unknown)","type":"boolean","required":false},{"in":"query","name":"time_zone","description":"Timezone for date bucketing (defaults to org timezone)","type":"string","required":false},{"in":"query","name":"cursor","description":"Opaque pagination cursor from the previous response","type":"string","required":false},{"in":"query","name":"page_limit","description":"Page size","type":"integer","format":"int32","default":100,"minimum":1,"maximum":500,"required":false}],"responses":{"200":{"description":"A list of activity rows","schema":{"type":"object","properties":{"hubstaff_public_v2_entities_insights_activities":{"type":"array","items":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Insights_Activity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["insights"],"operationId":"getV2OrganizationsOrganizationIdInsightsActivity"}},"/v2/organizations/{organization_id}/insights/focus_time":{"get":{"summary":"List focus time","description":"Returns focus session totals and tracked seconds per date, user, and project.\nRequires the Insights add-on and organization owner or manager access.\nRate limited to 120 requests per hour, separately from the global API limit.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"team_ids","description":"List of team IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"remote_vs_office","description":"Add a per-row location field (remote | on_site | unknown)","type":"boolean","required":false},{"in":"query","name":"time_zone","description":"Timezone for date bucketing (defaults to org timezone)","type":"string","required":false},{"in":"query","name":"cursor","description":"Opaque pagination cursor from the previous response","type":"string","required":false},{"in":"query","name":"page_limit","description":"Page size","type":"integer","format":"int32","default":100,"minimum":1,"maximum":500,"required":false}],"responses":{"200":{"description":"A list of focus time rows","schema":{"type":"object","properties":{"hubstaff_public_v2_entities_insights_focus_times":{"type":"array","items":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Insights_FocusTime"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["insights"],"operationId":"getV2OrganizationsOrganizationIdInsightsFocusTime"}},"/v2/organizations/{organization_id}/insights/idle_time":{"get":{"summary":"List idle time","description":"Returns idle and worked seconds per date, user, and project. Requires the Insights add-on and organization owner or manager access. Rate limited to 120 requests per hour, separately from the global API limit.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"team_ids","description":"List of team IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"remote_vs_office","description":"Add a per-row location field (remote | on_site | unknown)","type":"boolean","required":false},{"in":"query","name":"time_zone","description":"Timezone for date bucketing (defaults to org timezone)","type":"string","required":false},{"in":"query","name":"cursor","description":"Opaque pagination cursor from the previous response","type":"string","required":false},{"in":"query","name":"page_limit","description":"Page size","type":"integer","format":"int32","default":100,"minimum":1,"maximum":500,"required":false}],"responses":{"200":{"description":"A list of idle time rows","schema":{"type":"object","properties":{"hubstaff_public_v2_entities_insights_idle_times":{"type":"array","items":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Insights_IdleTime"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["insights"],"operationId":"getV2OrganizationsOrganizationIdInsightsIdleTime"}},"/v2/organizations/{organization_id}/insights/meetings":{"get":{"summary":"List meetings","description":"Returns meeting time, meeting count, and cost per date and user. Empty when no\ncalendar integration has synced. Requires the Insights add-on and organization owner or manager access.\nRate limited to 120 requests per hour, separately from the global API limit.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"team_ids","description":"List of team IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"remote_vs_office","description":"Add a per-row location field (remote | on_site | unknown)","type":"boolean","required":false},{"in":"query","name":"time_zone","description":"Timezone for date bucketing (defaults to org timezone)","type":"string","required":false},{"in":"query","name":"cursor","description":"Opaque pagination cursor from the previous response","type":"string","required":false},{"in":"query","name":"page_limit","description":"Page size","type":"integer","format":"int32","default":100,"minimum":1,"maximum":500,"required":false}],"responses":{"200":{"description":"A list of meetings rows","schema":{"type":"object","properties":{"hubstaff_public_v2_entities_insights_meetings":{"type":"array","items":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Insights_Meetings"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["insights"],"operationId":"getV2OrganizationsOrganizationIdInsightsMeetings"}},"/v2/organizations/{organization_id}/insights/network_locations":{"get":{"summary":"List network locations","description":"Returns a paginated list of network-defined locations for the given organization.\nLocations classify network environments as \"office\" or \"remote\" for Insights tracking.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"location_type","description":"Filter by location type","type":"string","enum":["on_site","remote"],"required":false}],"responses":{"200":{"description":"A list of network locations","schema":{"type":"object","properties":{"network_locations":{"type":"array","items":{"$ref":"#/definitions/NetworkLocation"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["network_locations"],"operationId":"getV2OrganizationsOrganizationIdInsightsNetworkLocations"},"post":{"summary":"Create network location","description":"Creates a new on_site or remote network location for the organization.\n\non_site locations identify office networks (by IP range or MAC address).\nRemote locations identify non-office networks.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdInsightsNetworkLocations","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdInsightsNetworkLocations"}}],"responses":{"201":{"description":"Create network location","schema":{"type":"object","properties":{"network_location":{"$ref":"#/definitions/NetworkLocation"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["network_locations"],"operationId":"postV2OrganizationsOrganizationIdInsightsNetworkLocations"}},"/v2/organizations/{organization_id}/insights/network_locations/{location_id}":{"get":{"summary":"Get network location","description":"Returns a single network location by ID.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"path","name":"location_id","description":"Network location ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get network location","schema":{"type":"object","properties":{"network_location":{"$ref":"#/definitions/NetworkLocation"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["network_locations"],"operationId":"getV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId"},"patch":{"summary":"Update network location","description":"Updates name, IP addresses, and/or MAC addresses for a network location.\nOnly provided fields are updated; omitted fields keep their current values.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"path","name":"location_id","description":"Network location ID","type":"integer","format":"int32","required":true},{"name":"patchV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId","in":"body","required":true,"schema":{"$ref":"#/definitions/patchV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId"}}],"responses":{"200":{"description":"204 No Content on success","schema":{"type":"object","properties":{"network_location":{"$ref":"#/definitions/NetworkLocation"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["network_locations"],"operationId":"patchV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId"},"delete":{"summary":"Delete network location","description":"Permanently deletes a network location.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"path","name":"location_id","description":"Network location ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"204 No Content on success"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["network_locations"],"operationId":"deleteV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId"}},"/v2/organizations/{organization_id}/insights/smart_notification_rules":{"get":{"summary":"List smart notification rules","description":"Returns a collection of smart notification rules for the given organization.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of smart notification rules","schema":{"type":"object","properties":{"smart_notification_rules":{"type":"array","items":{"$ref":"#/definitions/SmartNotificationRule"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["smart_notification_rules"],"operationId":"getV2OrganizationsOrganizationIdInsightsSmartNotificationRules"},"post":{"summary":"Create smart notification rule","description":"Creates a new smart notification rule.\n\nReturns the created smart notification rule. New rules are enabled by default.\n\nNote: The `metric_type` of type `time_spent_in_tool` (used to measure time spent in an app/url) is not yet supported.\n\nTarget field options:\n- To target all members: `{\"all_members\": true}`\n- To target specific teams: `{\"team_ids\": [team_id]}`\n- To target specific members: `{\"user_ids\": [user_id_1, user_id_2]}`\n- You can combine `team_ids` and `user_ids`\n\nRecipients field options:\n- To notify by role: `{\"roles\": [\"owner\", \"manager\"]}`\n- To notify specific members: `{\"user_ids\": [user_id_1, user_id_2]}`\n- You can combine `roles` and `user_ids`\n- Only owners, managers, and team leads can be recipients\n\nDeliver_by field:\n- The value 'insights' is always included (notifications appear on the insights page)\n- You can also include 'email' and 'slack'\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdInsightsSmartNotificationRules"}}],"responses":{"201":{"description":"A smart notification rule","schema":{"type":"object","properties":{"smart_notification_rule":{"$ref":"#/definitions/SmartNotificationRule"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["smart_notification_rules"],"operationId":"postV2OrganizationsOrganizationIdInsightsSmartNotificationRules"}},"/v2/organizations/{organization_id}/insights/smart_notifications":{"get":{"summary":"List smart notifications","description":"Returns the smart notification ocurrences for the given organization. By default, the API returns only the occurrences for which the API caller (current user) is a recipient of the notification.\n\nStart and stop dates are required, the remaining parameters are optional.\n\nWhen using the `user_ids` or `team_ids` filter, the API will filter the results based on the users who triggered the notification, not the users who will receive the notification.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"team_ids","description":"List of team IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"rule_id","description":"ID of the smart notification rule to filter by","type":"integer","format":"int32","required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of smart notifications ocurrences","schema":{"type":"object","properties":{"smart_notifications":{"type":"array","items":{"$ref":"#/definitions/SmartNotification"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["smart_notifications"],"operationId":"getV2OrganizationsOrganizationIdInsightsSmartNotifications"}},"/v2/organizations/{organization_id}/insights/tool_categories":{"get":{"summary":"List tool categories","description":"Returns the list of available category names for tool classifications.\n\nCategories are global and shared across all organizations.\nUse the returned names in the `category` field when updating tool classifications\nvia PATCH /organizations/:id/insights/tool_classifications.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"List tool categories"}},"tags":["tool_classifications"],"operationId":"getV2OrganizationsOrganizationIdInsightsToolCategories"}},"/v2/organizations/{organization_id}/insights/tool_classifications":{"get":{"summary":"List tool classifications","description":"Returns a paginated list of Applications or URL sites (one tool_type per request) with their\nproductivity and category classifications for the given organization.\n\ntool_type is required. Results can be further filtered by name (search), productivity, and job_type.\nUse GET /organizations/:id/job_types to discover valid job_type values for this organization.\n\nPagination is id-based within the chosen tool_type: to get the next page, pass\npagination.next_page_start_id from the previous response as page_start_id.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"tool_type","description":"Tool type to list: application or url","type":"string","enum":["application","url"],"required":true},{"in":"query","name":"name","description":"Filter by tool name (case-insensitive substring match)","type":"string","required":false},{"in":"query","name":"job_type","description":"Filter by job type (case-insensitive, must match a valid occupation).","type":"string","required":false},{"in":"query","name":"productivity","description":"Filter by productivity classification","type":"string","enum":["core","non_core","unproductive"],"required":false}],"responses":{"200":{"description":"A list of tool classifications","schema":{"type":"object","properties":{"tool_classifications":{"type":"array","items":{"$ref":"#/definitions/ToolClassification"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tool_classifications"],"operationId":"getV2OrganizationsOrganizationIdInsightsToolClassifications"},"patch":{"summary":"Update tool classifications","description":"Batch updates productivity classifications and categories for up to 100 tools.\n\nEach item must include id and tool_type. Provide productivity and/or category to update.\nUse job_type to scope a productivity change to a specific role (see GET /organizations/:id/job_types).\ncategory and job_type are mutually exclusive within an item: category applies globally, so it can\nonly be set when job_type is omitted.\nChanges are applied atomically — if any item fails validation, no changes are saved.\nOn success, returns 204 No Content.\n\nNote: productivity changes only affect future tool usage data, not historical records.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"patchV2OrganizationsOrganizationIdInsightsToolClassifications","in":"body","required":true,"schema":{"$ref":"#/definitions/patchV2OrganizationsOrganizationIdInsightsToolClassifications"}}],"responses":{"200":{"description":"204 No Content on success","schema":{"type":"object","properties":{"tool_classification":{"$ref":"#/definitions/ToolClassification"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tool_classifications"],"operationId":"patchV2OrganizationsOrganizationIdInsightsToolClassifications"}},"/v2/organizations/{organization_id}/insights/unusual_activities":{"get":{"summary":"List unusual activities","description":"Returns a collection of unusual activities (anomalous behavior patterns) for the given organization.\n\nResults can be filtered by user_ids[], time_slot[start]/[stop], confidence_level, and unusual_activity_type.\n\nNote: Unusual activities can be removed automatically by the system (e.g. after silent app member merging).\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false},{"in":"query","name":"include_secondary_activities","description":"DEPRECATED: Does nothing, all unusual activity is shown by default","type":"boolean","default":false,"required":false},{"in":"query","name":"confidence_level","description":"Filter by confidence level","type":"string","enum":["high","medium","low"],"required":false},{"in":"query","name":"unusual_activity_type","description":"Filter by unusual activity type","type":"string","enum":["consistent_persistent_activity","consistent_variable_activity","unusual_high_mouse_activity","unusual_high_keyboard_activity","long_period_of_single_mouse_activity","long_period_of_single_keyboard_activity","breakless_work","sustained_high_focus_time","automation_like_activity","suspicious_activity"],"required":false}],"responses":{"200":{"description":"A list of unusual activity","schema":{"type":"object","properties":{"unusual_activities":{"type":"array","items":{"$ref":"#/definitions/UnusualActivity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["unusual_activities"],"operationId":"getV2OrganizationsOrganizationIdInsightsUnusualActivities"}},"/v2/organizations/{organization_id}/insights/work_time_classification":{"get":{"summary":"List work time classification","description":"Returns tracked seconds split by productivity (core, non-core, unproductive) per date,\nuser, and project. Requires the Insights add-on and organization owner or manager access.\nRate limited to 120 requests per hour, separately from the global API limit.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"team_ids","description":"List of team IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"remote_vs_office","description":"Add a per-row location field (remote | on_site | unknown)","type":"boolean","required":false},{"in":"query","name":"time_zone","description":"Timezone for date bucketing (defaults to org timezone)","type":"string","required":false},{"in":"query","name":"cursor","description":"Opaque pagination cursor from the previous response","type":"string","required":false},{"in":"query","name":"page_limit","description":"Page size","type":"integer","format":"int32","default":100,"minimum":1,"maximum":500,"required":false}],"responses":{"200":{"description":"A list of work time classification rows","schema":{"type":"object","properties":{"hubstaff_public_v2_entities_insights_work_time_classifications":{"type":"array","items":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Insights_WorkTimeClassification"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["insights"],"operationId":"getV2OrganizationsOrganizationIdInsightsWorkTimeClassification"}},"/v2/organizations/{organization_id}/integrations":{"get":{"summary":"List organization integrations","description":"Returns a collection of integrations for the given organization.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of integrations","schema":{"type":"object","properties":{"integrations":{"type":"array","items":{"$ref":"#/definitions/Integration"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["integrations"],"operationId":"getV2OrganizationsOrganizationIdIntegrations"}},"/v2/organizations/{organization_id}/invite_links":{"get":{"summary":"List organization invite links","description":"Returns a collection of invite links for the given organization, including disabled and expired ones.\n\nOnly available to organization owners and managers with the invite members permission.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of invite links","schema":{"type":"object","properties":{"invite_links":{"type":"array","items":{"$ref":"#/definitions/InviteLink"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invite_links"],"operationId":"getV2OrganizationsOrganizationIdInviteLinks"},"post":{"summary":"Create invite link","description":"Creates a new invite link. Anyone with the returned url can join the organization.\n\nAt least one project or team must be assigned to the link.\n\nOnly available to organization owners and managers with the invite members permission.\n\nAvailable roles:\n- project_user - Invited as a project user\n- project_viewer - Invited as a project viewer\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdInviteLinks","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdInviteLinks"}}],"responses":{"201":{"description":"An invite link","schema":{"type":"object","properties":{"invite_link":{"$ref":"#/definitions/InviteLink"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invite_links"],"operationId":"postV2OrganizationsOrganizationIdInviteLinks"}},"/v2/organizations/{organization_id}/invites":{"get":{"summary":"List organization invites","description":"Returns a collection of invites for the given organization.\n\nResults can be filtered by email and status.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"email","description":"An email to search for a pending invitation by","type":"string","required":false},{"in":"query","name":"status","description":"Filter invites by status","type":"string","default":"pending","enum":["all","pending","accepted","expired"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false}],"responses":{"200":{"description":"A list of invites","schema":{"type":"object","properties":{"invites":{"type":"array","items":{"$ref":"#/definitions/Invite"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invites"],"operationId":"getV2OrganizationsOrganizationIdInvites"},"post":{"summary":"Create invite","description":"Creates a new invite.\n\nReturns the created invite.\n\nNote: If there is an account for the email in Hubstaff, the invite will be auto accepted.\nNote: There is a rate limit on how many invites you may create.\n\nAvailable roles:\n- organization_manager - Invited as an organization manager\n- project_manager - Invited as a project manager\n- project_user - Invited as a project user\n- project_viewer - Invited as a project viewer\n\nIf no project_ids are set, any project_* role will default to project_viewer (no projects assigned).\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdInvites","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdInvites"}}],"responses":{"201":{"description":"An invite","schema":{"type":"object","properties":{"invite":{"$ref":"#/definitions/Invite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invites"],"operationId":"postV2OrganizationsOrganizationIdInvites"}},"/v2/organizations/{organization_id}/invites/bulk":{"post":{"summary":"Bulk invite users","description":"Creates multiple invites at once (max 50 per request).\n\nReturns a summary with counts of successful, failed, and rate-limited invites, along with detailed results.\n\nInvites are processed sequentially. Individual failures don't stop remaining invites. If rate limit is exceeded, processing stops and remaining invites are marked as rate-limited.\n\nAvailable roles:\n- organization_manager - Organization manager with manager access to specified projects\n- project_manager - Organization user with manager access to specified projects\n- project_user - Organization user with user access to specified projects\n- project_viewer - Organization user with viewer access to specified projects\n\nCommon failure reasons:\n- validation_error - Invalid email format or other validation issues\n- create_action_error - Business rule violations (already member, plan limits, blacklisted user)\n- rate_limited - Rate limit exceeded during processing\n- system_error - Unexpected system errors\n\nNote: Invalid project IDs are automatically filtered out. Emails are automatically lowercased.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdInvitesBulk","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdInvitesBulk"}}],"responses":{"200":{"description":"Bulk invite results"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["invites"],"operationId":"postV2OrganizationsOrganizationIdInvitesBulk"}},"/v2/organizations/{organization_id}/job_sites":{"get":{"summary":"List organization job sites","description":"Returns a collection of job sites (geofenced locations) for the organization.\n\nResults can be filtered by created[start]/[stop].\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":false},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false}],"responses":{"200":{"description":"A list of job sites","schema":{"type":"object","properties":{"job_sites":{"type":"array","items":{"$ref":"#/definitions/JobSite"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_sites"],"operationId":"getV2OrganizationsOrganizationIdJobSites"},"post":{"summary":"Create job site","description":"Creates a new job site.\n\nReturns the created job site.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdJobSites"}}],"responses":{"201":{"description":"A job site","schema":{"type":"object","properties":{"job_site":{"$ref":"#/definitions/JobSite"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_sites"],"operationId":"postV2OrganizationsOrganizationIdJobSites"}},"/v2/organizations/{organization_id}/job_site_visits":{"get":{"summary":"List organization job site visits","description":"Returns a collection of job site visits (geofence entry/exit records) for the given organization.\n\nResults can be filtered by user_ids[] and enter[start]/[stop].\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"enter[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"enter[stop]","description":"Stop time (ISO 8601, exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","job_sites"]},"required":false}],"responses":{"200":{"description":"A list of job site visits","schema":{"type":"object","properties":{"job_site_visits":{"type":"array","items":{"$ref":"#/definitions/JobSiteVisit"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_site_visits"],"operationId":"getV2OrganizationsOrganizationIdJobSiteVisits"}},"/v2/organizations/{organization_id}/job_types":{"get":{"summary":"List job types","description":"Returns the list of job type names available for the given organization.\n\nJob types are used to scope productivity classifications per role — for example,\n\"LinkedIn\" might be core for HR but non-core for Engineering.\n\nThe list is filtered by the organization's industry. Organizations with no industry\nset return a generic set of job types.\n\nRequires Owner or Organization Manager role.\nRequires the Insights add-on.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"List job types"}},"tags":["job_types"],"operationId":"getV2OrganizationsOrganizationIdJobTypes"}},"/v2/organizations/{organization_id}/last_activities":{"get":{"summary":"List organization last activities","description":"Returns the most recent activity for each member in the organization.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"include_removed","description":"Include users that were removed","type":"boolean","default":false,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"Last activities for members","schema":{"type":"object","properties":{"last_activities":{"type":"array","items":{"$ref":"#/definitions/LastActivity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2OrganizationsOrganizationIdLastActivities"}},"/v2/organizations/{organization_id}/limit_histories":{"get":{"summary":"List organization limit histories","description":"Returns a collection of limit histories (tracking limit configuration changes) for the given organization.\n\nResults can be filtered by user_ids[], date[start], and limit_type.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"limit_type","description":"The type of limit history","type":"string","enum":["daily","weekly","expected_per_week"],"required":false}],"responses":{"200":{"description":"A list of limit histories","schema":{"type":"object","properties":{"limit_histories":{"type":"array","items":{"$ref":"#/definitions/LimitHistory"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["limits"],"operationId":"getV2OrganizationsOrganizationIdLimitHistories"}},"/v2/organizations/{organization_id}/locations":{"get":{"summary":"List organization locations","description":"Returns a collection of locations (GPS coordinates) for the given organization.\n\nResults can be filtered by time_slot[start]/[stop].\n\nNote: Date range limit is 7 days.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false}],"responses":{"200":{"description":"A list of locations","schema":{"type":"object","properties":{"locations":{"type":"array","items":{"$ref":"#/definitions/Location"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["locations"],"operationId":"getV2OrganizationsOrganizationIdLocations"}},"/v2/organizations/{organization_id}/members":{"get":{"summary":"List organization members","description":"Returns a collection of members for the given organization.\n\nResults can be filtered by search, user IDs, membership role, and date range.\n\n*trackable* - Whether the user can track time.  This is one of 3 values\n- *false* -- meaning tracking has been explicitly disabled for this user regardless of their role\n- *true* -- meaning they are allowed to track time\n- *viewer* -- meaning they are allowed to track time, however as they are only a project viewer (or no\n  memberships) they implicitly can not track on any project\n\n*membership_role* - The basic role in this organization\n- *owner* - An owner of the organization.  This member can do anything within the organization.\n- *manager* - An manager of the organization.  This member can do anything within the organization\n  except things to do with money. (payroll, invoicing, account billing)\n- *user* - (By project). A member of the organization where permissions are defined by their project memberships\n\n*effective_role* - represents an effective role that combines a member's organization role and their project roles\n- *organization_owner* - The member is an organization owner\n- *organization_manager* - The member is an organization manager\n- *project_manager* - The member is an organization user and a manager on all projects and teams\n- *project_user* - The member is an organization user and a user on all projects and teams\n- *project_viewer* - The member is an organization user and a viewer on all projects and teams\n- *by_project* - The member is an organization user and has mixed roles on their projects and team memberships (advanced in the web UI)\n- *unassigned* - The member has no assigned role and no project memberships (No role in the web UI)\n\n*profile* - The profile information for the user. Only organization owners and managers may see this information.\n- *custom_fields* - The custom fields, defined for organization, in format of \"key\": \"value\". The meaning\n   of keys is defined in organization.member_profile_fields.\n\n**Filtering by dates:**\n\nYou can filter members by when they were added to the organization using the `created_at` parameter:\n- Use `created_at[start]` to get members added on or after a specific date\n- Use `created_at[stop]` to get members added before a specific date\n- Use both to get members added within a date range\n\nYou can also filter by when membership was last updated using the `updated_at` parameter:\n- Use `updated_at[start]` to get members updated on or after a specific date\n- Use `updated_at[stop]` to get members updated before a specific date\n- Use both to get members updated within a date range\n\n\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"search[email]","description":"An email to search for members","type":"string","required":false},{"in":"query","name":"search[name]","description":"A name to search for members","type":"string","required":false},{"in":"query","name":"include_removed","description":"Include members that were removed from the organization","type":"boolean","default":false,"required":false},{"in":"query","name":"include_profile","description":"Include member profile information","type":"boolean","default":false,"required":false},{"in":"query","name":"include_projects","description":"Include project memberships for this member","type":"boolean","default":false,"required":false},{"in":"query","name":"project_statuses","description":"Filter projects by status when include_projects=true","type":"array","items":{"type":"string","enum":["active","archived","deleted"]},"required":false},{"in":"query","name":"include_limits","description":"Include member limits information","type":"boolean","default":false,"required":false},{"in":"query","name":"membership_roles","description":"Search by membership role","type":"array","items":{"type":"string","enum":["owner","manager","user","unassigned"]},"required":false},{"in":"query","name":"invite_link_id","description":"Filter members who joined via the given invite link","type":"integer","format":"int32","required":false},{"in":"query","name":"created_at[start]","description":"Start date for created_at filter (inclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[stop]","description":"End date for created_at filter (exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"updated_at[start]","description":"Start date for updated_at filter (inclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"updated_at[stop]","description":"End date for updated_at filter (exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false}],"responses":{"200":{"description":"A list of members","schema":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/definitions/OrganizationMember"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["members"],"operationId":"getV2OrganizationsOrganizationIdMembers"},"post":{"summary":"Create organization member","description":"Creates a new user and adds them to the organization as a member.\n\nReturns the created member.\n\nAvailable roles:\n- organization_manager - Organization manager\n- project_manager - Project manager\n- project_user - Project user\n- project_viewer - Project viewer\n\nAvailable pay periods:\n- none - Disables automatic payments\n- weekly - Pay users weekly\n- twice_per_month - Pay users twice a month\n- biweekly - Pay users bi-weekly\n- monthly - Pay users monthly\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdMembers","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdMembers"}}],"responses":{"201":{"description":"A member","schema":{"type":"object","properties":{"organization_member":{"$ref":"#/definitions/OrganizationMember"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["members"],"operationId":"postV2OrganizationsOrganizationIdMembers"}},"/v2/organizations/{organization_id}/notes":{"get":{"summary":"List organization notes","description":"Returns a collection of notes for the given organization.\n\nResults can be filtered by user_ids[], task_ids[], project_ids[], and time_slot[start]/[stop].\n\nNote: Date range limit is 31 days. Earliest date is 3 years ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of notes","schema":{"type":"object","properties":{"notes":{"type":"array","items":{"$ref":"#/definitions/Note"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["notes"],"operationId":"getV2OrganizationsOrganizationIdNotes"}},"/v2/organizations/{organization_id}/seats":{"get":{"summary":"Get organization seats","description":"Returns billing seat counters for the specified organization.\n\n- Paid seats are the total number of seats you are currently paying for.\n- Occupied is the total number of seats that are currently filled.\n- Open seats will be filled automatically when new members are added.\n  Any open seats will be removed automatically when a new billing cycle starts,\n  bringing down the number of paid seats to match the number of seats occupied.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Organization seats counters","schema":{"type":"object","properties":{"organization_seat":{"$ref":"#/definitions/OrganizationSeat"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["organizations"],"operationId":"getV2OrganizationsOrganizationIdSeats"}},"/v2/organizations/{organization_id}/overtime_policies":{"get":{"summary":"List organization overtime policies","description":"Returns a collection of overtime policies for the given organization.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"status","description":"Filter by lifecycle group: active (not past), archived (past), or all. Note the returned per-policy status may also be pending or expiring.","type":"string","default":"active","enum":["active","archived","all"],"required":false}],"responses":{"200":{"description":"A list of overtime policies","schema":{"type":"object","properties":{"overtime_policies":{"type":"array","items":{"$ref":"#/definitions/OvertimePolicy"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["overtime_policies"],"operationId":"getV2OrganizationsOrganizationIdOvertimePolicies"},"post":{"summary":"Create overtime policy","description":"Creates a new overtime policy for the given organization and assigns the given members.\n\n`threshold` is the number of hours worked per period (week for `weekly`, day for `daily`)\nbefore tracked time is considered overtime. `pay_rate_multiplier` is applied to the\nmember's pay rate after the threshold is reached.\n\nAt least one member (`user_ids`) is required, and every assigned member must have a pay\nrate set. `daily` policies require the flexible overtime feature.\n\nA member can only belong to one policy of a given type at a time. If any member in\n`user_ids` is already assigned to another active policy of the same type, the request\nfails unless `override` is `true`, in which case those members are moved into this policy.\n\nNotifications are enabled by default but go to no one unless `notification_role_ids`\nis provided.\n\nThe policy becomes effective at the start of the organization's next week (for `weekly`\npolicies) or the next day (for `daily` policies). Pass `starts_on` to schedule a later\nstart aligned to that boundary.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdOvertimePolicies"}}],"responses":{"201":{"description":"An overtime policy","schema":{"type":"object","properties":{"overtime_policy":{"$ref":"#/definitions/OvertimePolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["overtime_policies"],"operationId":"postV2OrganizationsOrganizationIdOvertimePolicies"}},"/v2/organizations/{organization_id}/passive_job_site_visits":{"get":{"summary":"List organization passive job site visits","description":"Returns a collection of passive job site visits (automatic location detections without active geofence triggers).\n\nResults can be filtered by user_ids[] and enter[start]/[stop].\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"enter[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"enter[stop]","description":"Stop time (ISO 8601, exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","job_sites"]},"required":false}],"responses":{"200":{"description":"A list of passive job site visits","schema":{"type":"object","properties":{"passive_job_site_visits":{"type":"array","items":{"$ref":"#/definitions/PassiveJobSiteVisit"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["job_site_visits"],"operationId":"getV2OrganizationsOrganizationIdPassiveJobSiteVisits"}},"/v2/organizations/{organization_id}/projects":{"get":{"summary":"List organization projects","description":"Returns a collection of projects for the given organization.\n\nResults can be filtered by status (active/archived/all) and project_ids[].\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"status","description":"Project status","type":"string","default":"active","enum":["active","archived","all"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["clients"]},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false}],"responses":{"200":{"description":"A list of projects","schema":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/definitions/Project"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["projects"],"operationId":"getV2OrganizationsOrganizationIdProjects"},"post":{"summary":"Create project","description":"Creates a new project.\n\nReturns the created project.\n\nOnly name is required. Members can optionally be added with roles: viewer, user, or manager.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdProjects"}}],"responses":{"201":{"description":"A project","schema":{"type":"object","properties":{"project":{"$ref":"#/definitions/Project"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["projects"],"operationId":"postV2OrganizationsOrganizationIdProjects"}},"/v2/organizations/{organization_id}/rates":{"get":{"summary":"List organization rates","description":"Returns a collection of rates (pay/bill rates) for the given organization.\n\nResults can be filtered by user_ids[], kind[], rate_type[], status, start_date, and end_date.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"kind","description":"Array of rate kinds (pay, bill)","type":"array","items":{"type":"string","enum":["pay","bill"]},"required":false},{"in":"query","name":"rate_type","description":"Array of rate types (hourly, fixed)","type":"array","items":{"type":"string","enum":["hourly","fixed"]},"required":false},{"in":"query","name":"status","description":"Rate status (current, past)","type":"string","enum":["current","past"],"required":false},{"in":"query","name":"start_date","description":"Start date filter","type":"string","format":"date-time","required":false},{"in":"query","name":"end_date","description":"End date filter","type":"string","format":"date-time","required":false},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false},{"in":"query","name":"fields","description":"List of fields to include in the response","type":"array","items":{"type":"string"},"collectionFormat":"brackets","required":false}],"responses":{"200":{"description":"A list of rates"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["rates"],"operationId":"getV2OrganizationsOrganizationIdRates"}},"/v2/organizations/{organization_id}/screenshots":{"get":{"summary":"List organization screenshots","description":"Returns a collection of screenshots for the given organization.\n\nResults can be filtered by user_ids[], project_ids[], and time_slot[start]/[stop].\n\nNote: Date range limit is 7 days. Earliest date is 6 months ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false}],"responses":{"200":{"description":"A list of screenshots","schema":{"type":"object","properties":{"screenshots":{"type":"array","items":{"$ref":"#/definitions/Screenshot"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["screenshots"],"operationId":"getV2OrganizationsOrganizationIdScreenshots"}},"/v2/organizations/{organization_id}/screenshots/{screenshot_id}":{"get":{"summary":"Get screenshot","description":"Returns the screenshot with the given ID.","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"path","name":"screenshot_id","description":"Screenshot ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Screenshot found","schema":{"type":"object","properties":{"screenshot":{"$ref":"#/definitions/Screenshot"}}}},"404":{"description":"Screenshot not found","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["screenshots"],"operationId":"getV2OrganizationsOrganizationIdScreenshotsScreenshotId"}},"/v2/organizations/{organization_id}/screenshot_settings":{"get":{"summary":"List member screenshot frequency settings","description":"Returns the screenshot frequency setting for the organization's members.\n\nResults can be filtered to specific members with `user_ids`. When no filter is given,\nall members are returned.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of member screenshot settings","schema":{"type":"object","properties":{"screenshot_settings":{"type":"array","items":{"$ref":"#/definitions/ScreenshotSetting"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["screenshot_settings"],"operationId":"getV2OrganizationsOrganizationIdScreenshotSettings"},"put":{"summary":"Update member screenshot frequency settings","description":"Sets the screenshot frequency for the organization's members.\n\nAllowed values depend on the plan: 0 (none) and 1, up to 3 with custom screenshot frequency,\nor up to 10 with the More Screenshots add-on. Values not permitted by the plan are rejected.\n\nProvide `user_ids` to update specific members. To change the organization-wide default\ninstead — which cascades to every current and future member — set `apply_to_all_members`\nto `true` and omit `user_ids`. The organization-wide change is cautionary: the response\nreports `scope: \"global\"`, and for large organizations it is applied in the background.\n\n`user_ids` and `apply_to_all_members` are mutually exclusive, and exactly one of them must\nbe given (this prevents an accidental org-wide change when filters are omitted).\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"putV2OrganizationsOrganizationIdScreenshotSettings","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2OrganizationsOrganizationIdScreenshotSettings"}}],"responses":{"200":{"description":"Update result","schema":{"type":"object","properties":{"screenshot_setting":{"$ref":"#/definitions/ScreenshotSetting"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["screenshot_settings"],"operationId":"putV2OrganizationsOrganizationIdScreenshotSettings"}},"/v2/organizations/{organization_id}/silent_app/ignored_user_matches":{"get":{"summary":"List ignored user matches","description":"Returns a collection of Silent app ignored user matches for the given organization.\n\nA match records a real value (the OS username today) seen on a device that matched\nan ignored user pattern and was skipped during provisioning. Results can be filtered\nby `pattern_id`.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"pattern_id","description":"Only return matches for this pattern","type":"integer","format":"int32","required":false}],"responses":{"200":{"description":"A list of ignored user matches","schema":{"type":"object","properties":{"ignored_user_matches":{"type":"array","items":{"$ref":"#/definitions/IgnoredUserMatch"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["ignored_user_matches"],"operationId":"getV2OrganizationsOrganizationIdSilentAppIgnoredUserMatches"}},"/v2/organizations/{organization_id}/silent_app/ignored_user_patterns":{"get":{"summary":"List ignored user patterns","description":"Returns a collection of Silent app ignored user patterns for the given organization.\n\nEach pattern is a wildcard string the Silent app uses to skip a user during device\nprovisioning. `match_type` names the attribute the pattern is matched against.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of ignored user patterns","schema":{"type":"object","properties":{"ignored_user_patterns":{"type":"array","items":{"$ref":"#/definitions/IgnoredUserPattern"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["ignored_user_patterns"],"operationId":"getV2OrganizationsOrganizationIdSilentAppIgnoredUserPatterns"}},"/v2/organizations/{organization_id}/tasks":{"get":{"summary":"List organization tasks","description":"Returns a collection of tasks (to-dos) for the given organization.\n\nResults can be filtered by status[] (active/completed/deleted), user_ids[], project_ids[], and global_todo_ids[].\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"status","description":"A status or list of statuses to filter","type":"array","items":{"type":"string","enum":["active","completed","deleted","archived","archived_native_active","archived_native_completed","archived_native_deleted"]},"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"global_todo_ids","description":"List of Global To-Do IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"only_global_todos","description":"Return only global to-dos","type":"boolean","required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false}],"responses":{"200":{"description":"A list of tasks","schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/definitions/Task"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"getV2OrganizationsOrganizationIdTasks"}},"/v2/organizations/{organization_id}/team_invoices":{"get":{"summary":"List organization team invoices","description":"Returns a collection of team invoices (internal payroll invoices) for the given organization.\n\nResults can be filtered by user_ids[], issue_date[start]/[stop], and status.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"issue_date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"issue_date[stop]","description":"Stop date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"status","description":"Invoice status","type":"string","enum":["draft","open","closed"],"required":false},{"in":"query","name":"include_line_items","description":"Include invoice line items","type":"boolean","default":false,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false}],"responses":{"200":{"description":"A list of team invoices","schema":{"type":"object","properties":{"team_invoices":{"type":"array","items":{"$ref":"#/definitions/TeamInvoice"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["team_invoices"],"operationId":"getV2OrganizationsOrganizationIdTeamInvoices"}},"/v2/organizations/{organization_id}/team_payments":{"get":{"summary":"List organization team payments","description":"Returns a collection of team payments (payroll disbursements) for the given organization.\n\nResults can be filtered by created[start]/[stop], user_ids[], and project_ids[].\n\nNote: If date filters are not provided, defaults to the last 3 years. Earliest date is 3 years ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":false},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects"]},"required":false}],"responses":{"200":{"description":"A list of team payments","schema":{"type":"object","properties":{"team_payments":{"type":"array","items":{"$ref":"#/definitions/TeamPayment"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["team_payments"],"operationId":"getV2OrganizationsOrganizationIdTeamPayments"}},"/v2/organizations/{organization_id}/teams":{"get":{"summary":"List organization teams","description":"Returns a collection of teams for the given organization.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of teams","schema":{"type":"object","properties":{"teams":{"type":"array","items":{"$ref":"#/definitions/Team"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"getV2OrganizationsOrganizationIdTeams"},"post":{"summary":"Create team","description":"Creates a new team.\n\nReturns the created team.\n\nOnly name is required. Members can optionally be added with roles: viewer, user, or manager.\n\nNote: When a member lead is set to true, the role is forced to manager.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdTeams"}}],"responses":{"201":{"description":"A team","schema":{"type":"object","properties":{"team":{"$ref":"#/definitions/Team"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"postV2OrganizationsOrganizationIdTeams"}},"/v2/organizations/{organization_id}/time_edit_logs":{"get":{"summary":"List organization time edit logs","description":"Returns a collection of time edit logs (manual time additions/edits/deletions) for the given organization.\n\nResults can be filtered by created[start]/[stop], user_ids[], task_ids[], and project_ids[].\n\nNote: Date range limit is 31 days. Earliest date is 3 years ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of time edit logs","schema":{"type":"object","properties":{"time_edit_logs":{"type":"array","items":{"$ref":"#/definitions/TimeEditLog"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_edit_logs"],"operationId":"getV2OrganizationsOrganizationIdTimeEditLogs"}},"/v2/organizations/{organization_id}/manual_time_requests":{"get":{"summary":"List manual time requests","description":"Date range filter (`date[start]`/`date[stop]`) returns requests whose *time span* overlaps the given organization-local dates:\nit converts the dates to the org's day range and applies `in_range` (overlap on `starts_at`/`stops_at`).\nThis is *not* an exact filter on the `date` response field (see entity docs). Overnight entries or tz shifts may cause an entry to overlap a date even if its `date` column differs.\nBoth bounds are required (otherwise 400).\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":false},{"in":"query","name":"updated_at[start]","type":"string","format":"date-time","required":false},{"in":"query","name":"updated_at[stop]","type":"string","format":"date-time","required":false},{"in":"query","name":"status","type":"string","enum":["submitted","approved","denied"],"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"team_ids","description":"List of team IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"","schema":{"type":"object","properties":{"manual_time_requests":{"type":"array","items":{"$ref":"#/definitions/ManualTimeRequest"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["manual_time_requests"],"operationId":"getV2OrganizationsOrganizationIdManualTimeRequests"}},"/v2/organizations/{organization_id}/time_off_balances":{"get":{"summary":"List organization time off balances","description":"Returns time off balances for the given organization.\n\nEach entry represents one user's balance for one time off policy in the requested year.\n\nUse `year` to query balances for a specific year (defaults to current year in the organization's timezone).\n\nUse `include[]` to sideload related users and time_off_policies.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"search","description":"User name search","type":"string","required":false},{"in":"query","name":"user_ids","description":"Filter by user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"time_off_policy_ids","description":"Filter by time off policy IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"year","description":"Balance year (default: current year in organization timezone)","type":"integer","format":"int32","required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","time_off_policies"]},"required":false}],"responses":{"200":{"description":"A list of time off balances","schema":{"type":"object","properties":{"time_off_balances":{"type":"array","items":{"$ref":"#/definitions/TimeOffBalance"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_balances"],"operationId":"getV2OrganizationsOrganizationIdTimeOffBalances"},"post":{"summary":"Add organization time off balance adjustments","description":"Applies manual balance adjustments for the given organization.\n\nEach entry in balance_adjustments specifies a policy, a list of users, an amount (in seconds),\nand whether to add to or replace the current balance.\n\nIf a user is not yet assigned to the specified policy, they are auto-assigned before the adjustment.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdTimeOffBalances","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdTimeOffBalances"}}],"responses":{"201":{"description":"Success","schema":{"type":"object","properties":{"time_off_balance":{"$ref":"#/definitions/TimeOffBalance"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_balances"],"operationId":"postV2OrganizationsOrganizationIdTimeOffBalances"}},"/v2/organizations/{organization_id}/time_off_policies":{"get":{"summary":"List organization time off policies","description":"Returns a collection of time off policies for the given organization.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"status","description":"Policy status","type":"string","default":"active","enum":["active","archived","all"],"required":false}],"responses":{"200":{"description":"A list of time off policies","schema":{"type":"object","properties":{"time_off_policies":{"type":"array","items":{"$ref":"#/definitions/TimeOffPolicy"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"getV2OrganizationsOrganizationIdTimeOffPolicies"},"post":{"summary":"Create time off policy","description":"Creates a new time off policy for the given organization.\n\n`accrual_policy` fields by `accrual_type`:\n\n`maximum_to_accrue` is required for `hours_worked`, `annual`, and `joined_date`.\n\n- `none` — `starting_balance` (optional)\n- `hours_worked` — `hours_per` (required), `hours_worked` (required), `maximum_to_accrue` (required)\n- `annual` — `hours_per_year` (required), `maximum_to_accrue` (required)\n- `joined_date` — `hours_per_year` (required), `maximum_to_accrue` (required)\n- `monthly` — `accrual_period` (required: `month` or `year`), `accrual_day` (required: `first_day_of_month`, `monthly_anniversary`, or `last_day_of_month`), `prorate_on_start` (optional); plus `hours_per_month` (required when `accrual_period=month`) or `hours_per_year` (required when `accrual_period=year`)\n\nWhen `membership_rules` are provided, they take precedence over `time_off_policy_user_ids`.\nAdditionally, `auto_add_new_users` defaults to `true` when `membership_rules` are provided.\n\nReturns the created time off policy.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdTimeOffPolicies"}}],"responses":{"201":{"description":"A time off policy","schema":{"type":"object","properties":{"time_off_policy":{"$ref":"#/definitions/TimeOffPolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"postV2OrganizationsOrganizationIdTimeOffPolicies"}},"/v2/organizations/{organization_id}/time_off_policies/user_policies":{"get":{"summary":"List organization time off policies per user","description":"Returns active time off policies that the specified user is a member of.\n\nUsed to determine which policies are available when creating a time off request.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"user_id","description":"User ID to list policies for","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of time off policies","schema":{"type":"object","properties":{"time_off_policies":{"type":"array","items":{"$ref":"#/definitions/TimeOffPolicy"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"getV2OrganizationsOrganizationIdTimeOffPoliciesUserPolicies"}},"/v2/organizations/{organization_id}/time_off_requests":{"get":{"summary":"List organization time off requests","description":"Returns a collection of time off requests for the given organization.\n\nResults can be filtered by created[start]/[stop], starts_at[start]/[stop], approved_at[start]/[stop], and user_ids[].\n\nUse include[] to sideload related users and time_off_policies.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":false},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"starts_at[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":false},{"in":"query","name":"starts_at[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"approved_at[start]","description":"Approved start time (ISO 8601)","type":"string","format":"date-time","required":false},{"in":"query","name":"approved_at[stop]","description":"Approved stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","time_off_policies"]},"required":false}],"responses":{"200":{"description":"A list of time off requests","schema":{"type":"object","properties":{"time_off_requests":{"type":"array","items":{"$ref":"#/definitions/TimeOffRequest"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_requests"],"operationId":"getV2OrganizationsOrganizationIdTimeOffRequests"},"post":{"summary":"Create time off request","description":"Creates a new time off request.\n\nReturns the created time off request with a balance_preview showing the policy balance impact.\n\ntime_off_request_days must include one entry for every date from starts_at to stops_at. Each entry requires a date and amount_used in seconds (typically 28800 for an 8-hour day). Set amount_used to 0 for excluded weekend or holiday days.\n\nSet require_no_shift_overlap to true to reject the request if it overlaps with scheduled attendance shifts.\n\nremove_shifts deletes overlapping attendance shifts only when the policy does not require approval (the request is auto-approved on creation). When the policy requires approval, this field is ignored — use the status endpoint to remove shifts at approval time instead.\n\nNote: starts_at and stops_at are interpreted as wall-clock times in the target user's configured timezone (any timezone offset in the value is ignored). When all_day is true, times are normalized to 09:00–17:00.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdTimeOffRequests","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdTimeOffRequests"}}],"responses":{"201":{"description":"A time off request","schema":{"type":"object","properties":{"time_off_request":{"$ref":"#/definitions/TimeOffRequest"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_requests"],"operationId":"postV2OrganizationsOrganizationIdTimeOffRequests"}},"/v2/organizations/{organization_id}/timesheets":{"get":{"summary":"List organization timesheets","description":"Returns a collection of timesheets (aggregate approval records) for the given organization.\n\nResults can be filtered by date[start]/[stop], approved[start], and status.\n\nNote: Timesheets are aggregate records used by the timesheet approval system, not individual time entries.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":false},{"in":"query","name":"approved[start]","description":"Includes timesheets approved since the specified start date, considering UTC timezone (ISO 8601)","type":"string","format":"date","required":false},{"in":"query","name":"status","description":"Invoice status","type":"string","enum":["open","submitted","approved","denied"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of timesheets","schema":{"type":"object","properties":{"timesheets":{"type":"array","items":{"$ref":"#/definitions/Timesheet"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["timesheets"],"operationId":"getV2OrganizationsOrganizationIdTimesheets"}},"/v2/organizations/{organization_id}/tool_usages":{"get":{"summary":"List organization tool usages","description":"Returns a collection of tool usages (productivity tool usage) for the given organization.\n\nResults can be filtered by time_slot[start]/[stop], user_ids[], task_ids[], project_ids[], and tool_type.\n\nThe preferred endpoints to fetch tool usage data are the daily endpoints.\n\nRequires Owner or Organization Manager role (with view others data permission).\n\nNote: Date range limit is 7 days. Earliest date is 1 month ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"tool_type","description":"Filter by tool type (application or url)","type":"string","enum":["application","url"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of tool usages","schema":{"type":"object","properties":{"tool_usages":{"type":"array","items":{"$ref":"#/definitions/ToolUsage"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tool_usages"],"operationId":"getV2OrganizationsOrganizationIdToolUsages"}},"/v2/organizations/{organization_id}/tracking_states":{"get":{"summary":"List organization tracking states","description":"Returns timer start/stop events for members in the organization.\n\nEach event has a `type` of `start` or `stop`, derived from the client-reported\ntracking state. Both the desktop and web timers report these events.\n\nResults can be filtered by user_ids[], project_ids[], and task_ids[], within a\nrequired occurred[start]/[stop] time range (maximum 7 days).\n\nEvents on deleted projects are excluded. Events from members who have been removed\nfrom the organization are excluded by default; pass include_removed=true to include\nthem.\n\nNote: `occurred_at` is client-reported and may be backdated, so results are returned\nin insertion order (by id). Sort by `occurred_at` client-side to build a chronological\ntimeline.\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"occurred[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"occurred[stop]","description":"Stop time (ISO 8601, exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include_removed","description":"Include events from members removed from the organization","type":"boolean","default":false,"required":false}],"responses":{"200":{"description":"A list of tracking state events","schema":{"type":"object","properties":{"tracking_states":{"type":"array","items":{"$ref":"#/definitions/TrackingState"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tracking_states"],"operationId":"getV2OrganizationsOrganizationIdTrackingStates"}},"/v2/organizations/{organization_id}/webhooks":{"post":{"summary":"Create organization webhook","description":"Creates a new webhook subscription for the organization. After creation, Hubstaff will send a POST request to your `target_url` with an empty body and an `X-Hook-Secret` header.\n\nYour endpoint must respond with HTTP 200 and echo the same `X-Hook-Secret` header to verify ownership.\n\nStore the secret value - you'll need it to activate the webhook.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"name":"postV2OrganizationsOrganizationIdWebhooks","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2OrganizationsOrganizationIdWebhooks"}}],"responses":{"201":{"description":"Create organization webhook"}},"tags":["webhooks"],"operationId":"postV2OrganizationsOrganizationIdWebhooks"}},"/v2/organizations/{organization_id}/work_break_projects":{"get":{"summary":"List organization work break projects","description":"Returns a collection of work break projects and their policies for the organization.\n\nResults can be filtered by project_ids[].\n","produces":["application/json"],"parameters":[{"in":"path","name":"organization_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"project_ids","description":"List of project IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false}],"responses":{"200":{"description":"A work break","schema":{"type":"object","properties":{"work_break_project":{"$ref":"#/definitions/WorkBreakProject"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["organizations"],"operationId":"getV2OrganizationsOrganizationIdWorkBreakProjects"}},"/v2/overtime_policies/{overtime_policy_id}":{"get":{"summary":"Get overtime policy","description":"Returns the overtime policy with the given ID.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"parameters":[{"in":"path","name":"overtime_policy_id","description":"Overtime policy ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"An overtime policy","schema":{"type":"object","properties":{"overtime_policy":{"$ref":"#/definitions/OvertimePolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["overtime_policies"],"operationId":"getV2OvertimePoliciesOvertimePolicyId"},"put":{"summary":"Update overtime policy","description":"Updates an overtime policy. Only pass in the fields you want to change.\n\n**Updatable fields:** `name`, `threshold`, `pay_rate_multiplier`, `auto_add_new_users`,\n`notification_enabled`, `notification_role_ids`, and `user_ids` (member assignments).\n\n**Immutable after creation:** `policy_type`. Editing an archived policy is not allowed.\n\nChanges apply at the start of the organization's next week (for `weekly` policies) or\nthe next day (for `daily` policies). A policy that is already in use is not edited in\nplace — a new version is created and the current one is archived.\n\nA member can only belong to one policy of a given type at a time. If any member in\n`user_ids` is already assigned to another active policy of the same type, the request\nfails unless `override` is `true`, in which case those members are moved into this policy.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"overtime_policy_id","description":"Overtime policy ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2OvertimePoliciesOvertimePolicyId"}}],"responses":{"200":{"description":"An overtime policy","schema":{"type":"object","properties":{"overtime_policy":{"$ref":"#/definitions/OvertimePolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["overtime_policies"],"operationId":"putV2OvertimePoliciesOvertimePolicyId"}},"/v2/overtime_policies/{overtime_policy_id}/archive":{"post":{"summary":"Archive overtime policy","description":"Archives the overtime policy by closing it. A policy that is in use is closed at the\nstart of the organization's next week; an unused policy is closed immediately.\nOvertime policies are never deleted, only archived.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"overtime_policy_id","description":"Overtime policy ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"An overtime policy","schema":{"type":"object","properties":{"overtime_policy":{"$ref":"#/definitions/OvertimePolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["overtime_policies"],"operationId":"postV2OvertimePoliciesOvertimePolicyIdArchive"}},"/v2/overtime_policies/{overtime_policy_id}/restore":{"post":{"summary":"Restore overtime policy","description":"Restores an archived overtime policy. A policy that was used is restored as a new\ncopy effective at the start of the organization's next week (the original stays\narchived); an unused policy is reopened in place.\n\nRestoring fails if any of its members are already assigned to another active policy\nof the same type.\n\nOnly organization Owners and Managers may use this endpoint.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"overtime_policy_id","description":"Overtime policy ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"An overtime policy","schema":{"type":"object","properties":{"overtime_policy":{"$ref":"#/definitions/OvertimePolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["overtime_policies"],"operationId":"postV2OvertimePoliciesOvertimePolicyIdRestore"}},"/v2/projects/{project_id}":{"get":{"summary":"Get project","description":"Returns the project with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","description":"Project ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A project","schema":{"type":"object","properties":{"project":{"$ref":"#/definitions/Project"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["projects"],"operationId":"getV2ProjectsProjectId"},"put":{"summary":"Update project","description":"Updates a project.\n\nReturns the updated project.\n\nOnly pass in the fields you want to change. To unset the budget, specify null. To update the budget, you must specify the complete budget configuration.\n\nWhen restoring an archived project, you can only change the status column.\n\nRate handling for pay_rate and bill_rate:\n- To remove a rate, pass null (e.g., pay_rate: null)\n- Custom user rates take precedence over default project rates\n- To apply default project rate to a user, remove their custom rate first\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"project_id","description":"Project ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2ProjectsProjectId"}}],"responses":{"200":{"description":"A project","schema":{"type":"object","properties":{"project":{"$ref":"#/definitions/Project"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["projects"],"operationId":"putV2ProjectsProjectId"}},"/v2/projects/{project_id}/update_members":{"put":{"summary":"Update project members","description":"Updates project members.\n\nReturns {success: true} on success.\n\nOnly pass in the members you want to change.\n\nAvailable roles:\n- viewer - View-only access\n- user - Standard member access\n- manager - Project manager access\n- remove - Removes user from project\n\nYou can also specify pay_rate and bill_rate for each member. To remove a rate, pass null.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"project_id","description":"Project ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2ProjectsProjectIdUpdateMembers"}}],"responses":{"200":{"description":"Updated successfully"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["members"],"operationId":"putV2ProjectsProjectIdUpdateMembers"}},"/v2/projects/{project_id}/update_metadata":{"put":{"summary":"Update project metadata","description":"Updates metadata on the project.\n\nReturns the updated project.\n\nOnly specify the metadata keys you want to change. If the metadata key does not exist, it will be created. To remove a key, specify null as the value.\n\nKey requirements:\n- 2-30 characters\n- Lowercase letters, numbers, and underscores only\n\nValue requirements:\n- Valid UTF-8 string\n- Maximum 200 characters\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"project_id","description":"Project ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2ProjectsProjectIdUpdateMetadata"}}],"responses":{"200":{"description":"A project","schema":{"type":"object","properties":{"project":{"$ref":"#/definitions/Project"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["projects"],"operationId":"putV2ProjectsProjectIdUpdateMetadata"}},"/v2/projects/{project_id}/activities":{"get":{"summary":"List project activities","description":"Returns a collection of activities (10-minute time blocks) for the given project.\n\nResults can be filtered by user, task, project, and time range (time_slot[start], time_slot[stop]).\n\nFor aggregated daily data, use the daily_activities endpoint instead.\n\nNote: Data may be delayed up to 20 minutes.\nNote: Date range limit is 7 days. Earliest date is 6 months ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"global_todo_ids","description":"List of global todo IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false},{"in":"query","name":"time_zone","description":"The time zone name for the activity","type":"string","required":false}],"responses":{"200":{"description":"A list of activities","schema":{"type":"object","properties":{"activities":{"type":"array","items":{"$ref":"#/definitions/Activity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2ProjectsProjectIdActivities"}},"/v2/projects/{project_id}/activities/updates":{"get":{"summary":"List project activities updates","description":"Returns activities that were updated within the given time range. Useful for syncing changes.\n\nResults can be filtered by updated[start]/[stop], user_ids[], task_ids[], global_todo_ids[], and project_ids[].\n\nNote: Data may be delayed up to 20 minutes. Date range limit is 7 days. Earliest date is 45 days ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"updated[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"updated[stop]","description":"Stop time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"global_todo_ids","description":"List of global todo IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false}],"responses":{"200":{"description":"A list of activities","schema":{"type":"object","properties":{"activities":{"type":"array","items":{"$ref":"#/definitions/Activity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2ProjectsProjectIdActivitiesUpdates"}},"/v2/projects/{project_id}/budget_histories":{"get":{"summary":"List project budget histories","description":"Returns budget configuration history (changes to budget settings over time) for the given project.\n\n\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"A list of budget histories","schema":{"type":"object","properties":{"budget_histories":{"type":"array","items":{"$ref":"#/definitions/BudgetHistory"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["budgets"],"operationId":"getV2ProjectsProjectIdBudgetHistories"}},"/v2/projects/{project_id}/activities/daily":{"get":{"summary":"List project daily activities","description":"Returns daily aggregated time tracking data for the given project.\n\nResults can be filtered by user_ids[], task_ids[], project_ids[], and date[start]/[stop]. Data is aggregated by organization timezone date.\n\nNote: Date range limit is 31 days. Earliest date is 3 years ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false}],"responses":{"200":{"description":"A list of daily activities","schema":{"type":"object","properties":{"daily_activities":{"type":"array","items":{"$ref":"#/definitions/DailyActivity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2ProjectsProjectIdActivitiesDaily"}},"/v2/projects/{project_id}/activities/daily/updates":{"get":{"summary":"List project daily activities updates","description":"Returns daily activities that were modified within the specified time range. Useful for syncing changes.\n\nUse updated[start] and updated[stop] to specify the modification time range. Results can also be filtered by user_ids[], task_ids[], and project_ids[].\n\nNote: Updated time range limit is 31 days. Only returns activities from the last month.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"updated[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"updated[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false}],"responses":{"200":{"description":"A list of daily activities","schema":{"type":"object","properties":{"daily_activities":{"type":"array","items":{"$ref":"#/definitions/DailyActivity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2ProjectsProjectIdActivitiesDailyUpdates"}},"/v2/projects/{project_id}/tool_usages/daily":{"get":{"summary":"List project daily tool usages","description":"Returns daily aggregated time spent using productivity tools (apps and websites categorized by Hubstaff).\n\nResults can be filtered by user_ids[], task_ids[], project_ids[], tool_type, and date[start]/[stop].\n\nRequires Owner or Organization Manager role (with view others data permission).\n\nNote: Date range limit is 14 days. Earliest date is 1 month ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"date[start]","description":"Start date (ISO 8601)","type":"string","format":"date","required":true},{"in":"query","name":"date[stop]","description":"Stop date (ISO 8601, Inclusive)","type":"string","format":"date","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"tool_type","description":"Filter by tool type (application or url)","type":"string","enum":["application","url"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false}],"responses":{"200":{"description":"A list of daily tool usages","schema":{"type":"object","properties":{"daily_tool_usages":{"type":"array","items":{"$ref":"#/definitions/DailyToolUsage"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tool_usages"],"operationId":"getV2ProjectsProjectIdToolUsagesDaily"}},"/v2/projects/{project_id}/integration_links":{"get":{"summary":"List project integration project links","description":"Returns a collection of active project links (mappings between Hubstaff projects and integration projects).\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"a list of project links","schema":{"type":"object","properties":{"project_links":{"type":"array","items":{"$ref":"#/definitions/IntegrationProjectLink"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["integrations"],"operationId":"getV2ProjectsProjectIdIntegrationLinks"}},"/v2/projects/{project_id}/last_activities":{"get":{"summary":"List project last activities","description":"Returns the most recent activity for each member in the project.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"include_removed","description":"Include users that were removed","type":"boolean","default":false,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false}],"responses":{"200":{"description":"Last activities for members","schema":{"type":"object","properties":{"last_activities":{"type":"array","items":{"$ref":"#/definitions/LastActivity"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["activities"],"operationId":"getV2ProjectsProjectIdLastActivities"}},"/v2/projects/{project_id}/locations":{"get":{"summary":"List project locations","description":"Returns a collection of locations (GPS coordinates) for the given project.\n\nResults can be filtered by time_slot[start]/[stop].\n\nNote: Date range limit is 7 days.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of locations","schema":{"type":"object","properties":{"locations":{"type":"array","items":{"$ref":"#/definitions/Location"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["locations"],"operationId":"getV2ProjectsProjectIdLocations"}},"/v2/projects/{project_id}/member_limits":{"get":{"summary":"List project member limits","description":"Returns paginated member budget limit groups for the given project.\n\nRequires organization owner or organization manager for the project's organization.\n\nEach group includes project-level `alerts` settings shared across all groups on the project.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false}],"responses":{"200":{"description":"Member limit groups","schema":{"type":"object","properties":{"member_limits":{"type":"array","items":{"$ref":"#/definitions/MemberLimit"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["member_limits"],"operationId":"getV2ProjectsProjectIdMemberLimits"},"post":{"summary":"Create project member limit","description":"Creates a member budget limit group for the given project.\n\nAll `member_ids` must already be project members. Users assigned to another group are moved to the new group.\n\n`alerts` are optional and update project-level notification settings shared by every group on the project.\n\nExample request body:\n\n```json\n{\n  \"type\": \"cost\",\n  \"cost\": 250.25,\n  \"recurrence\": \"weekly\",\n  \"recurrence_start\": 0,\n  \"alerts\": {\"near_limit\": 75, \"notify_members\": true},\n  \"member_ids\": [101, 102]\n}\n```\n\nReturns the created member limit group.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"name":"postV2ProjectsProjectIdMemberLimits","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2ProjectsProjectIdMemberLimits"}}],"responses":{"201":{"description":"Member limit created","schema":{"type":"object","properties":{"member_limit":{"$ref":"#/definitions/MemberLimit"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["member_limits"],"operationId":"postV2ProjectsProjectIdMemberLimits"}},"/v2/projects/{project_id}/member_limits/{member_limit_id}":{"get":{"summary":"Get member limit","description":"Returns the member budget limit group with the given ID.\n\nRequires organization owner or organization manager for the project's organization.\n\n`alerts` reflect the project's shared notification settings, not a per-group value.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"path","name":"member_limit_id","description":"Member Limit ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Member limit group","schema":{"type":"object","properties":{"member_limit":{"$ref":"#/definitions/MemberLimit"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["member_limits"],"operationId":"getV2ProjectsProjectIdMemberLimitsMemberLimitId"},"put":{"summary":"Update project member limit","description":"Updates a member budget limit group for the given project.\n\nAt least one of `member_ids`, `alerts`, or a complete budget configuration must be provided.\n\n- `member_ids` — when provided, fully replaces the group's members. Omit to leave members unchanged.\n- `alerts` — when provided, updates project-level settings shared by all groups. Omit to preserve alerts.\n- Budget fields — provide the full set (`type` plus `cost` or `hours`, and optional `rate`, `recurrence`, `recurrence_start`, `start_date`) or omit them entirely. Mixed budget payloads are rejected.\n\nUsers moved from another group are reassigned automatically.\n\nReturns the updated member limit group.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"path","name":"member_limit_id","description":"Member Limit ID","type":"integer","format":"int32","required":true},{"name":"putV2ProjectsProjectIdMemberLimitsMemberLimitId","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2ProjectsProjectIdMemberLimitsMemberLimitId"}}],"responses":{"200":{"description":"Member limit updated","schema":{"type":"object","properties":{"member_limit":{"$ref":"#/definitions/MemberLimit"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["member_limits"],"operationId":"putV2ProjectsProjectIdMemberLimitsMemberLimitId"},"delete":{"summary":"Delete project member limit","description":"Deletes a member budget limit group for the given project.\n\nAssigned members are removed from the group. Project-level `alerts` settings are not changed.\n\nReturns `204 No Content` on success.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"path","name":"member_limit_id","description":"Member Limit ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Member limit deleted","schema":{"type":"object","properties":{"member_limit":{"$ref":"#/definitions/MemberLimit"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["member_limits"],"operationId":"deleteV2ProjectsProjectIdMemberLimitsMemberLimitId"}},"/v2/projects/{project_id}/members":{"get":{"summary":"List project members","description":"Returns a collection of members for the given project.\n\nResults can be filtered by search, user IDs, membership role, and date range.\n\n\n*membership_role* - The permission role the member has in this project\n- *manager* - An manager can track time, see data for any member within the project, can change settings, and manage membership within the project\n- *user* - A user can track time against the project and see only their own data within the project\n- *viewer* - A viewer can access reports based on data for any member within the project but can not change anything\n\n**Note**: A member must have membership within a project in order to track on that project, even if they are an organization owner or manager\n\n**Filtering by dates:**\n\nYou can filter members by when they were added to the project using the `created_at` parameter:\n- Use `created_at[start]` to get members added on or after a specific date\n- Use `created_at[stop]` to get members added before a specific date\n- Use both to get members added within a date range\n\nYou can also filter by when membership was last updated using the `updated_at` parameter:\n- Use `updated_at[start]` to get members updated on or after a specific date\n- Use `updated_at[stop]` to get members updated before a specific date\n- Use both to get members updated within a date range\n\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"search[email]","description":"An email to search for members","type":"string","required":false},{"in":"query","name":"search[name]","description":"A name to search for members","type":"string","required":false},{"in":"query","name":"include_removed","description":"Include members that were removed from the project","type":"boolean","default":false,"required":false},{"in":"query","name":"include_profile","description":"Include member profile information","type":"boolean","default":false,"required":false},{"in":"query","name":"direct_only","description":"If true, only include members assigned directly to the project and not as member of a team working on the project","type":"boolean","default":false,"required":false},{"in":"query","name":"membership_roles","description":"Search by membership role","type":"array","items":{"type":"string","enum":["manager","user","viewer"]},"required":false},{"in":"query","name":"created_at[start]","description":"Start date for created_at filter (inclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"created_at[stop]","description":"End date for created_at filter (exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"updated_at[start]","description":"Start date for updated_at filter (inclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"updated_at[stop]","description":"End date for updated_at filter (exclusive)","type":"string","format":"date-time","required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of members","schema":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/definitions/ProjectMember"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["members"],"operationId":"getV2ProjectsProjectIdMembers"}},"/v2/projects/{project_id}/notes":{"get":{"summary":"List project notes","description":"Returns a collection of notes for the given project.\n\nResults can be filtered by user_ids[], task_ids[], project_ids[], and time_slot[start]/[stop].\n\nNote: Date range limit is 31 days. Earliest date is 3 years ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false}],"responses":{"200":{"description":"A list of notes","schema":{"type":"object","properties":{"notes":{"type":"array","items":{"$ref":"#/definitions/Note"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["notes"],"operationId":"getV2ProjectsProjectIdNotes"}},"/v2/projects/{project_id}/screenshots":{"get":{"summary":"List project screenshots","description":"Returns a collection of screenshots for the given project.\n\nResults can be filtered by user_ids[], project_ids[], and time_slot[start]/[stop].\n\nNote: Date range limit is 7 days. Earliest date is 6 months ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of screenshots","schema":{"type":"object","properties":{"screenshots":{"type":"array","items":{"$ref":"#/definitions/Screenshot"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["screenshots"],"operationId":"getV2ProjectsProjectIdScreenshots"}},"/v2/projects/{project_id}/screenshots/{screenshot_id}":{"get":{"summary":"Get screenshot","description":"Returns the screenshot with the given ID.","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"path","name":"screenshot_id","description":"Screenshot ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Screenshot found","schema":{"type":"object","properties":{"screenshot":{"$ref":"#/definitions/Screenshot"}}}},"404":{"description":"Screenshot not found","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["screenshots"],"operationId":"getV2ProjectsProjectIdScreenshotsScreenshotId"}},"/v2/projects/{project_id}/tasks":{"get":{"summary":"List project tasks","description":"Returns a collection of tasks (to-dos) for the given project.\n\nResults can be filtered by status[] (active/completed/deleted), user_ids[], project_ids[], and global_todo_ids[].\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"status","description":"A status or list of statuses to filter","type":"array","items":{"type":"string","enum":["active","completed","deleted","archived","archived_native_active","archived_native_completed","archived_native_deleted"]},"required":false},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"global_todo_ids","description":"List of Global To-Do IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"only_global_todos","description":"Return only global to-dos","type":"boolean","required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of tasks","schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/definitions/Task"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"getV2ProjectsProjectIdTasks"},"post":{"summary":"Create task","description":"Creates a new task for this project.\n\nReturns the created task.\n\nNote: If this project is integrated with a 3rd party tool, you must create the task in that tool instead.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2ProjectsProjectIdTasks"}}],"responses":{"200":{"description":"To-do created","schema":{"type":"object","properties":{"task":{"$ref":"#/definitions/Task"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"postV2ProjectsProjectIdTasks"}},"/v2/projects/{project_id}/time_edit_logs":{"get":{"summary":"List project time edit logs","description":"Returns a collection of time edit logs (manual time additions/edits/deletions) for the given project.\n\nResults can be filtered by created[start]/[stop], user_ids[], task_ids[], and project_ids[].\n\nNote: Date range limit is 31 days. Earliest date is 3 years ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"created[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"created[stop]","description":"Stop time (ISO 8601, exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","projects","tasks"]},"required":false}],"responses":{"200":{"description":"A list of time edit logs","schema":{"type":"object","properties":{"time_edit_logs":{"type":"array","items":{"$ref":"#/definitions/TimeEditLog"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_edit_logs"],"operationId":"getV2ProjectsProjectIdTimeEditLogs"}},"/v2/projects/{project_id}/tool_usages":{"get":{"summary":"List project tool usages","description":"Returns a collection of tool usages (productivity tool usage) for the given project.\n\nResults can be filtered by time_slot[start]/[stop], user_ids[], task_ids[], project_ids[], and tool_type.\n\nThe preferred endpoints to fetch tool usage data are the daily endpoints.\n\nRequires Owner or Organization Manager role (with view others data permission).\n\nNote: Date range limit is 7 days. Earliest date is 1 month ago.\n","produces":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"time_slot[start]","description":"Start time (ISO 8601)","type":"string","format":"date-time","required":true},{"in":"query","name":"time_slot[stop]","description":"Stop time (ISO 8601, Exclusive)","type":"string","format":"date-time","required":true},{"in":"query","name":"user_ids","description":"List of user IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"task_ids","description":"List of task IDs","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"query","name":"tool_type","description":"Filter by tool type (application or url)","type":"string","enum":["application","url"],"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users","tasks"]},"required":false}],"responses":{"200":{"description":"A list of tool usages","schema":{"type":"object","properties":{"tool_usages":{"type":"array","items":{"$ref":"#/definitions/ToolUsage"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tool_usages"],"operationId":"getV2ProjectsProjectIdToolUsages"}},"/v2/projects/{project_id}/webhooks":{"post":{"summary":"Create project webhook","description":"Creates a new webhook subscription for the project. After creation, Hubstaff will send a POST request to your `target_url` with an empty body and an `X-Hook-Secret` header.\n\nYour endpoint must respond with HTTP 200 and echo the same `X-Hook-Secret` header to verify ownership.\n\nStore the secret value - you'll need it to activate the webhook.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"project_id","type":"integer","format":"int32","required":true},{"name":"postV2ProjectsProjectIdWebhooks","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2ProjectsProjectIdWebhooks"}}],"responses":{"201":{"description":"Create project webhook"}},"tags":["webhooks"],"operationId":"postV2ProjectsProjectIdWebhooks"}},"/v2/tasks/{task_id}":{"get":{"summary":"Get task","description":"Returns the task with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"task_id","description":"Task ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A task","schema":{"type":"object","properties":{"task":{"$ref":"#/definitions/Task"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"getV2TasksTaskId"},"put":{"summary":"Update task","description":"Updates a task.\n\nReturns the updated task.\n\nOnly pass in the fields you want to change. Requires passing lock_version from the task fetch.\n\nNote: Only simple todos can be updated. 3rd party tasks must be updated in their system.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"task_id","description":"Task ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TasksTaskId"}}],"responses":{"200":{"description":"To-do updated","schema":{"type":"object","properties":{"task":{"$ref":"#/definitions/Task"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"putV2TasksTaskId"},"delete":{"summary":"Delete task","description":"Deletes a task.\n\nNote: Only simple todos can be deleted. 3rd party tasks must be deleted in their system.\n","produces":["application/json"],"parameters":[{"in":"path","name":"task_id","description":"Task ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"To-do deleted","schema":{"type":"object","properties":{"task":{"$ref":"#/definitions/Task"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"deleteV2TasksTaskId"}},"/v2/tasks/{task_id}/update_metadata":{"put":{"summary":"Update task metadata","description":"Updates metadata on the task.\n\nReturns the updated task.\n\nOnly specify the metadata keys you want to change. If the metadata key does not exist, it will be created. To remove a key, specify null as the value. Requires passing lock_version from the task fetch.\n\nKey requirements:\n- 2-30 characters\n- Lowercase letters, numbers, and underscores only\n\nValue requirements:\n- Valid UTF-8 string\n- Maximum 200 characters\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"task_id","description":"Task ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TasksTaskIdUpdateMetadata"}}],"responses":{"200":{"description":"A client","schema":{"type":"object","properties":{"task":{"$ref":"#/definitions/Task"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["tasks"],"operationId":"putV2TasksTaskIdUpdateMetadata"}},"/v2/team_payments/{team_payment_id}":{"get":{"summary":"Get team payment","description":"Returns the team payment with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"team_payment_id","description":"Team payment ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A team payment","schema":{"type":"object","properties":{"team_payment":{"$ref":"#/definitions/TeamPayment"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["team_payments"],"operationId":"getV2TeamPaymentsTeamPaymentId"}},"/v2/teams/{team_id}":{"get":{"summary":"Get team","description":"Returns the team with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A team","schema":{"type":"object","properties":{"team":{"$ref":"#/definitions/Team"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"getV2TeamsTeamId"},"put":{"summary":"Update team","description":"Updates a team.\n\nReturns the updated team.\n\nOnly pass in the fields you want to change. Only organization owners or managers can update team details.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TeamsTeamId"}}],"responses":{"200":{"description":"A team","schema":{"type":"object","properties":{"team":{"$ref":"#/definitions/Team"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"putV2TeamsTeamId"},"delete":{"summary":"Delete team","description":"Deletes a team.\n\nNote: SCIM-managed teams cannot be deleted.\n","produces":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Team successfully deleted","schema":{"type":"object","properties":{"team":{"$ref":"#/definitions/Team"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"deleteV2TeamsTeamId"}},"/v2/teams/{team_id}/members":{"get":{"summary":"List team members","description":"Returns a collection of members for the given team.\n\nMembership roles:\n- manager - Can track time, view all data, change settings, and manage membership\n- user - Can track time and view only their own data\n- viewer - Can view reports but cannot make changes\n","produces":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["users"]},"required":false}],"responses":{"200":{"description":"A list of members","schema":{"type":"object","properties":{"team_members":{"type":"array","items":{"$ref":"#/definitions/TeamMember"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["members"],"operationId":"getV2TeamsTeamIdMembers"}},"/v2/teams/{team_id}/projects":{"get":{"summary":"List team projects","description":"Returns a collection of projects for the given team.\n","produces":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true},{"in":"query","name":"page_start_id","description":"The page start ID.","type":"integer","format":"int32","default":0,"required":false},{"in":"query","name":"page_limit","description":"The default page size","type":"integer","format":"int32","default":null,"required":false},{"in":"query","name":"include","description":"Specify related data to side load.","type":"array","items":{"type":"string","enum":["projects"]},"required":false}],"responses":{"200":{"description":"A list of projects","schema":{"type":"object","properties":{"team_projects":{"type":"array","items":{"$ref":"#/definitions/TeamProject"}}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"getV2TeamsTeamIdProjects"}},"/v2/teams/{team_id}/update_members":{"put":{"summary":"Update team members","description":"Updates team members.\n\nReturns {success: true} on success.\n\nOnly pass in the members you want to change.\n\nAvailable roles:\n- viewer - View-only access\n- user - Standard member access\n- manager - Team manager access\n- remove - Removes user from team\n\nNote: A team lead must have the manager role. Only organization owners or managers can adjust the lead option.\n\nBatch size: Up to 150 members per request. Larger requests are rejected with HTTP 400 and code \"too_many_members\".\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TeamsTeamIdUpdateMembers"}}],"responses":{"200":{"description":"Updated successfully"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["members"],"operationId":"putV2TeamsTeamIdUpdateMembers"}},"/v2/teams/{team_id}/update_projects":{"put":{"summary":"Update team projects","description":"Updates team projects.\n\nReturns {success: true} on success.\n\nAfter adding or removing projects, member roles in those projects are updated based on team membership.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TeamsTeamIdUpdateProjects"}}],"responses":{"200":{"description":"Updated successfully"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"putV2TeamsTeamIdUpdateProjects"}},"/v2/teams/{team_id}/update_metadata":{"put":{"summary":"Update team metadata","description":"Updates metadata on the team.\n\nReturns the updated team.\n\nOnly specify the metadata keys you want to change. If the metadata key does not exist, it will be created. To remove a key, specify null as the value.\n\nKey requirements:\n- 2-30 characters\n- Lowercase letters, numbers, and underscores only\n\nValue requirements:\n- Valid UTF-8 string\n- Maximum 200 characters\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"team_id","description":"Team ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TeamsTeamIdUpdateMetadata"}}],"responses":{"200":{"description":"A team","schema":{"type":"object","properties":{"team":{"$ref":"#/definitions/Team"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["teams"],"operationId":"putV2TeamsTeamIdUpdateMetadata"}},"/v2/time_off_policies/{time_off_policy_id}":{"get":{"summary":"Get time off policy","description":"Returns the time off policy with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"time_off_policy_id","description":"Time off policy ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A time off policy","schema":{"type":"object","properties":{"time_off_policy":{"$ref":"#/definitions/TimeOffPolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"getV2TimeOffPoliciesTimeOffPolicyId"},"put":{"summary":"Update time off policy","description":"Updates a time off policy. Only pass in the fields you want to change.\n\n**Updatable fields:** `name`, `accrual_policy`, `allow_negative_balances`,\n`requires_approval`, `balance_rolls_over_annually`, `paid`, `auto_add_new_users`,\nand `time_off_policy_user_ids` (list-based policies only).\n\n**Immutable after creation:** `accrual_type` and `membership_rules`.\nUse `accrual_policy` to update the configuration within the existing accrual type.\nFor rules-based policies, member assignment cannot be modified via the API.\n\nReturns the updated time off policy.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"time_off_policy_id","description":"Time off policy ID","type":"integer","format":"int32","required":true},{"name":"data","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TimeOffPoliciesTimeOffPolicyId"}}],"responses":{"200":{"description":"A time off policy","schema":{"type":"object","properties":{"time_off_policy":{"$ref":"#/definitions/TimeOffPolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"putV2TimeOffPoliciesTimeOffPolicyId"},"delete":{"summary":"Delete time off policy","description":"Deletes the time off policy.\n\nA policy cannot be deleted if any of its members have:\n- paid time off requests,\n- approved time off requests, or\n- used time off hours (time off adjustments).\n\nOther balance adjustments (accruals, manual adjustments) do not prevent deletion\nand are removed along with the policy.\n\nUse the archive endpoint instead to retire a policy that has been used.\n","produces":["application/json"],"parameters":[{"in":"path","name":"time_off_policy_id","description":"Time off policy ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Deletion successful","schema":{"type":"object","properties":{"time_off_policy":{"$ref":"#/definitions/TimeOffPolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"deleteV2TimeOffPoliciesTimeOffPolicyId"}},"/v2/time_off_policies/{time_off_policy_id}/archive":{"post":{"summary":"Archive time off policy","description":"Archives the time off policy.\n\nReturns the archived time off policy.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"time_off_policy_id","description":"Time off policy ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A time off policy","schema":{"type":"object","properties":{"time_off_policy":{"$ref":"#/definitions/TimeOffPolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"postV2TimeOffPoliciesTimeOffPolicyIdArchive"}},"/v2/time_off_policies/{time_off_policy_id}/restore":{"post":{"summary":"Restore time off policy","description":"Restores an archived time off policy.\n\nThe policy name will be appended with a restoration date suffix.\n\nReturns the restored time off policy.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"time_off_policy_id","description":"Time off policy ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A time off policy","schema":{"type":"object","properties":{"time_off_policy":{"$ref":"#/definitions/TimeOffPolicy"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_policies"],"operationId":"postV2TimeOffPoliciesTimeOffPolicyIdRestore"}},"/v2/time_off_requests/{time_off_request_id}":{"get":{"summary":"Get time off request","description":"Returns the time off request with the given ID.\n\nIncludes time_off_request_days with per-day breakdown of dates, amounts, and holiday/paid status.\n\nAlso includes balance_preview showing the policy balance impact.\n","produces":["application/json"],"parameters":[{"in":"path","name":"time_off_request_id","description":"Time off request ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A time off request","schema":{"type":"object","properties":{"time_off_request":{"$ref":"#/definitions/TimeOffRequest"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_requests"],"operationId":"getV2TimeOffRequestsTimeOffRequestId"},"delete":{"summary":"Delete time off request","description":"Deletes the time off request.\n\nApproved or paid time off requests cannot be deleted.\n","produces":["application/json"],"parameters":[{"in":"path","name":"time_off_request_id","description":"Time off request ID","type":"integer","format":"int32","required":true}],"responses":{"204":{"description":"Deletion successful","schema":{"type":"object","properties":{"time_off_request":{"$ref":"#/definitions/TimeOffRequest"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_requests"],"operationId":"deleteV2TimeOffRequestsTimeOffRequestId"},"put":{"summary":"Update time off request","description":"Updates a time off request's details (dates, message, days, policy).\n\nThis is a full replacement — all fields must be provided, including time_off_request_days with one entry per date (amount_used in seconds, typically 28800 for an 8-hour day).\n\nApproved, paid, or partially paid requests cannot be edited.\n\nIf the request was denied, updating it automatically resubmits it (status → submitted).\n\nIf the policy does not require approval, the request is auto-approved on update.\n\nSet require_no_shift_overlap to true to reject the update if it overlaps with scheduled attendance shifts.\n\nremove_shifts deletes overlapping attendance shifts only when the policy does not require approval (the request is auto-approved on update). When the policy requires approval, this field is ignored — use the status endpoint to remove shifts at approval time instead.\n\nNote: starts_at and stops_at are interpreted as wall-clock times in the user's configured timezone (any timezone offset in the value is ignored). When all_day is true, times are normalized to 09:00–17:00.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"time_off_request_id","description":"Time off request ID","type":"integer","format":"int32","required":true},{"name":"putV2TimeOffRequestsTimeOffRequestId","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TimeOffRequestsTimeOffRequestId"}}],"responses":{"200":{"description":"The updated time off request","schema":{"type":"object","properties":{"time_off_request":{"$ref":"#/definitions/TimeOffRequest"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_requests"],"operationId":"putV2TimeOffRequestsTimeOffRequestId"}},"/v2/time_off_requests/{time_off_request_id}/status":{"put":{"summary":"Update time off request status","description":"Approves or denies the time off request.\n\nAllowed transitions: submitted → approved, submitted → denied, approved → denied, denied → approved.\n\nPaid or partially paid time off requests cannot be modified through this endpoint.\n\nWhen approving, use remove_shifts to automatically remove overlapping attendance shifts. This parameter is ignored when denying.\n\nA response (reason) is required when denying a request.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"time_off_request_id","description":"Time off request ID","type":"integer","format":"int32","required":true},{"name":"putV2TimeOffRequestsTimeOffRequestIdStatus","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TimeOffRequestsTimeOffRequestIdStatus"}}],"responses":{"200":{"description":"The updated time off request","schema":{"type":"object","properties":{"time_off_request":{"$ref":"#/definitions/TimeOffRequest"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_off_requests"],"operationId":"putV2TimeOffRequestsTimeOffRequestIdStatus"}},"/v2/timesheets/{timesheet_id}":{"put":{"summary":"Update timesheet status","description":"Updates a timesheet status or updates the denial reason on an already denied timesheet.\n\nAllowed statuses are open, submitted, approved, and denied. A denial_reason is required when transitioning a timesheet to denied.\n\nApproving a timesheet can require explicit confirmation when the period has pending manual time requests or pending time off requests.\nIf pending manual time requests would be denied, the endpoint returns 422 with error_code 14905; repeat the request with confirm_pending_manual_time_request_denial set to true.\nIf the period has pending time off requests, the endpoint returns 422 with error_code 14906; repeat the request with acknowledge_pending_time_off_requests set to true.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"timesheet_id","description":"Timesheet ID","type":"integer","format":"int32","required":true},{"name":"putV2TimesheetsTimesheetId","in":"body","required":true,"schema":{"$ref":"#/definitions/putV2TimesheetsTimesheetId"}}],"responses":{"200":{"description":"The updated timesheet","schema":{"type":"object","properties":{"timesheet":{"$ref":"#/definitions/Timesheet"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["timesheets"],"operationId":"putV2TimesheetsTimesheetId"}},"/v2/users/me":{"get":{"summary":"Get current user","description":"Returns the authenticated user.\n","produces":["application/json"],"responses":{"200":{"description":"A user","schema":{"type":"object","properties":{"user":{"$ref":"#/definitions/User"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["users"],"operationId":"getV2UsersMe"}},"/v2/users/me/webhooks":{"post":{"summary":"Create me webhook","description":"Creates a new webhook subscription for the me. After creation, Hubstaff will send a POST request to your `target_url` with an empty body and an `X-Hook-Secret` header.\n\nYour endpoint must respond with HTTP 200 and echo the same `X-Hook-Secret` header to verify ownership.\n\nStore the secret value - you'll need it to activate the webhook.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"name":"postV2UsersMeWebhooks","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2UsersMeWebhooks"}}],"responses":{"201":{"description":"Create me webhook"}},"tags":["webhooks"],"operationId":"postV2UsersMeWebhooks"}},"/v2/users/{user_id}":{"get":{"summary":"Get user","description":"Returns the user with the given ID.\n","produces":["application/json"],"parameters":[{"in":"path","name":"user_id","description":"User ID","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"A user","schema":{"type":"object","properties":{"user":{"$ref":"#/definitions/User"}}}},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["users"],"operationId":"getV2UsersUserId"}},"/v2/users/{user_id}/time_entries":{"post":{"summary":"Create time entry","description":"Creates a new time entry.\n\nReturns {success: true} on success.\n\nNote: Manual time entries that require approval cannot be added through the API.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"user_id","type":"integer","format":"int32","required":true},{"name":"postV2UsersUserIdTimeEntries","in":"body","required":true,"schema":{"$ref":"#/definitions/postV2UsersUserIdTimeEntries"}}],"responses":{"201":{"description":"Time entry created"},"400":{"description":"Invalid parameters","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"403":{"description":"API access is only for organizations on an active plan","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"404":{"description":"Could not find record","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}},"429":{"description":"Rate limit exceeded","schema":{"$ref":"#/definitions/Hubstaff_Public_V2_Entities_Error"}}},"tags":["time_entries"],"operationId":"postV2UsersUserIdTimeEntries"}},"/v2/webhooks/{webhook_id}":{"get":{"summary":"Get webhook","description":"Returns the details of a specific webhook including its status, events, and target URL.","produces":["application/json"],"parameters":[{"in":"path","name":"webhook_id","description":"Webhook ID","type":"string","required":true}],"responses":{"200":{"description":"Get webhook"}},"tags":["webhooks"],"operationId":"getV2WebhooksWebhookId"},"delete":{"summary":"Delete webhook","description":"Permanently deletes a webhook. The webhook will stop receiving events immediately.","produces":["application/json"],"parameters":[{"in":"path","name":"webhook_id","description":"Webhook ID","type":"string","required":true}],"responses":{"204":{"description":"Delete webhook"}},"tags":["webhooks"],"operationId":"deleteV2WebhooksWebhookId"}},"/v2/webhooks/{webhook_id}/activate":{"post":{"summary":"Activate webhook","description":"Activates a webhook after endpoint verification.\n\nYou must include the `X-Hook-Secret` header with the secret value you received during the verification step.\n\nOnce activated, the webhook will start receiving events.\n","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"webhook_id","description":"Webhook ID","type":"string","required":true}],"responses":{"201":{"description":"Activate webhook"}},"tags":["webhooks"],"operationId":"postV2WebhooksWebhookIdActivate"}}},"definitions":{"putV2AttendanceSchedulesAttendanceScheduleId":{"type":"object","properties":{"start_date":{"type":"string","format":"date","description":"Attendance Schedule Start Date"},"start_time":{"type":"string","description":"Attendance Schedule Start Time, 24 hour time in 30 minutes intervals (h:mm)"},"use_time_zone":{"type":"string","description":"What time zone to use","enum":["organization","user"]},"duration":{"type":"integer","format":"int32","description":"Shift duration in seconds","minimum":1800,"maximum":86400},"minimum_time":{"type":"integer","format":"int32","description":"Minimum shift time in seconds"},"repeat_schedule":{"type":"string","description":"Shift repetition schedule","enum":["never","weekly","bi_weekly"]},"repeat_until":{"type":"string","format":"date","description":"Shift end date"},"weekdays":{"type":"array","description":"Shift repetition week days","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"excluded_dates":{"type":"array","description":"Excluded dates from the repetition schedule","items":{"type":"string","format":"date"}},"add_excluded_dates":{"type":"array","description":"Excluded dates to add","items":{"type":"string","format":"date"}},"remove_excluded_dates":{"type":"array","description":"Excluded dates to remove","items":{"type":"string","format":"date"}}},"description":"Update attendance schedule"},"AttendanceSchedule":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Attendance schedule ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"start_date":{"type":"string","format":"date","description":"Shift start date"},"use_time_zone":{"type":"string","description":"What time zone to use"},"start_time":{"type":"string","format":"date-time","description":"Shift start time (only hh:mm:ss"},"duration":{"type":"integer","format":"int32","description":"Shift duration"},"minimum_time":{"type":"integer","format":"int32","description":"Minimum shift time"},"repeat_schedule":{"type":"string","description":"Shift repetition schedule"},"repeat_until":{"type":"string","format":"date","description":"Shift end date"},"weekdays":{"type":"array","items":{"type":"string"},"description":"Shift repetition week days"},"excluded_dates":{"type":"array","items":{"type":"string","format":"date"},"description":"Excluded dates from the repetition schedule"}},"required":["id","user_id","organization_id","created_at","updated_at","start_date","use_time_zone","start_time","duration","minimum_time","repeat_schedule"],"description":"AttendanceSchedule model"},"Hubstaff_Public_V2_Entities_Error":{"type":"object","properties":{"code":{"type":"string","description":"Legacy string error code for backward compatibility"},"error_code":{"type":"integer","format":"int32","description":"Numeric error code for i18n/programmatic handling. Ranges: 10000-10999 (Auth), 11000-11999 (Validation), 12000-12999 (Resource), 13000-13999 (Rate Limit), 14000-14999 (Time Entry/Activity), 15000-15999 (System). See GET /v2/error_codes for full reference."},"error":{"type":"string","description":"Human-readable error message"},"details":{"type":"array","items":{"type":"string"},"description":"Per-attribute validation errors: [{attribute, error}]. Present on validation failures."}},"required":["code","error"],"description":"Hubstaff_Public_V2_Entities_Error model"},"BudgetHistory":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"the budget history ID"},"project_id":{"type":"integer","format":"int64","description":"The project ID the budget is for"},"client_id":{"type":"integer","format":"int64","description":"The client ID the budget is for"},"budget":{"$ref":"#/definitions/Budget"},"start_date":{"type":"string","format":"date","description":"The start date of the budget"},"stop_date":{"type":"string","format":"date","description":"The stop date of the budget"},"spent":{"type":"number","format":"float","description":"The amount spent. Either cost or hours depending on the budget type"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","budget","spent","created_at","updated_at"],"description":"BudgetHistory model"},"Budget":{"type":"object","properties":{"type":{"type":"string","description":"The budget type"},"rate":{"type":"string","description":"The budget rate type"},"cost":{"type":"number","format":"float","description":"The budget cost limit"},"hours":{"type":"number","format":"float","description":"The budget hours limit"},"start_date":{"type":"string","format":"date","description":"The budget start date"},"alerts":{"type":"object","properties":{"near_limit":{"type":"integer","format":"int32","description":"The budget near limit percentage"},"notify_enabled":{"type":"boolean","description":"Whether budget notifications are enabled"},"notify_all_members":{"type":"boolean","description":"Whether to notify all project members"},"notify_group":{"type":"string","description":"The group to notify"}},"required":["near_limit","notify_enabled","notify_all_members"]},"recurrence":{"type":"string","description":"The budget recurrence frequency"},"recurrence_start":{"type":"integer","format":"int32","description":"Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence"},"include_non_billable":{"type":"boolean","description":"Whether the budget includes non-billable time"},"stop_timer_when_budget_reached":{"type":"boolean","description":"Whether to stop timers when budget is reached"},"stop_at":{"type":"integer","format":"int32","description":"The budget percentage at which timers stop"}},"required":["type","alerts","include_non_billable","stop_timer_when_budget_reached"]},"Client":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Client ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"name":{"type":"string","description":"Client Name"},"emails":{"type":"array","items":{"type":"string"},"description":"Emails to default send invoices to"},"phone":{"type":"string","description":"Phone Number"},"address":{"type":"string","description":"Address"},"project_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"List of projects"},"inherit_invoice_notes":{"type":"boolean","description":"True if the organizations invoice notes will be used"},"invoice_notes":{"type":"string","description":"Notes (Shown on invoices)"},"inherit_net_terms":{"type":"boolean","description":"True if the organizations net terms will be used"},"net_terms":{"type":"string","description":"Amount of days the invoice must be paid once created"},"status":{"type":"string","description":"Client status"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"budget":{"$ref":"#/definitions/Budget"},"metadata":{"type":"object","description":"Metadata attached to the client"}},"required":["id","organization_id","name","emails","phone","address","project_ids","status","created_at","updated_at","metadata"],"description":"Client model"},"putV2ClientsClientId":{"type":"object","properties":{"name":{"type":"string","description":"The new name of the client"},"emails":{"type":"array","description":"The new emails for the client","items":{"type":"string"}},"phone":{"type":"string","description":"Client phone number"},"address":{"type":"string","description":"Client address"},"project_ids":{"type":"array","description":"Client projects","items":{"type":"integer","format":"int32"}},"invoice_notes":{"type":"string","description":"Notes (Shown on invoices)"},"net_terms":{"type":"integer","format":"int32","description":"Amount of days the invoice must be paid once created"},"status":{"type":"string","description":"Client status.","enum":["active","archived"]},"metadata":{"type":"array","description":"Client metadata. See the update_metadata endpoint","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}},"budget":{"type":"object","description":"Budget configuration","properties":{"type":{"type":"string","description":"The method for controlling the budget","enum":["cost","hours"]},"rate":{"type":"string","description":"When budget type is cost, specifies which rate to use.","enum":["bill_rate","pay_rate"],"default":"bill_rate"},"cost":{"type":"number","format":"float","description":"When budget type is cost. defines the cost limit."},"hours":{"type":"number","format":"float","description":"When budget type is hours. defines the hours limit."},"start_date":{"type":"string","format":"date","description":"The start date for the budget."},"recurrence":{"type":"string","description":"If given, makes budget reset on a weekly or monthly basis","enum":["weekly","monthly"]},"recurrence_start":{"type":"integer","format":"int32","description":"Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence"},"include_non_billable":{"type":"boolean","description":"Whether the budget includes non billable time","default":true},"stop_timer_when_budget_reached":{"type":"boolean","description":"Whether to stop timers when budget limit is reached"},"stop_at":{"type":"integer","format":"int32","description":"The budget percentage at which timers stop automatically"},"alerts":{"type":"object","properties":{"near_limit":{"type":"integer","format":"int32","description":"The percentage threshold for notifying when approaching the budget."},"notify_enabled":{"type":"boolean","description":"Whether budget notifications are enabled"},"notify_all_members":{"type":"boolean","description":"Whether to notify all project members"},"notify_group":{"type":"string","description":"The group to notify","enum":["all_members","org_management"]}}}},"required":["type","stop_at"]}},"description":"Update client"},"putV2ClientsClientIdUpdateMetadata":{"type":"object","properties":{"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["metadata"],"description":"Update client metadata"},"SmartNotificationRule":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Smart notification rule ID"},"name":{"type":"string","description":"Smart notification rule name"},"enabled":{"type":"boolean","description":"Indicates whether the smart notification rule is enabled"},"frequency":{"type":"string","enum":["hourly","daily","weekly","monthly"],"description":"Determines how often the conditions for notifications are checked"},"metric_type":{"type":"string","enum":["work_time","core_time","non_core_time","unproductive_time","activity","suspicious_activity","unusual_activity","time_spent_in_tool","idle_time","idle_time_percent","manual_time","manual_time_percent","geo_ip_changes","users_per_ip","geo_ip_list_match"],"description":"Metric type to be monitored"},"condition":{"type":"string","enum":["above","below"],"description":"Comparison condition for triggering the notification"},"condition_value":{"type":"number","format":"float","description":"Rule threshold value (in seconds if metric type is work_time or time_spent_in_tool)"},"time_unit":{"type":"string","enum":["per_hour","per_day","per_week","per_month"],"description":"Duration of time over which the rule is evaluated. It specifies the length of the observation period"},"target":{"type":"object","description":"Who will be monitored by the rule"},"recipients":{"type":"object","description":"Who will receive the notifications when the rule conditions are met"},"deliver_by":{"type":"array","items":{"type":"string","enum":["email","slack","insights"]},"description":"List of delivery methods for sending notifications. By default, `insights` is always included"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","name","enabled","frequency","metric_type","condition","condition_value","target","recipients","deliver_by","created_at","updated_at"],"description":"SmartNotificationRule model"},"putV2InsightsSmartNotificationRulesRuleId":{"type":"object","properties":{"name":{"type":"string","description":"Rule name"},"frequency":{"type":"string","description":"Determines how often the conditions for notifications are checked","enum":["hourly","daily","weekly","monthly"]},"metric_type":{"type":"string","description":"Metric type to be monitored","enum":["work_time","core_time","non_core_time","unproductive_time","activity","suspicious_activity","unusual_activity","time_spent_in_tool","idle_time","idle_time_percent","manual_time","manual_time_percent","geo_ip_changes","users_per_ip","geo_ip_list_match"]},"condition":{"type":"string","description":"Rule condition","enum":["above","below"]},"condition_value":{"type":"number","format":"float","description":"Rule threshold value (in seconds if metric type is work_timeor time_spent_in_tool)"},"target":{"type":"object","properties":{"all_members":{"type":"boolean","description":"Monitor all members","default":false},"team_ids":{"type":"array","description":"Monitor specific teams","items":{"type":"integer","format":"int32"}},"user_ids":{"type":"array","description":"Monitor specific users","items":{"type":"integer","format":"int32"}}}},"recipients":{"type":"object","description":"Who will receive the notifications","properties":{"roles":{"type":"array","description":"The recipient roles (e.g., [\"owner\"])","items":{"type":"string"}},"user_ids":{"type":"array","description":"The recipient members","items":{"type":"integer","format":"int32"}}}},"deliver_by":{"type":"array","description":"List of delivery methods for sending notifications","items":{"type":"string","enum":["email","slack","insights"]}},"time_unit":{"type":"string","description":"Duration of time over which the rule is evaluated","enum":["per_hour","per_day","per_week","per_month"]}},"description":"Update smart notification rule"},"patchV2InsightsSmartNotificationRulesRuleIdToggleStatus":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Specifies the new status of the smart notification rule (true for enabled, false for disabled)"}},"required":["enabled"],"description":"Toggle smart notification rule"},"IntegrationProjectLink":{"type":"object","properties":{"project_id":{"type":"integer","format":"int64","description":"Project ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"remote_id":{"type":"string","description":"Integration remote ID"},"remote_alternate_id":{"type":"string","description":"Integration remote alternate ID"},"status":{"type":"string","description":"Status"},"disabled_reason":{"type":"string","description":"Disabled reason"},"integration_id":{"type":"integer","format":"int64","description":"Integration ID"},"integration_type":{"type":"string","description":"Integration type"},"integration_name":{"type":"string","description":"Integration name"},"integration_status":{"type":"string","description":"Integration status"},"integration_disabled_reason":{"type":"string","description":"Disabled reason"}},"required":["project_id","created_at","updated_at","remote_id","remote_alternate_id","status","integration_id","integration_type","integration_name","integration_status"],"description":"IntegrationProjectLink model"},"IntegrationUserLink":{"type":"object","properties":{"user_id":{"type":"integer","format":"int64","description":"User ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"remote_id":{"type":"string","description":"Integration remote ID"},"status":{"type":"string","description":"Status"},"connected":{"type":"boolean","description":"True if the user has authenticated with the remote system"},"disabled_reason":{"type":"string","description":"Disabled reason"},"integration_id":{"type":"integer","format":"int64","description":"Integration ID"},"integration_type":{"type":"string","description":"Integration type"},"integration_name":{"type":"string","description":"Integration name"},"integration_status":{"type":"string","description":"Integration status"},"integration_disabled_reason":{"type":"string","description":"Disabled reason"}},"required":["user_id","created_at","updated_at","remote_id","status","connected","integration_id","integration_type","integration_name","integration_status"],"description":"IntegrationUserLink model"},"Task":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Task id"},"integration_id":{"type":"integer","format":"int64","description":"Integration ID"},"status":{"type":"string","description":"Task status"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"project_type":{"type":"string","description":"Project type"},"summary":{"type":"string","description":"Task summary"},"details":{"type":"string","description":"Task details"},"remote_id":{"type":"string","description":"Remote ID of the task in the external system"},"remote_alternate_id":{"type":"string","description":"Alternate Remote ID of the task in the external system"},"lock_version":{"type":"integer","format":"int32","description":"lock version"},"assignee_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Assignee user IDs for this task"},"pay_rate":{"type":"number","format":"float","description":"Task pay rate"},"bill_rate":{"type":"number","format":"float","description":"Task bill rate"},"metadata":{"type":"object","description":"Metadata attached to the task"},"completed_at":{"type":"string","format":"date-time","description":"Date and time task was completed"},"due_at":{"type":"string","format":"date-time","description":"Date and time task is due"},"created_at":{"type":"string","format":"date-time","description":"Date and time task was created"},"updated_at":{"type":"string","format":"date-time","description":"Date and time task was last updated"},"global_todo_id":{"type":"integer","format":"int64","description":"Global To-Do ID"}},"required":["id","status","project_id","project_type","summary","assignee_ids","metadata","created_at","updated_at"],"description":"Task model"},"InviteLink":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Invite link ID"},"name":{"type":"string","description":"Invite link name"},"url":{"type":"string","format":"uri","description":"Shareable invite URL"},"role":{"type":"string","description":"The role users joining via the link will be added as (project_user or project_viewer). Null when no role is assigned (legacy links)"},"status":{"type":"string","description":"Invite link status (active, disabled or expired). The expiry cause is derivable from expires_on and use_cap/used_count"},"enabled":{"type":"boolean","description":"Whether the link is enabled"},"deletable":{"type":"boolean","description":"Whether the link can be deleted (false for the organization's default link)"},"expires_on":{"type":"string","format":"date","description":"Expiration date (null means the link never expires)"},"use_cap":{"type":"integer","format":"int32","description":"Maximum number of joins allowed (null means unlimited)"},"used_count":{"type":"integer","format":"int32","description":"Number of users who joined via the link"},"project_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Projects users are added to when joining via the link"},"team_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Teams users are added to when joining via the link"},"pay_rate":{"type":"string","description":"Pay rate assigned to users joining via the link"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","name","url","role","status","enabled","deletable","expires_on","use_cap","used_count","project_ids","team_ids","created_at","updated_at"],"description":"InviteLink model"},"putV2InviteLinksInviteLinkId":{"type":"object","properties":{"name":{"type":"string","description":"The invite link name (unique per organization)"},"role":{"type":"string","description":"The role users joining via the link will be added as","enum":["project_user","project_viewer"]},"expires_on":{"type":"string","format":"date","description":"Expiration date"},"use_cap":{"type":"integer","format":"int32","description":"Maximum number of joins allowed"},"project_ids":{"type":"array","description":"List of project IDs users are added to when joining via the link","items":{"type":"integer","format":"int32"}},"team_ids":{"type":"array","description":"List of team IDs users are added to when joining via the link","items":{"type":"integer","format":"int32"}},"pay_rate":{"type":"number","format":"float","description":"A pay rate to set for users joining via the link"},"enabled":{"type":"boolean","description":"Whether the link is enabled"}},"description":"Update invite link"},"Invite":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Invite ID"},"email":{"type":"string","description":"Invite email"},"invited_by_id":{"type":"integer","format":"int64","description":"User ID for who created the invite"},"pay_rate":{"type":"string","description":"Pay rate"},"project_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Projects to add the user to once invite is accepted"},"role":{"type":"string","description":"The role they will be added as once accepted"},"status":{"type":"string","description":"Invite status"},"accepted_at":{"type":"string","format":"date-time","description":"When the invite was accepted"},"trackable":{"type":"boolean","description":"Whether the user can track time"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","email","invited_by_id","project_ids","role","status","created_at","updated_at"],"description":"Invite model"},"putV2InvitesInviteId":{"type":"object","properties":{"role":{"type":"string","description":"The role to invite the user as","enum":["organization_manager","project_manager","project_user","project_viewer"]},"pay_rate":{"type":"number","format":"float","description":"A pay rate to set for the user"},"project_ids":{"type":"array","description":"List of project IDs to add the user to after they accept the invite","items":{"type":"integer","format":"int32"}},"trackable":{"type":"boolean","description":"Whether the user can track time"}},"description":"Update invite"},"JobSite":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Job Site ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"name":{"type":"string","description":"Job site name"},"status":{"type":"string","description":"Job site status"},"address":{"type":"string","description":"Job site address"},"latitude":{"type":"number","description":"Job site latitude"},"longitude":{"type":"number","description":"Job site longitude"},"radius":{"type":"integer","format":"int32","description":"Job site radius"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"last_visited_at":{"type":"string","format":"date-time","description":"Last visit time"},"rules":{"$ref":"#/definitions/JobSiteRule"}},"required":["id","organization_id","name","status","address","latitude","longitude","radius","created_at","updated_at","last_visited_at"],"description":"JobSite model"},"JobSiteRule":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Job Site Rule ID"},"enter_action":{"type":"string","description":"The enter action"},"exit_action":{"type":"string","description":"The exit action"},"user_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"List of user IDs to set for this rule"},"team_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"List of team IDs to set for this rule"},"start_project_id":{"type":"integer","format":"int64","description":"Project ID to auto start when enter_action is set to track"},"start_task_id":{"type":"integer","format":"int64","description":"Project ID to auto start when enter_action is set to track"}},"required":["id","enter_action","exit_action","user_ids","team_ids"]},"putV2JobSitesJobSiteId":{"type":"object","properties":{"name":{"type":"string","description":"Updated job site name"},"address":{"type":"string","description":"Updated job site address"},"latitude":{"type":"number","format":"double","description":"Updated job site longitude"},"longitude":{"type":"number","format":"double","description":"Updated job site latitude"},"radius":{"type":"integer","format":"int32","description":"Updated job site radius","minimum":50,"maximum":3000},"status":{"type":"string","description":"The job site status.","enum":["active","archived"]}},"description":"Update job site"},"putV2JobSitesJobSiteIdUpdateRules":{"type":"object","properties":{"rules":{"type":"array","description":"A set of rule updates","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The rule ID number"},"enter_action":{"type":"string","description":"The enter action","enum":["none","track","notify"]},"exit_action":{"type":"string","description":"The exit action","enum":["none","track","notify"]},"user_ids":{"type":"array","description":"List of user IDs to set for this rule (replaces other users)","items":{"type":"integer","format":"int32"}},"add_user_ids":{"type":"array","description":"List of user IDs to add to this rule","items":{"type":"integer","format":"int32"}},"remove_user_ids":{"type":"array","description":"List of user IDs to remove from this rule","items":{"type":"integer","format":"int32"}},"team_ids":{"type":"array","description":"List of team IDs to set for this rule (replaces other teams)","items":{"type":"integer","format":"int32"}},"add_team_ids":{"type":"array","description":"List of team IDs to add to this rule","items":{"type":"integer","format":"int32"}},"remove_team_ids":{"type":"array","description":"List of team IDs to remove from this rule","items":{"type":"integer","format":"int32"}},"start_project_id":{"type":"integer","format":"int32","description":"Project ID to auto start when enter_action is set to track, or none to clear\n"}},"required":["id"]}}},"required":["rules"],"description":"Update job site rules"},"putV2JobSitesJobSiteIdAddRules":{"type":"object","properties":{"rules":{"type":"array","description":"A rule configuration","items":{"type":"object","properties":{"enter_action":{"type":"string","description":"The enter action","enum":["none","track","notify"],"default":"none"},"exit_action":{"type":"string","description":"The exit action","enum":["none","track","notify"],"default":"none"},"user_ids":{"type":"array","description":"List of user IDs to set for this rule","items":{"type":"integer","format":"int32"}},"team_ids":{"type":"array","description":"List of team IDs to set for this rule","items":{"type":"integer","format":"int32"}},"start_project_id":{"type":"integer","format":"int32","description":"Project ID to auto start when enter_action is set to track"}}}}},"required":["rules"],"description":"Add job site rules"},"putV2JobSitesJobSiteIdRemoveRules":{"type":"object","properties":{"rule_ids":{"type":"array","description":"The rule ids to remove","items":{"type":"integer","format":"int32"}}},"required":["rule_ids"],"description":"Remove job site rules"},"LimitHistory":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"the limit history ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"limit_type":{"type":"string","description":"The type of limit history"},"start_date":{"type":"string","format":"date","description":"The start date of limit history"},"stop_date":{"type":"string","format":"date","description":"The end date of limit history"},"start_time":{"type":"string","format":"date-time","description":"The start time of limit history"},"stop_time":{"type":"string","format":"date-time","description":"The end time of limit history"},"total":{"type":"integer","format":"int32","description":"How much time is allowed to track (seconds)"},"used":{"type":"integer","format":"int32","description":"How much time is tracked (seconds)"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","user_id","limit_type","start_date","stop_date","start_time","stop_time","total","created_at","updated_at"],"description":"LimitHistory model"},"ManualTimeRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Manual time request ID"},"member_id":{"type":"integer","format":"int64","description":"Member (user) ID who submitted the request"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID if associated with a task"},"start_time":{"type":"string","format":"date-time","description":"Start time of the manual time entry"},"stop_time":{"type":"string","format":"date-time","description":"Stop time of the manual time entry"},"submitted_at":{"type":"string","format":"date-time","description":"When the request was submitted"},"approved_at":{"type":"string","format":"date-time","description":"When the request was approved"},"denied_at":{"type":"string","format":"date-time","description":"When the request was denied"},"duration_seconds":{"type":"integer","format":"int32","description":"Duration in seconds"},"notes":{"type":"string","description":"Notes for the time entry"},"status":{"type":"string","description":"Status: submitted, approved, or denied"},"reviewer_id":{"type":"integer","format":"int64","description":"ID of user who approved or denied (approved_by when approved, denied_by when denied)"},"denial_reason":{"type":"string","description":"Reason for denial (only present when status is denied)"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"date":{"type":"string","format":"date","description":"Calendar date (org tz) from start_time. The list date[] filter is overlap on starts/stops (in_range)."},"billable":{"type":"boolean","description":"Whether the time is billable"},"reason_to_submit":{"type":"string","description":"Reason the manual time was submitted"},"submitted_by_id":{"type":"integer","format":"int64","description":"User ID who submitted the request"},"approved_by_id":{"type":"integer","format":"int64","description":"User ID who approved the request"},"denied_by_id":{"type":"integer","format":"int64","description":"User ID who denied the request"},"attachment_original_filename":{"type":"string","description":"Original filename of attachment if present"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","member_id","project_id","start_time","stop_time","submitted_at","duration_seconds","status","organization_id","date","billable","reason_to_submit","submitted_by_id","created_at","updated_at"],"description":"ManualTimeRequest model"},"putV2ManualTimeRequestsManualTimeRequestIdStatus":{"type":"object","properties":{"status":{"type":"string","description":"New status for the request: approved or denied.","enum":["approved","denied"]},"denial_reason":{"type":"string","description":"Required when status is denied. Reason recorded on the request."},"accept_collisions":{"type":"boolean","description":"Confirm approval when the request overlaps existing time the approver is authorized to override. Covers ordinary tracked-time collisions and associated data within role permissions: unprocessed paid time, client invoices, user invoices, timesheets, and integration-synced time. May remove time from unprocessed payments and leave invoices or integrations out of sync.","default":false},"allow_above_project_budget":{"type":"boolean","description":"Allow approval when the created activity would exceed the project budget only.","default":false},"discard_exceeding_hours":{"type":"boolean","description":"Approve only time within member limits. Cannot be combined with increase_limit.","default":false},"increase_limit":{"type":"boolean","description":"Automatically increase exceeded daily and weekly member limits. Organization owners and managers only.","default":false}},"required":["status"],"description":"Update manual time request status"},"Note":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Note ID"},"date":{"type":"string","format":"date","description":"Organization date"},"time_slot":{"type":"string","format":"date-time","description":"Time slot"},"recorded_at":{"type":"string","format":"date-time","description":"Date and time note was recorded in the time slot"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"note":{"type":"string","description":"Note description"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID"}},"required":["id","date","time_slot","recorded_at","created_at","updated_at","note","user_id","project_id","task_id"],"description":"Note model"},"postV2Organizations":{"type":"object","properties":{"name":{"type":"string","description":"The organization name"},"addons":{"type":"array","description":"A set of addons to enable on the organization","items":{"type":"string","enum":["timesheet_approvals","monitor_user_activity","team_payments","invoices","projects","work_orders","location_tracking","job_sites","attendance_schedules","time_off","achievements","teams","track_profitability","expenses","work_breaks","insights","embedded_tasks","retention","corporate_app","more_screenshots"]}},"industry":{"type":"string","description":"The industry to associate with the organization","default":"Other"}},"required":["name"],"description":"Create organization"},"Organization":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Organization ID"},"name":{"type":"string","description":"Organization name"},"status":{"type":"string","description":"Organization status"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"member_profile_fields":{"type":"array","items":{"$ref":"#/definitions/MemberProfileFields"}},"metadata":{"type":"object","description":"Metadata attached to the organization"},"invite_url":{"type":"string","format":"uri","description":"Invite URL"}},"required":["id","name","status","created_at","updated_at","member_profile_fields","metadata","invite_url"],"description":"Organization model"},"MemberProfileFields":{"type":"object","properties":{"key":{"type":"string","description":"The identifier for the custom field. This is used on the organization members endpoint."},"type":{"type":"string","description":"The type of the custom field"},"title":{"type":"string","description":"The label for the custom field"},"created_on":{"type":"string","format":"date","description":"When the custom field was created"},"created_by_id":{"type":"integer","format":"int64","description":"User ID who created the custom field"}},"required":["key","type","title","created_on","created_by_id"]},"putV2OrganizationsOrganizationIdUpdateMembers":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"User ID"},"role":{"type":"string","description":"Role for the user.","enum":["user","manager","owner","remove"]},"trackable":{"type":"boolean"},"view_only":{"type":"boolean","description":"View-only member flag."},"first_name":{"type":"string"},"last_name":{"type":"string"},"payment":{"type":"object","properties":{"rate_type":{"type":"string","enum":["hourly","fixed_amount"]},"pay_rate":{"type":"number","format":"float","description":"A pay rate to set for the user, used for 'hourly' or 'fixed_amount' rate_types"},"pay_period":{"type":"string","description":"A pay period to set for the user. Required if timesheet_approval is true","enum":["none","weekly","twice_per_month","biweekly","monthly"]},"timesheet_approval":{"type":"boolean","description":"Require timesheet approval for the user"},"period_week_day":{"type":"integer","format":"int32","description":"When pay_period is set: day of the week when the pay period starts (0 Monday through 6 Sunday). Required for weekly or biweekly pay periods when the organization uses custom pay period dates.","minimum":0,"maximum":6},"period_start_day":{"type":"integer","format":"int32","description":"When pay_period is set: day of the month when the pay period starts. Required for monthly or twice_per_month pay periods when the organization uses custom pay period dates.","minimum":1,"maximum":31},"period_second_start_day":{"type":"integer","format":"int32","description":"When pay_period is set: day of the month when the second period starts for twice_per_month (31 = last day of the month). Required for that pay period when the organization uses custom pay period dates.","minimum":1,"maximum":31},"period_anchor_date":{"type":"string","format":"date","description":"When pay_period is set: anchor date for biweekly periods when the organization uses custom pay period dates."}}},"limits":{"type":"object","properties":{"limits_by_shifts":{"type":"boolean"},"daily_limit":{"type":"number","format":"float","description":"The daily limit, number of hours"},"weekly_limit":{"type":"number","format":"float","description":"The weekly limit, number of hours"},"expected_per_week":{"type":"number","format":"float","description":"The expected weekly limit, number of hours"},"current_daily_limit":{"type":"number","format":"float","description":"Overrides the daily limit for today"},"current_weekly_limit":{"type":"number","format":"float","description":"Overrides the weekly limit for this week"},"dow_limit":{"type":"array","description":"The days when member is allowed to track time","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"dow_expected":{"type":"array","description":"The days when member is expected to track time","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}}},"metadata":{"type":"array","description":"Member metadata. See the update_members endpoint for further details","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":"integer","format":"int32","description":"Project ID"},"role":{"type":"string","description":"User role in project","enum":["viewer","user","manager","remove"]}},"required":["project_id","role"]}}},"required":["user_id"]}}},"required":["members"],"description":"Update organization members"},"putV2OrganizationsOrganizationIdUpdateMetadata":{"type":"object","properties":{"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["metadata"],"description":"Update organization metadata"},"Activity":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Activity ID"},"date":{"type":"string","format":"date","description":"Organization date"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"time_slot":{"type":"string","format":"date-time","description":"Time slot"},"starts_at":{"type":"string","format":"date-time","description":"Date and time tracking was started within time slot"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID"},"keyboard":{"type":"integer","format":"int32","description":"The amount of time the keyboard was active within the time worked in seconds"},"mouse":{"type":"integer","format":"int32","description":"The amount of time the mouse was active within the time worked in seconds"},"overall":{"type":"integer","format":"int32","description":"The amount of time the keyboard or mouse was active within the time worked in seconds"},"tracked":{"type":"integer","format":"int32","description":"Total time worked in seconds"},"input_tracked":{"type":"integer","format":"int32","description":"Total time worked in seconds with input tracking enabled (keyboard, mouse)"},"tracks_input":{"type":"boolean","description":"Whether the source can and had input tracking enabled activities (keyboard, mouse)"},"location_type":{"type":"string","description":"Remote vs in-office status: unknown, remote, or on_site"},"billable":{"type":"boolean","description":"Whether the time is billable"},"paid":{"type":"boolean","description":"Whether the time has been marked paid"},"client_invoiced":{"type":"boolean","description":"Whether the time has been invoiced to a client"},"team_invoiced":{"type":"boolean","description":"Whether the time has been invoiced for a team member"},"immutable":{"type":"boolean","description":"Whether the time is locked"},"timesheet_id":{"type":"integer","format":"int64","description":"The timesheet for this activity"},"timesheet_locked":{"type":"boolean","description":"Whether the timesheet is locking this activity"},"time_type":{"type":"string","description":"The type of activity this is"},"client":{"type":"string","description":"Which client the activity originated from"}},"required":["id","date","created_at","updated_at","time_slot","starts_at","user_id","project_id","task_id","keyboard","mouse","overall","tracked","input_tracked","tracks_input","location_type","billable","paid","client_invoiced","team_invoiced","immutable","time_type","client"],"description":"Activity model"},"AppAndUrlTrackingSetting":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"The member user ID"},"app_and_url_tracking":{"type":"string","description":"Track Apps \u0026 URLs setting: off, apps, or apps_and_urls"}},"required":["user_id","app_and_url_tracking"],"description":"AppAndUrlTrackingSetting model"},"putV2OrganizationsOrganizationIdAppAndUrlTrackingSettings":{"type":"object","properties":{"app_and_url_tracking":{"type":"string","description":"Track Apps \u0026 URLs setting: off, apps, or apps_and_urls","enum":["off","apps","apps_and_urls"]},"user_ids":{"type":"array","description":"Members to update. Mutually exclusive with apply_to_all_members.","items":{"type":"integer","format":"int32"}},"apply_to_all_members":{"type":"boolean","description":"Set to true to change the organization-wide default for all current and future members. Mutually exclusive with user_ids.","enum":[true]}},"required":["app_and_url_tracking"],"description":"Update member Track Apps \u0026 URLs settings"},"postV2OrganizationsOrganizationIdAttendanceSchedules":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"User ID"},"start_date":{"type":"string","format":"date","description":"Attendance Schedule Start Date"},"start_time":{"type":"string","description":"Attendance Schedule Start Time, 24 hour time in 30 minutes intervals (h:mm)"},"duration":{"type":"integer","format":"int32","description":"Shift duration in seconds","minimum":1800,"maximum":86400},"minimum_time":{"type":"integer","format":"int32","description":"Minimum shift time in seconds"},"use_time_zone":{"type":"string","description":"What time zone to use","enum":["organization","user"]},"repeat_schedule":{"type":"string","description":"Shift repetition schedule","enum":["never","weekly","bi_weekly"],"default":"never"},"weekdays":{"type":"array","description":"Shift repetition week days","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}},"repeat_until":{"type":"string","format":"date","description":"Shift end date"},"excluded_dates":{"type":"array","description":"Excluded dates from the repetition schedule","items":{"type":"string","format":"date"}}},"required":["user_id","start_date","start_time","duration","minimum_time","use_time_zone","repeat_schedule"],"description":"Create attendance schedule"},"AttendanceShift":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Attendance shift ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"attendance_schedule_id":{"type":"integer","format":"int64","description":"Attendance schedule ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"date":{"type":"string","format":"date","description":"Shift date"},"start_time":{"type":"string","format":"date-time","description":"Shift start time"},"duration":{"type":"integer","format":"int32","description":"Shift duration"},"minimum_time":{"type":"integer","format":"int32","description":"Minimum shift time"},"status":{"type":"string","description":"Shift status"},"actual_start_time":{"type":"string","format":"date-time","description":"Actual shift start time"},"actual_stop_time":{"type":"string","format":"date-time","description":"Actual shift stop time"},"actual_duration":{"type":"integer","format":"int32","description":"Shift actual duration"}},"required":["id","user_id","organization_id","attendance_schedule_id","created_at","updated_at","date","start_time","duration","minimum_time","status","actual_start_time","actual_stop_time","actual_duration"],"description":"AttendanceShift model"},"OrganizationAuditLogEntry":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Audit log entry ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"subject_user_id":{"type":"integer","format":"int64","description":"Subject user ID (may be null)"},"action":{"type":"string","description":"The event action (e.g. location_changed)"},"record_type":{"type":"string","description":"Record type the action was applied to"},"record_id":{"type":"integer","format":"int64","description":"Record ID the action was applied to"},"user_id":{"type":"integer","format":"int64","description":"Actor user ID (may be null for system-initiated changes)"},"ip":{"type":"string","description":"IP address recorded with the event"},"details":{"type":"object","description":"Action-specific details, whitelisted per action"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","organization_id","subject_user_id","action","record_type","record_id","user_id","ip","details","created_at","updated_at"],"description":"OrganizationAuditLogEntry model"},"ClientInvoice":{"type":"object","properties":{"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"status":{"type":"string","description":"Invoice status"},"author_id":{"type":"integer","format":"int64","description":"The user who created the invoice"},"number":{"type":"string","description":"Invoice number"},"po_number":{"type":"string","description":"Invoice PO number"},"notes":{"type":"string","description":"Invoice notes"},"currency":{"type":"string","description":"Invoice currency"},"grand_total":{"type":"number","format":"float","description":"Grand total"},"paid_amount":{"type":"number","format":"float","description":"Amount paid"},"tax_1":{"type":"number","format":"float","description":"Tax 1 percentage to apply to sub total for enabled line items"},"tax_2":{"type":"number","format":"float","description":"Tax 2 percentage to apply to sub total for enabled line items"},"discount":{"type":"number","format":"float","description":"Discount percentage to apply to before taxes for enabled line items"},"issue_date":{"type":"string","format":"date","description":"Invoice issue date"},"due_date":{"type":"string","format":"date","description":"Invoice due date"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"line_items":{"type":"array","items":{"$ref":"#/definitions/InvoiceLineItem"},"description":"List of invoice line items"},"viewer_url":{"type":"string","format":"uri","description":"View only URL"},"id":{"type":"integer","format":"int64","description":"Client invoice ID"},"client_id":{"type":"integer","format":"int64","description":"Client ID this invoice is for"}},"required":["organization_id","status","author_id","number","po_number","notes","currency","grand_total","paid_amount","issue_date","created_at","updated_at","viewer_url","id","client_id"],"description":"ClientInvoice model"},"InvoiceLineItem":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Invoice item id"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"description":{"type":"string","description":"Item description"},"quantity":{"type":"number","format":"float","description":"Item quantity"},"unit_price":{"type":"number","format":"float","description":"Item price"},"generated":{"type":"boolean","description":"True if this line item was generated"},"generated_data":{"type":"object","properties":{"duration":{"type":"integer","format":"int32","description":"Time worked in seconds for generated data"},"rates":{"type":"array","items":{"type":"number","format":"float"},"description":"Hourly rates used for generated data"},"grouping":{"type":"string","description":"The grouping mode used for the generated data"},"user_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"User ids included in generated data"},"project_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Project ids included in generated data"},"task_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Tasks ids included in generated data (Client invoices only)"},"start_date":{"type":"string","format":"date","description":"The start date for the time include in the generated data"},"stop_date":{"type":"string","format":"date","description":"The stop date for the time include in the generated data"}}},"tax_1":{"type":"boolean","description":"Item tax 1"},"tax_2":{"type":"boolean","description":"Item tax 2"},"discount":{"type":"boolean","description":"Item discount"}},"required":["id","created_at","updated_at","description","quantity","unit_price","tax_1","tax_2","discount"]},"postV2OrganizationsOrganizationIdClients":{"type":"object","properties":{"name":{"type":"string","description":"Client name"},"emails":{"type":"array","description":"Default emails when sending an invoice","items":{"type":"string"}},"phone":{"type":"string","description":"Client phone number"},"address":{"type":"string","description":"Client address","default":""},"project_ids":{"type":"array","description":"Project IDs associated with this client","items":{"type":"string"}},"invoice_notes":{"type":"string","description":"Notes (Shown on invoices)"},"net_terms":{"type":"integer","format":"int32","description":"Amount of days the invoice must be paid once created"},"metadata":{"type":"array","description":"Client metadata. See the update_metadata endpoint","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}},"budget":{"type":"object","description":"Budget configuration","properties":{"type":{"type":"string","description":"The method for controlling the budget","enum":["cost","hours"]},"rate":{"type":"string","description":"When budget type is cost, specifies which rate to use.","enum":["bill_rate","pay_rate"],"default":"bill_rate"},"cost":{"type":"number","format":"float","description":"When budget type is cost. defines the cost limit."},"hours":{"type":"number","format":"float","description":"When budget type is hours. defines the hours limit."},"start_date":{"type":"string","format":"date","description":"The start date for the budget."},"recurrence":{"type":"string","description":"If given, makes budget reset on a weekly or monthly basis","enum":["weekly","monthly"]},"recurrence_start":{"type":"integer","format":"int32","description":"Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence"},"include_non_billable":{"type":"boolean","description":"Whether the budget includes non billable time","default":true},"stop_timer_when_budget_reached":{"type":"boolean","description":"Whether to stop timers when budget limit is reached"},"stop_at":{"type":"integer","format":"int32","description":"The budget percentage at which timers stop automatically"},"alerts":{"type":"object","properties":{"near_limit":{"type":"integer","format":"int32","description":"The percentage threshold for notifying when approaching the budget."},"notify_enabled":{"type":"boolean","description":"Whether budget notifications are enabled"},"notify_all_members":{"type":"boolean","description":"Whether to notify all project members"},"notify_group":{"type":"string","description":"The group to notify","enum":["all_members","org_management"]}}}},"required":["type","stop_at"]}},"required":["name"],"description":"Create client"},"DailyActivity":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Daily activity ID"},"date":{"type":"string","format":"date","description":"Organization date"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID"},"keyboard":{"type":"integer","format":"int32","description":"The amount of time (subset of tracked) the keyboard was active within the time worked in seconds"},"mouse":{"type":"integer","format":"int32","description":"The amount of time (subset of tracked) the mouse was active within the time worked in seconds"},"overall":{"type":"integer","format":"int32","description":"The amount of time (subset of tracked) the keyboard or mouse was active within the time worked in seconds"},"tracked":{"type":"integer","format":"int32","description":"Total time worked in seconds"},"input_tracked":{"type":"integer","format":"int32","description":"Total time worked in seconds (subset of tracked) with input tracking enabled (keyboard, mouse)"},"manual":{"type":"integer","format":"int32","description":"The amount of manual time in seconds (subset of tracked)"},"idle":{"type":"integer","format":"int32","description":"The amount of idle time in seconds (subset of tracked)"},"resumed":{"type":"integer","format":"int32","description":"The amount of resumed time in seconds (subset of tracked)"},"billable":{"type":"integer","format":"int32","description":"The amount of billable time in seconds (subset of tracked)"},"work_break":{"type":"integer","format":"int32","description":"The amount of work break time in seconds (subset of tracked)"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","date","user_id","project_id","task_id","keyboard","mouse","overall","tracked","input_tracked","manual","idle","resumed","billable","work_break","created_at","updated_at"],"description":"DailyActivity model"},"DailyToolUsage":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Daily Tool Usage ID"},"name":{"type":"string","description":"URL site or application name"},"tool_type":{"type":"string","description":"Tool type: application or url"},"date":{"type":"string","format":"date","description":"Organization date"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID"},"tracked":{"type":"integer","format":"int32","description":"Total time in seconds spent on this tool"},"activations":{"type":"integer","format":"int32","description":"Number of times the app was brought to focus"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","name","tool_type","date","user_id","project_id","tracked","created_at","updated_at"],"description":"DailyToolUsage model"},"GlobalTodo":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Global Todo ID"},"name":{"type":"string","description":"Global Todo name"},"status":{"type":"string","description":"Global Todo status"},"add_new_projects_enabled":{"type":"boolean","description":"True if global todo is enabled for newly added projects"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","name","status","add_new_projects_enabled","created_at","updated_at"],"description":"GlobalTodo model"},"postV2OrganizationsOrganizationIdGlobalTodos":{"type":"object","properties":{"name":{"type":"string","description":"Global to-do name"},"project_ids":{"type":"array","description":"List of project_ids to add to the global to-do","items":{"type":"integer","format":"int32"}},"add_new_projects_enabled":{"type":"boolean","description":"True if global todo is enabled for newly added projects"}},"required":["name","project_ids"],"description":"Create global to-do"},"putV2OrganizationsOrganizationIdGlobalTodosId":{"type":"object","properties":{"name":{"type":"string","description":"Global to-do name"},"project_ids":{"type":"array","description":"List of project_ids to add to the global to-do","items":{"type":"integer","format":"int32"}},"add_new_projects_enabled":{"type":"boolean","description":"True if global todo is enabled for newly added projects"}},"required":["project_ids"],"description":"Update global to-do"},"Holiday":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Holiday ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"name":{"type":"string","description":"Holiday name"},"auto_add_new_users":{"type":"boolean","description":"Automatically add new members to this holiday"},"paid":{"type":"boolean","description":"Whether the holiday will be paid for members."},"amount_used":{"type":"integer","format":"int32","description":"Holiday time to be paid in seconds."},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"date":{"type":"string","format":"date","description":"Holiday date"}},"required":["id","organization_id","name","auto_add_new_users","paid","created_at","updated_at","date"],"description":"Holiday model"},"Hubstaff_Public_V2_Entities_Insights_Activity":{"type":"object","properties":{"location":{"type":"string","description":"Member's dominant tracked location that day (remote | on_site | unknown); only present with remote_vs_office"},"date":{"type":"string","format":"date","description":"Organization-timezone date"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"overall":{"type":"integer","format":"int32","description":"Active seconds (activity numerator)"},"input_tracked":{"type":"integer","format":"int32","description":"Tracked seconds with input monitoring (denominator)"}},"required":["date","user_id","project_id","overall","input_tracked"],"description":"Hubstaff_Public_V2_Entities_Insights_Activity model"},"Hubstaff_Public_V2_Entities_Insights_FocusTime":{"type":"object","properties":{"location":{"type":"string","description":"Member's dominant tracked location that day (remote | on_site | unknown); only present with remote_vs_office"},"date":{"type":"string","format":"date","description":"Organization-timezone date"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"focus_seconds":{"type":"integer","format":"int32","description":"Time in qualifying focus sessions"},"focus_sessions_count":{"type":"integer","format":"int32","description":"Number of focus sessions"},"tracked":{"type":"integer","format":"int32","description":"Total tracked seconds (focus % denominator)"}},"required":["date","user_id","project_id","focus_seconds","focus_sessions_count","tracked"],"description":"Hubstaff_Public_V2_Entities_Insights_FocusTime model"},"Hubstaff_Public_V2_Entities_Insights_IdleTime":{"type":"object","properties":{"location":{"type":"string","description":"Member's dominant tracked location that day (remote | on_site | unknown); only present with remote_vs_office"},"date":{"type":"string","format":"date","description":"Organization-timezone date"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"idle_seconds":{"type":"integer","format":"int32","description":"Idle time in seconds"},"worked_seconds":{"type":"integer","format":"int32","description":"Total tracked time in seconds"}},"required":["date","user_id","project_id","idle_seconds","worked_seconds"],"description":"Hubstaff_Public_V2_Entities_Insights_IdleTime model"},"Hubstaff_Public_V2_Entities_Insights_Meetings":{"type":"object","properties":{"location":{"type":"string","description":"Member's dominant tracked location that day (remote | on_site | unknown); only present with remote_vs_office"},"date":{"type":"string","format":"date","description":"Organization-timezone date"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"meetings_seconds":{"type":"integer","format":"int32","description":"Total meeting time in seconds"},"meetings_count":{"type":"integer","format":"int32","description":"Number of meetings attended"},"cost":{"type":"number","format":"float","description":"Meeting cost from hourly pay rates; null unless the caller may see payment info"}},"required":["date","user_id","meetings_seconds","meetings_count","cost"],"description":"Hubstaff_Public_V2_Entities_Insights_Meetings model"},"NetworkLocation":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Network location ID"},"name":{"type":"string","description":"Location name"},"location_type":{"type":"string","description":"Location type: on_site or remote"},"ips":{"type":"array","items":{"type":"string"},"description":"List of IP addresses"},"macs":{"type":"array","items":{"type":"string"},"description":"List of MAC addresses"},"manual":{"type":"boolean","description":"false = auto-detected; true = created/edited. Auto-detected locations expire after 16 days of inactivity."},"last_seen_at":{"type":"string","format":"date-time","description":"Last network activity match. Drives auto-expiry for auto-detected locations."},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","name","location_type","ips","macs","manual","last_seen_at","created_at","updated_at"],"description":"NetworkLocation model"},"postV2OrganizationsOrganizationIdInsightsNetworkLocations":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"location_type":{"type":"string","description":"Location type: on_site or remote","enum":["on_site","remote"]},"ips":{"type":"array","description":"IPv4 or IPv6 addresses for this location","items":{"type":"string"}},"macs":{"type":"array","description":"MAC addresses for this location","items":{"type":"string"}}},"required":["name","location_type"],"description":"Create network location"},"patchV2OrganizationsOrganizationIdInsightsNetworkLocationsLocationId":{"type":"object","properties":{"name":{"type":"string","description":"Location name"},"ips":{"type":"array","description":"IPv4 or IPv6 addresses (replaces existing list)","items":{"type":"string"}},"macs":{"type":"array","description":"MAC addresses (replaces existing list)","items":{"type":"string"}}},"description":"Update network location"},"postV2OrganizationsOrganizationIdInsightsSmartNotificationRules":{"type":"object","properties":{"name":{"type":"string","description":"Rule name"},"frequency":{"type":"string","description":"Determines how often the conditions for notifications are checked","enum":["hourly","daily","weekly","monthly"]},"metric_type":{"type":"string","description":"Metric type to be monitored","enum":["work_time","core_time","non_core_time","unproductive_time","activity","suspicious_activity","unusual_activity","time_spent_in_tool","idle_time","idle_time_percent","manual_time","manual_time_percent","geo_ip_changes","users_per_ip","geo_ip_list_match"]},"condition":{"type":"string","description":"Rule condition","enum":["above","below"]},"condition_value":{"type":"number","format":"float","description":"Rule threshold value (in seconds if metric type is work_timeor time_spent_in_tool)"},"target":{"type":"object","description":"Who will be monitored by the rule","properties":{"all_members":{"type":"boolean","description":"Monitor all members","default":false},"team_ids":{"type":"array","description":"Monitor specific teams","items":{"type":"integer","format":"int32"}},"user_ids":{"type":"array","description":"Monitor specific users","items":{"type":"integer","format":"int32"}}}},"recipients":{"type":"object","description":"Who will receive the notifications","properties":{"roles":{"type":"array","description":"Specific roles (e.g., [\"owner\"])","items":{"type":"string"}},"user_ids":{"type":"array","description":"Specific users","items":{"type":"integer","format":"int32"}}}},"deliver_by":{"type":"array","description":"List of delivery methods for sending notifications","items":{"type":"string","enum":["email","slack","insights"]}},"time_unit":{"type":"string","description":"Duration of time over which the rule is evaluated","enum":["per_hour","per_day","per_week","per_month"]}},"required":["name","frequency","metric_type","condition","condition_value","target","recipients"],"description":"Create smart notification rule"},"SmartNotification":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Smart notification ID"},"matches":{"type":"array","items":{"$ref":"#/definitions/SmartNotificationMatch"},"description":"Matches that triggered the notification, i.e. users who violated the rule"},"total_count":{"type":"integer","format":"int32","description":"Total number of matches/users who triggered the notification"},"rule_snapshot":{"$ref":"#/definitions/SmartNotificationRuleSnapshot","description":"Snapshot of rule that triggered the notification at the time it was created"},"from":{"type":"s","format":"g","description":"Rule evaluated over a range starting on this date"},"to":{"type":"s","format":"g","description":"Rule evaluated over a range ending on this date"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"}},"required":["id","matches","total_count","rule_snapshot","from","to","created_at"],"description":"SmartNotification model"},"SmartNotificationMatch":{"type":"object","properties":{"user_id":{"type":"integer","format":"int64","description":"User ID"},"value":{"type":"number","format":"float","description":"Value of the metric that the user got for the rule specified metric"}},"required":["user_id","value"]},"SmartNotificationRuleSnapshot":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Smart notification rule ID"},"name":{"type":"string","description":"Smart notification rule name"},"frequency":{"type":"string","description":"Determines how often the conditions for notifications are checked"},"metric_type":{"type":"string","description":"Metric type being monitored"},"condition":{"type":"string","description":"Comparison condition that triggered the notification"},"condition_value":{"type":"number","format":"float","description":"Rule threshold value (in seconds if metric type is work_time or time_spent_in_tool"},"time_unit":{"type":"string","description":"Duration of time over which the rule was evaluated"}},"required":["id","name","frequency","metric_type","condition","condition_value"]},"ToolClassification":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Tool ID (Application or URL site ID)"},"tool_type":{"type":"string","description":"Tool type: application or url"},"name":{"type":"string","description":"Tool display name"},"productivity":{"type":"string","description":"Effective productivity: core, non_core, or unproductive"},"job_type":{"type":"string","description":"Job type for this classification. Null = all."},"category":{"type":"string","description":"Category name. Defaults to the tool's empty category ('Uncategorized' for apps, 'Browsing' for URLs) when none set."}},"required":["id","tool_type","name","productivity","job_type","category"],"description":"ToolClassification model"},"patchV2OrganizationsOrganizationIdInsightsToolClassifications":{"type":"object","properties":{"tool_classifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Tool ID"},"tool_type":{"type":"string","description":"Tool type","enum":["application","url"]},"productivity":{"type":"string","description":"Productivity classification to set","enum":["core","non_core","unproductive"]},"job_type":{"type":"string","description":"Job type for productivity (case-insensitive). Omit to apply globally."},"category":{"type":"string","description":"Category name (case-insensitive). Null resets to default. See GET /organizations/:id/insights/tool_categories for valid values."}},"required":["id","tool_type"]}}},"required":["tool_classifications"],"description":"Update tool classifications"},"UnusualActivity":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Unusual activity ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"type":{"type":"string","description":"Unusual activity type"},"keyboard_active_seconds":{"type":"integer","format":"int64","description":"Keyboard active seconds"},"mouse_active_seconds":{"type":"integer","format":"int64","description":"Mouse active seconds"},"time_tracked_seconds":{"type":"integer","format":"int64","description":"Time tracked seconds"},"overall_active_seconds":{"type":"integer","format":"int64","description":"Overall active seconds"},"url":{"type":"string","description":"Permalink to the unusual activity page in the Web UI"},"date":{"type":"string","format":"date","description":"Organization date"},"confidence_level":{"type":"string","description":"Confidence level of the unusual activity"},"top_apps_in_use":{"type":"object","description":"Top apps in this period of time"},"top_urls_visited":{"type":"array","items":{"type":"string"},"description":"Top URLs in this period of time"},"screenshot_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Screenshot IDs"},"suspicious_apps":{"type":"array","items":{"type":"string"},"description":"Suspicious apps"},"starts_at":{"type":"s","format":"g","description":"Start of unusual activity"},"ends_at":{"type":"s","format":"g","description":"End of unusual activity"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","user_id","type","keyboard_active_seconds","mouse_active_seconds","time_tracked_seconds","overall_active_seconds","url","date","confidence_level","top_apps_in_use","top_urls_visited","screenshot_ids","suspicious_apps","starts_at","ends_at","created_at","updated_at"],"description":"UnusualActivity model"},"Hubstaff_Public_V2_Entities_Insights_WorkTimeClassification":{"type":"object","properties":{"location":{"type":"string","description":"Member's dominant tracked location that day (remote | on_site | unknown); only present with remote_vs_office"},"date":{"type":"string","format":"date","description":"Organization-timezone date"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"tracked":{"type":"integer","format":"int32","description":"Total tracked seconds"},"core":{"type":"integer","format":"int32","description":"Core-productive seconds"},"non_core":{"type":"integer","format":"int32","description":"Non-core seconds"},"unproductive":{"type":"integer","format":"int32","description":"Unproductive seconds"}},"required":["date","user_id","project_id","tracked","core","non_core","unproductive"],"description":"Hubstaff_Public_V2_Entities_Insights_WorkTimeClassification model"},"Integration":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Integration ID"},"name":{"type":"string","description":"Integration name"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"type":{"type":"string","description":"Integration type"},"last_sync_at":{"type":"string","format":"date-time","description":"Last time the integration was synced"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"status":{"type":"string","description":"Status"},"disabled_reason":{"type":"string","description":"Disabled reason"}},"required":["id","name","organization_id","type","last_sync_at","created_at","updated_at","status"],"description":"Integration model"},"postV2OrganizationsOrganizationIdInviteLinks":{"type":"object","properties":{"name":{"type":"string","description":"The invite link name (unique per organization)"},"role":{"type":"string","description":"The role users joining via the link will be added as","enum":["project_user","project_viewer"],"default":"project_user"},"expires_on":{"type":"string","format":"date","description":"Expiration date (link never expires when omitted)"},"use_cap":{"type":"integer","format":"int32","description":"Maximum number of joins allowed (unlimited when omitted)"},"project_ids":{"type":"array","description":"List of project IDs users are added to when joining via the link","items":{"type":"integer","format":"int32"}},"team_ids":{"type":"array","description":"List of team IDs users are added to when joining via the link","items":{"type":"integer","format":"int32"}},"pay_rate":{"type":"number","format":"float","description":"A pay rate to set for users joining via the link"},"enabled":{"type":"boolean","description":"Whether the link is enabled","default":true}},"required":["name"],"description":"Create invite link"},"postV2OrganizationsOrganizationIdInvites":{"type":"object","properties":{"email":{"type":"string","description":"The email to invite"},"role":{"type":"string","description":"The role to invite the user as","enum":["organization_manager","project_manager","project_user","project_viewer"],"default":"project_user"},"pay_rate":{"type":"number","format":"float","description":"A pay rate to set for the user"},"project_ids":{"type":"array","description":"List of project IDs to add the user to after they accept the invite","items":{"type":"integer","format":"int32"}},"trackable":{"type":"boolean","description":"Whether the user can track time","default":true},"view_only":{"type":"boolean","description":"Whether the user is in view only mode or not","default":false}},"required":["email"],"description":"Create invite"},"postV2OrganizationsOrganizationIdInvitesBulk":{"type":"object","properties":{"invites":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","description":"The email to invite"},"role":{"type":"string","description":"The role to invite the user as","enum":["organization_manager","project_manager","project_user","project_viewer"],"default":"project_user"},"pay_rate":{"type":"number","format":"float","description":"A pay rate to set for the user"},"project_ids":{"type":"array","description":"List of project IDs to add the user to after they accept the invite","items":{"type":"integer","format":"int32"}},"trackable":{"type":"boolean","description":"Whether the user can track time","default":true},"view_only":{"type":"boolean","description":"Whether the user is in view only mode or not","default":false}},"required":["email"]}}},"required":["invites"],"description":"Bulk invite users"},"postV2OrganizationsOrganizationIdJobSites":{"type":"object","properties":{"name":{"type":"string","description":"Job site name"},"address":{"type":"string","description":"Job site address"},"latitude":{"type":"number","format":"double","description":"Job site longitude"},"longitude":{"type":"number","format":"double","description":"Job site latitude"},"radius":{"type":"integer","format":"int32","description":"Job site radius","minimum":50,"maximum":3000},"rules":{"type":"array","description":"A rule configuration","items":{"type":"object","properties":{"enter_action":{"type":"string","description":"The enter action","enum":["none","track","notify"],"default":"none"},"exit_action":{"type":"string","description":"The exit action","enum":["none","track","notify"],"default":"none"},"user_ids":{"type":"array","description":"List of user IDs to add to this rule","items":{"type":"integer","format":"int32"}},"team_ids":{"type":"array","description":"List of team IDs to add to this rule","items":{"type":"integer","format":"int32"}},"start_project_id":{"type":"integer","format":"int32","description":"Project ID to auto start when enter_action is set to track"}}}}},"required":["name","address","latitude","longitude","radius","rules"],"description":"Create job site"},"JobSiteVisit":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Job Site ID"},"job_site_id":{"type":"integer","format":"int64","description":"Job site ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"status":{"type":"string","description":"Job site visit status"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"enter_at":{"type":"string","format":"date-time","description":"Time the user entered the site"},"exit_at":{"type":"string","format":"date-time","description":"Time the user exited the site"},"last_seen_at":{"type":"string","format":"date-time","description":"The last time the user was seen at the site"}},"required":["id","job_site_id","user_id","status","created_at","updated_at","enter_at"],"description":"JobSiteVisit model"},"LastActivity":{"type":"object","properties":{"last_client_activity":{"type":"string","format":"date-time","description":"Last client activity of user"},"online":{"type":"boolean","description":"Whether we consider the user online or not"},"last_project_id":{"type":"integer","format":"int64","description":"Last project ID the user worked on"},"last_task_id":{"type":"integer","format":"int64","description":"Last task ID the user worked on"},"user_id":{"type":"integer","format":"int64","description":"User ID"}},"required":["last_client_activity","online","last_task_id","user_id"],"description":"LastActivity model"},"Location":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Location ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"time_slot":{"type":"string","format":"date-time","description":"Time slot"},"recorded_at":{"type":"string","format":"date-time","description":"Date and time the location was recorded"},"date":{"type":"string","format":"date","description":"Organization date"},"latitude":{"type":"number","format":"float","description":"Latitude"},"longitude":{"type":"number","format":"float","description":"Longitude"},"accuracy":{"type":"number","format":"float","description":"Accuracy"},"job_site_id":{"type":"integer","format":"int64","description":"Job Site ID"},"event":{"type":"string","description":"Event type (enter, exit, move"}},"required":["id","user_id","project_id","created_at","updated_at","time_slot","recorded_at","date","latitude","longitude","accuracy","event"],"description":"Location model"},"OrganizationMember":{"type":"object","properties":{"user_id":{"type":"integer","format":"int64","description":"User ID"},"pay_rate":{"type":"string","description":"Pay rate"},"bill_rate":{"type":"string","description":"Bill rate"},"currency":{"type":"string","description":"Currency of pay and bill rates"},"membership_role":{"type":"string","description":"Membership role"},"membership_status":{"type":"string","description":"Membership status"},"created_at":{"type":"string","format":"date-time","description":"When the member was added to the organization/project"},"updated_at":{"type":"string","format":"date-time","description":"When the membership was last updated"},"removed_at":{"type":"string","format":"date-time","description":"When the member was removed"},"last_client_activity":{"type":"string","format":"date-time","description":"Last client activity of user"},"user":{"$ref":"#/definitions/User","description":"Related user object"},"project_members":{"type":"array","items":{"$ref":"#/definitions/NestedProjectMember"},"description":"List of project memberships"},"pay_period":{"type":"string","description":"Pay period"},"fixed_pay_rate":{"type":"string","description":"Fixed pay rate"},"period_week_day":{"type":"integer","format":"int32","description":"Pay period week day (0 monday)"},"period_start_day":{"type":"integer","format":"int32","description":"Pay period start day"},"period_second_start_day":{"type":"integer","format":"int32","description":"Second pay period start day"},"period_anchor_date":{"type":"string","format":"date","description":"Date when the biweekly pay period must start"},"trackable":{"type":"string","description":"Whether the member has tracking enabled, disabled or implicitly disabled"},"effective_role":{"type":"string","description":"A virtual membership role that takes into account the project memberships"},"profile":{"$ref":"#/definitions/OrganizationMemberProfile"},"limits":{"$ref":"#/definitions/OrganizationMemberLimits"},"type":{"type":"string","description":"How the member was provisioned: standard, scim, silent or sso"},"metadata":{"type":"object","description":"Metadata attached to the member"},"view_only":{"type":"boolean","description":"View-only member flag"}},"required":["user_id","membership_role","membership_status","created_at","updated_at","last_client_activity","trackable","effective_role","type","metadata","view_only"],"description":"OrganizationMember model"},"User":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"User ID"},"name":{"type":"string","description":"User full name"},"first_name":{"type":"string","description":"User first name"},"last_name":{"type":"string","description":"User last name"},"email":{"type":"string","description":"User email address"},"time_zone":{"type":"string","description":"User time zone"},"ip_address":{"type":"string","description":"User last IP address"},"status":{"type":"string","description":"User status"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","name","first_name","last_name","time_zone","ip_address","status","created_at","updated_at"],"description":"User model"},"NestedProjectMember":{"type":"object","properties":{"pay_rate":{"type":"string","description":"Pay rate"},"bill_rate":{"type":"string","description":"Bill rate"},"currency":{"type":"string","description":"Currency of pay and bill rates"},"membership_role":{"type":"string","description":"Membership role"},"membership_status":{"type":"string","description":"Membership status"},"created_at":{"type":"string","format":"date-time","description":"When the member was added to the organization/project"},"updated_at":{"type":"string","format":"date-time","description":"When the membership was last updated"},"removed_at":{"type":"string","format":"date-time","description":"When the member was removed"},"last_client_activity":{"type":"string","format":"date-time","description":"Last client activity of user"},"team_id":{"type":"integer","format":"int64","description":"Team ID"},"profile":{"$ref":"#/definitions/OrganizationMemberProfile"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"project_type":{"type":"string","description":"Project type (project, work_order, work_break)"},"project_status":{"type":"string","description":"Project status (active, archived, deleted)"}},"required":["membership_role","membership_status","created_at","updated_at","last_client_activity","project_id","project_type","project_status"]},"OrganizationMemberProfile":{"type":"object","properties":{"job_title":{"type":"string","description":"The job title of the member"},"job_type":{"type":"string","description":"The job type of the member"},"location":{"type":"string","description":"The location of the member"},"employee_id":{"type":"string","description":"The employee id of the member"},"tax_info":{"type":"string","description":"The tax info of the member"},"birthday":{"type":"string","format":"date","description":"The member's birthday (YYYY-MM-DD). If the year is not available, it will be 0000"},"started_on":{"type":"string","format":"date","description":"The start date of the member"},"custom_fields":{"type":"object","description":"Custom fields"},"work_phone":{"type":"string","description":"The work phone number of the member"},"personal_phone":{"type":"string","description":"The personal phone number of the member"},"personal_email":{"type":"string","description":"The personal email address of the member"},"department":{"type":"string","description":"The department of the member"},"tax_type":{"type":"string","description":"The tax type of the member"},"occupied_seat":{"type":"boolean","description":"Whether the member occupies a billing seat"},"os_username":{"type":"string","description":"The OS username of the member"},"employment_type":{"type":"string","description":"The employment type of the member"},"work_mode":{"type":"string","description":"The workplace mode of the member"},"in_office_percent":{"type":"integer","format":"int32","description":"The in-office work percentage of the member"},"remote_percent":{"type":"integer","format":"int32","description":"The remote work percentage of the member"},"employed_through":{"type":"string","description":"How the member is employed"},"eor_name":{"type":"string","description":"The EOR or vendor name of the member"},"account_code":{"type":"string","description":"The account code of the member"},"employment_comments":{"type":"string","description":"Employment comments for the member"},"contractual_end_date":{"type":"string","format":"date","description":"The contractual end date of the member"},"termination_reason":{"type":"string","description":"The termination reason of the member"},"home_address":{"type":"string","description":"The home address of the member"},"home_address_country":{"type":"string","description":"The home address country of the member"},"home_address_state":{"type":"string","description":"The home address state of the member"},"work_address":{"type":"string","description":"The work address of the member"},"work_address_country":{"type":"string","description":"The work address country of the member"},"work_address_state":{"type":"string","description":"The work address state of the member"}}},"OrganizationMemberLimits":{"type":"object","properties":{"limits_by_shifts":{"type":"boolean","description":"Whether the shifts are used to set allowance limits"},"weekly_limit":{"type":"number","format":"float","description":"The hours member is allowed to work weekly"},"daily_limit":{"type":"number","format":"float","description":"The hours daily limit of the member"},"dow_limit":{"type":"array","items":{"type":"string"},"description":"The days when member is allowed to track time"},"expected_per_week":{"type":"number","format":"float","description":"The hours member is expected to work weekly"},"dow_expected":{"type":"array","items":{"type":"string"},"description":"The days when member is expected to track time"}}},"postV2OrganizationsOrganizationIdMembers":{"type":"object","properties":{"user":{"type":"object","description":"User data","properties":{"name":{"type":"string","description":"User full name (deprecated, use first_name, last_name)"},"first_name":{"type":"string","description":"User first name"},"last_name":{"type":"string","description":"User last name"},"email":{"type":"string","description":"User email"},"password":{"type":"string","description":"User password"},"require_password_change":{"type":"boolean","description":"Require user to change password on first sign in","default":true},"allow_receiving_emails":{"type":"boolean","description":"Allow user to receive Hubstaff emails","default":false}},"required":["email","password"]},"role":{"type":"string","description":"The role to add the user as","enum":["organization_manager","project_manager","project_user","project_viewer"],"default":"project_user"},"pay_rate":{"type":"number","format":"float","description":"A pay rate to set for the user"},"view_only":{"type":"boolean","description":"Create the member as view-only"},"pay_period":{"type":"string","description":"Member pay period; values are the API symbols mapped in UserOrganization::PayPeriods (see list above). When timesheet_approval is true, required only if the organization has no default pay period; otherwise optional (omit to use the organization default where applicable).","enum":["none","weekly","twice_per_month","biweekly","monthly"]},"period_week_day":{"type":"integer","format":"int32","description":"When pay_period is set: day of the week when the pay period starts (0 Monday through 6 Sunday). Required for weekly or biweekly pay periods when the organization uses custom pay period dates.","minimum":0,"maximum":6},"period_start_day":{"type":"integer","format":"int32","description":"When pay_period is set: day of the month when the pay period starts. Required for monthly or twice_per_month pay periods when the organization uses custom pay period dates.","minimum":1,"maximum":31},"period_second_start_day":{"type":"integer","format":"int32","description":"When pay_period is set: day of the month when the second period starts for twice_per_month (31 = last day of the month). Required for that pay period when the organization uses custom pay period dates.","minimum":1,"maximum":31},"period_anchor_date":{"type":"string","format":"date","description":"When pay_period is set: anchor date for biweekly periods when the organization uses custom pay period dates."},"timesheet_approval":{"type":"boolean","description":"Tri-state: true requires timesheet approval for the member, false disables it, and omitting the parameter inherits the organization default for new members."},"project_ids":{"type":"array","description":"List of project IDs to add the user","items":{"type":"integer","format":"int32"}},"team_ids":{"type":"array","description":"List of team IDs to add the user","items":{"type":"integer","format":"int32"}},"metadata":{"type":"array","description":"Member metadata. See the update_members endpoint for further details","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["user"],"description":"Create organization member"},"OrganizationSeat":{"type":"object","properties":{"paid":{"type":"integer","format":"int32","description":"Number of paid seats"},"occupied":{"type":"integer","format":"int32","description":"Number of occupied seats"},"open":{"type":"integer","format":"int32","description":"Number of open seats"}},"required":["paid","occupied","open"],"description":"OrganizationSeat model"},"OvertimePolicy":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Overtime policy ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"name":{"type":"string","description":"Policy name"},"policy_type":{"type":"string","description":"How the threshold is evaluated: weekly or daily"},"status":{"type":"string","description":"Policy status: active, pending, expiring or archived"},"threshold":{"type":"number","format":"float","description":"Hours per period before time counts as overtime"},"pay_rate_multiplier":{"type":"string","description":"Pay rate multiplier after the threshold"},"bill_rate_multiplier":{"type":"string","description":"Bill rate multiplier after the threshold"},"since":{"type":"string","format":"date-time","description":"When the policy becomes effective"},"until":{"type":"string","format":"date-time","description":"When the policy expires (null while open)"},"auto_add_new_users":{"type":"boolean","description":"Automatically add new members to this policy"},"notification_enabled":{"type":"boolean","description":"Whether overtime notifications are sent"},"notification_role_ids":{"type":"Array[String]","description":"Roles notified about overtime"},"superseded_by_id":{"type":"integer","format":"int64","description":"ID of the policy that replaced this one"},"editable":{"type":"boolean","description":"Whether the policy can still be edited"},"locked":{"type":"boolean","description":"Whether the policy is in use and read-only"},"user_ids":{"type":"Array[long]","description":"User IDs assigned to this policy"}},"required":["id","organization_id","created_at","updated_at","name","policy_type","status","threshold","pay_rate_multiplier","bill_rate_multiplier","since","until","auto_add_new_users","notification_enabled","notification_role_ids","editable","locked","user_ids"],"description":"OvertimePolicy model"},"postV2OrganizationsOrganizationIdOvertimePolicies":{"type":"object","properties":{"name":{"type":"string","description":"Policy name (2-50 characters)"},"policy_type":{"type":"string","description":"How the threshold is evaluated","enum":["daily","weekly"],"default":"weekly"},"threshold":{"type":"number","format":"float","description":"Hours worked per period before overtime applies"},"pay_rate_multiplier":{"type":"number","format":"float","description":"Pay rate multiplier after the threshold"},"user_ids":{"type":"array","description":"User IDs to assign to the policy","items":{"type":"integer","format":"int32"}},"auto_add_new_users":{"type":"boolean","description":"Automatically add new members to this policy"},"notification_enabled":{"type":"boolean","description":"Whether overtime notifications are sent"},"notification_role_ids":{"type":"array","description":"Roles notified about overtime","items":{"type":"string","enum":["owner","manager","team_lead"]}},"starts_on":{"type":"string","format":"date","description":"Scheduled start date (period-aligned)"},"override":{"type":"boolean","description":"Move members already on another active policy of the same type into this one. Without it, the request fails if any assigned member is already on such a policy.","default":false}},"required":["name","threshold","pay_rate_multiplier","user_ids"],"description":"Create overtime policy"},"PassiveJobSiteVisit":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Job Site ID"},"job_site_id":{"type":"integer","format":"int64","description":"Job site ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"status":{"type":"string","description":"Job site visit status"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"enter_at":{"type":"string","format":"date-time","description":"Time the user entered the site"},"exit_at":{"type":"string","format":"date-time","description":"Time the user exited the site"},"last_seen_at":{"type":"string","format":"date-time","description":"The last time the user was seen at the site"}},"required":["id","job_site_id","user_id","status","created_at","updated_at","enter_at"],"description":"PassiveJobSiteVisit model"},"Project":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Project ID"},"name":{"type":"string","description":"Project name"},"description":{"type":"string","description":"Project description"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"status":{"type":"string","description":"Project status"},"type":{"type":"string","description":"Project type (project, work_order, work_break)"},"client_id":{"type":"integer","format":"int64","description":"Client ID"},"billable":{"type":"boolean","description":"Default state of billable attribute for new activity"},"budget":{"$ref":"#/definitions/Budget"},"metadata":{"type":"object","description":"Metadata attached to the project"},"pay_rate":{"type":"number","format":"float","description":"Default pay rate for the project"},"bill_rate":{"type":"number","format":"float","description":"Default bill rate for the project"}},"required":["id","name","created_at","updated_at","status","type","billable","metadata"],"description":"Project model"},"postV2OrganizationsOrganizationIdProjects":{"type":"object","properties":{"name":{"type":"string","description":"Project name"},"description":{"type":"string","description":"Project description"},"metadata":{"type":"array","description":"Project metadata. See the update_metadata endpoint","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"User ID"},"role":{"type":"string","description":"Role for the user","enum":["viewer","user","manager"]},"pay_rate":{"type":"number","format":"float","description":"Default pay rate (will be rounded to 2 decimal places). Set to null to remove the rate"},"bill_rate":{"type":"number","format":"float","description":"Default bill rate (will be rounded to 2 decimal places). Set to null to remove the rate"}},"required":["user_id","role"]}},"client_id":{"type":"integer","format":"int32","description":"The client ID"},"billable":{"type":"boolean","description":"Whether activity logged against this project is billable by default (default is true)"},"budget":{"type":"object","description":"Budget configuration","properties":{"type":{"type":"string","description":"The method for controlling the budget","enum":["cost","hours"]},"rate":{"type":"string","description":"When budget type is cost, specifies which rate to use.","enum":["bill_rate","pay_rate"],"default":"bill_rate"},"cost":{"type":"number","format":"float","description":"When budget type is cost. defines the cost limit."},"hours":{"type":"number","format":"float","description":"When budget type is hours. defines the hours limit."},"start_date":{"type":"string","format":"date","description":"The start date for the budget."},"recurrence":{"type":"string","description":"If given, makes budget reset on a weekly or monthly basis","enum":["weekly","monthly"]},"recurrence_start":{"type":"integer","format":"int32","description":"Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence"},"include_non_billable":{"type":"boolean","description":"Whether the budget includes non billable time","default":true},"stop_timer_when_budget_reached":{"type":"boolean","description":"Whether to stop timers when budget limit is reached"},"stop_at":{"type":"integer","format":"int32","description":"The budget percentage at which timers stop automatically"},"alerts":{"type":"object","properties":{"near_limit":{"type":"integer","format":"int32","description":"The percentage threshold for notifying when approaching the budget."},"notify_enabled":{"type":"boolean","description":"Whether budget notifications are enabled"},"notify_all_members":{"type":"boolean","description":"Whether to notify all project members"},"notify_group":{"type":"string","description":"The group to notify","enum":["all_members","org_management"]}}}},"required":["type","stop_at"]},"pay_rate":{"type":"number","format":"float","description":"Default pay rate (will be rounded to 2 decimal places). Set to null to remove the rate"},"bill_rate":{"type":"number","format":"float","description":"Default bill rate (will be rounded to 2 decimal places). Set to null to remove the rate"}},"required":["name"],"description":"Create project"},"Screenshot":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Screenshot ID"},"full_url":{"type":"string","description":"Screenshot URL for the full image"},"thumb_url":{"type":"string","description":"Screenshot URL for the thumbnail"},"date":{"type":"string","format":"date","description":"Organization date"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"time_slot":{"type":"string","format":"date-time","description":"Time slot"},"recorded_at":{"type":"string","format":"date-time","description":"Date and time screenshot was recorded"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"offset_x":{"type":"integer","format":"int32","description":"Screen offset X"},"offset_y":{"type":"integer","format":"int32","description":"Screen offset Y"},"width":{"type":"integer","format":"int32","description":"Screenshot width"},"height":{"type":"integer","format":"int32","description":"Screenshot height"},"screen":{"type":"integer","format":"int32","description":"Screen number"}},"required":["id","date","created_at","updated_at","time_slot","recorded_at","user_id","project_id","offset_x","offset_y","width","height","screen"],"description":"Screenshot model"},"ScreenshotSetting":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"The member user ID"},"screenshot_frequency":{"type":"integer","format":"int32","description":"Screenshots per 10 minutes; allowed values depend on the plan (up to 10 with the More Screenshots add-on)"}},"required":["user_id","screenshot_frequency"],"description":"ScreenshotSetting model"},"putV2OrganizationsOrganizationIdScreenshotSettings":{"type":"object","properties":{"screenshot_frequency":{"type":"integer","format":"int32","description":"Screenshots per 10 minutes; plan-dependent (up to 10 with More Screenshots)","minimum":0,"maximum":10},"user_ids":{"type":"array","description":"Members to update. Mutually exclusive with apply_to_all_members.","items":{"type":"integer","format":"int32"}},"apply_to_all_members":{"type":"boolean","description":"Set to true to change the organization-wide default for all current and future members. Mutually exclusive with user_ids.","enum":[true]}},"required":["screenshot_frequency"],"description":"Update member screenshot frequency settings"},"IgnoredUserMatch":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Ignored user match ID"},"pattern_id":{"type":"integer","format":"int64","description":"Matched pattern ID"},"device_id":{"type":"integer","format":"int64","description":"Device the match was seen on"},"match_type":{"type":"string","enum":["os_username"],"description":"Attribute that was matched"},"value":{"type":"string","description":"Matched value"},"last_seen_at":{"type":"string","format":"date-time","description":"When the match was last seen"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","pattern_id","device_id","match_type","value","last_seen_at","created_at","updated_at"],"description":"IgnoredUserMatch model"},"IgnoredUserPattern":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Ignored user pattern ID"},"match_type":{"type":"string","enum":["os_username"],"description":"Attribute the pattern is matched against"},"pattern":{"type":"string","description":"Wildcard pattern (supports *)"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","match_type","pattern","created_at","updated_at"],"description":"IgnoredUserPattern model"},"TeamInvoice":{"type":"object","properties":{"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"status":{"type":"string","description":"Invoice status"},"author_id":{"type":"integer","format":"int64","description":"The user who created the invoice"},"number":{"type":"string","description":"Invoice number"},"po_number":{"type":"string","description":"Invoice PO number"},"notes":{"type":"string","description":"Invoice notes"},"currency":{"type":"string","description":"Invoice currency"},"grand_total":{"type":"number","format":"float","description":"Grand total"},"paid_amount":{"type":"number","format":"float","description":"Amount paid"},"tax_1":{"type":"number","format":"float","description":"Tax 1 percentage to apply to sub total for enabled line items"},"tax_2":{"type":"number","format":"float","description":"Tax 2 percentage to apply to sub total for enabled line items"},"discount":{"type":"number","format":"float","description":"Discount percentage to apply to before taxes for enabled line items"},"issue_date":{"type":"string","format":"date","description":"Invoice issue date"},"due_date":{"type":"string","format":"date","description":"Invoice due date"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"line_items":{"type":"array","items":{"$ref":"#/definitions/InvoiceLineItem"},"description":"List of invoice line items"},"viewer_url":{"type":"string","format":"uri","description":"View only URL"},"id":{"type":"integer","format":"int64","description":"Team invoice ID"},"user_id":{"type":"integer","format":"int64","description":"User ID this invoice is for"}},"required":["organization_id","status","author_id","number","po_number","notes","currency","grand_total","paid_amount","issue_date","created_at","updated_at","viewer_url","id","user_id"],"description":"TeamInvoice model"},"TeamPayment":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Payment ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"organization_id":{"type":"string","description":"Organization ID"},"start_date":{"type":"string","format":"date","description":"Start date period for team payment"},"stop_date":{"type":"string","format":"date","description":"End date period for team payment"},"blame_user_id":{"type":"integer","format":"int64","description":"User ID who made the payment"},"note":{"type":"string","description":"A note for this team payment"},"tracked":{"type":"integer","format":"int32","description":"Total time worked in seconds"},"amount":{"type":"string","description":"Payment amount"},"currency":{"type":"string","description":"Payment currency"},"payment_source":{"type":"string","description":"Payment source type"},"paid_via_payroll":{"type":"boolean","description":"Paid via the payroll gateway"},"unpaid_amount":{"type":"string","description":"The amount left to be paid"},"payment_gateway":{"type":"string","description":"The payroll gateway used to pay"},"payment_complete":{"type":"boolean","description":"Payment completion status"},"next_payment_at":{"type":"string","format":"date-time","description":"The next time this payment will be retried"},"details":{"type":"array","items":{"$ref":"#/definitions/TeamPaymentDetail"},"description":"Team payment details"}},"required":["id","created_at","updated_at","organization_id","start_date","stop_date","tracked","amount","currency","payment_source","paid_via_payroll","details"],"description":"TeamPayment model"},"TeamPaymentDetail":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Payment detail ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID"},"date":{"type":"string","format":"date","description":"Date for the time worked"},"tracked":{"type":"integer","format":"int32","description":"Amount of time tracked in seconds, including overtime"},"overtime_tracked":{"type":"integer","format":"int32","description":"Amount of overtime in seconds"},"pay_rate":{"type":"string","description":"The pay rate for this entry"},"overtime_pay_rate":{"type":"string","description":"The calculated overtime pay rate for this entry (regular_pay_rate * overtime_multiplier). The overtime_multiplier is defined in the organization overtime policy"},"amount":{"type":"string","description":"The amount paid for this entry"},"currency":{"type":"string","description":"The currency for the pay rate and amount"},"payment_type":{"type":"string","description":"The type of payment detail entry"},"payment_complete":{"type":"boolean","description":"Is this detail paid"}},"required":["id","user_id","date","tracked","pay_rate","amount","currency","payment_type"]},"Team":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Team ID"},"name":{"type":"string","description":"Team name"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"metadata":{"type":"object","description":"Metadata attached to the team"},"lead_options":{"type":"object","properties":{"approve_timesheets":{"type":"boolean","description":"Team leads can approve timesheets for team members"},"notifications_for_timesheets_only_leads":{"type":"boolean","description":"Only team leeds receive timesheet notifications. Requires approve_timesheets enabled."},"approve_time_off":{"type":"boolean","description":"Team leads can approve time off for team members"},"approve_manual_time":{"type":"boolean","description":"Team leads can approve manual time added for team members"},"receive_manual_time_notification":{"type":"boolean","description":"Only team leads receive manual time notifications. Requires approve_manual_time enabled."},"notifications_for_time_off_only_leads":{"type":"boolean","description":"Only team leads receive time off notifications. Requires approve_time_off enabled."},"schedule_shifts":{"type":"boolean","description":"Team leads can schedule shifts for team members"},"notifications_for_schedules_only_leads":{"type":"boolean","description":"Only team leads receive notifications for shifts. Requires schedule_shifts enabled."},"notifications_for_limits":{"type":"boolean","description":"Team leads receive weekly and daily limit notifications for team members"},"notifications_for_limits_only_leads":{"type":"boolean","description":"Team lead only receive weekly and daily limit notifications. Requires notifications_for_limits enabled."},"notifications_work_breaks":{"type":"boolean","description":"Team leads receive work break notifications for team members"},"notifications_work_breaks_only_leads":{"type":"boolean","description":"Only team leads receive work break notifications. Requires notifications_work_breaks enabled."},"manage_team_projects":{"type":"boolean","description":"Team leads can create team projects"},"manage_team_members":{"type":"boolean","description":"Team leads can edit members and their roles"},"invite_members_to_organization":{"type":"boolean","description":"Team leads can invite new members to the organization"},"notifications_for_job_sites":{"type":"boolean","description":"Team leads receive job site notifications"},"notifications_for_job_sites_only_leads":{"type":"boolean","description":"Only team leads receive job site notifications. Requires notifications_for_job_sites enabled."},"others_screenshots":{"type":"boolean","description":"View screenshots/activities for other members"},"manage_billing":{"type":"boolean","description":"Manage financials"}},"required":["approve_timesheets","notifications_for_timesheets_only_leads","approve_time_off","approve_manual_time","receive_manual_time_notification","notifications_for_time_off_only_leads","schedule_shifts","notifications_for_schedules_only_leads","notifications_for_limits","notifications_for_limits_only_leads","notifications_work_breaks","notifications_work_breaks_only_leads","manage_team_projects","manage_team_members","invite_members_to_organization","notifications_for_job_sites","notifications_for_job_sites_only_leads","others_screenshots","manage_billing"],"description":"Lead options"}},"required":["id","name","created_at","updated_at","metadata"],"description":"Team model"},"postV2OrganizationsOrganizationIdTeams":{"type":"object","properties":{"name":{"type":"string","description":"Team name"},"metadata":{"type":"array","description":"Team metadata. See the update_metadata endpoint","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}},"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"User ID"},"role":{"type":"string","description":"Role for the user on associated projects","enum":["viewer","user","manager"]},"lead":{"type":"boolean","description":"Specify that the user is a team lead or not (default false)"}},"required":["user_id","role"]}},"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":"integer","format":"int32","description":"List of project to add to the team"}},"required":["project_id"]}},"lead_options":{"type":"object","properties":{"approve_timesheets":{"type":"boolean","description":"Team leads can approve timesheets for team members","default":true},"notifications_for_timesheets_only_leads":{"type":"boolean","description":"Only team leeds receive timesheet notifications. Requires approve_timesheets enabled.","default":false},"approve_time_off":{"type":"boolean","description":"Team leads can approve time off for team members","default":true},"approve_manual_time":{"type":"boolean","description":"Team leads can approve manual time added for team members","default":true},"receive_manual_time_notification":{"type":"boolean","description":"Only team leads receive manual time notifications. Requires approve_manual_time enabled.","default":true},"notifications_for_time_off_only_leads":{"type":"boolean","description":"Only team leads receive time off notifications. Requires approve_time_off enabled.","default":false},"schedule_shifts":{"type":"boolean","description":"Team leads can schedule shifts for team members","default":true},"notifications_for_schedules_only_leads":{"type":"boolean","description":"Only team leads receive notifications for shifts. Requires schedule_shifts enabled.","default":false},"notifications_for_limits":{"type":"boolean","description":"Team leads receive weekly and daily limit notifications for team members","default":false},"notifications_for_limits_only_leads":{"type":"boolean","description":"Team lead only receive weekly and daily limit notifications. Requires notifications_for_limits enabled.","default":false},"notifications_work_breaks":{"type":"boolean","description":"Team leads receive work break notifications for team members","default":false},"notifications_work_breaks_only_leads":{"type":"boolean","description":"Only team leads receive work break notifications. Requires notifications_work_breaks enabled.","default":false},"manage_team_projects":{"type":"boolean","description":"Team leads can create team projects","default":true},"manage_team_members":{"type":"boolean","description":"Team leads can edit members and their roles","default":true},"invite_members_to_organization":{"type":"boolean","description":"Team leads can invite new members to the organization","default":false},"notifications_for_job_sites":{"type":"boolean","description":"Team leads receive job site notifications","default":true},"notifications_for_job_sites_only_leads":{"type":"boolean","description":"Only team leads receive job site notifications. Requires notifications_for_job_sites enabled.","default":false},"others_screenshots":{"type":"boolean","description":"View screenshots/activities for other members","default":true},"manage_billing":{"type":"boolean","description":"Manage financials","default":false}}}},"required":["name"],"description":"Create team"},"TimeEditLog":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Time edit log ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"starts_at":{"type":"string","format":"date-time","description":"The start time of the final time entry"},"stops_at":{"type":"string","format":"date-time","description":"The stop time of the final time entry"},"original_starts_at":{"type":"string","format":"date-time","description":"The start time of the original time entry"},"original_stops_at":{"type":"string","format":"date-time","description":"The stop time of the original time entry"},"blame_user_id":{"type":"integer","format":"int64","description":"User ID who created the time edit log"},"user_id":{"type":"integer","format":"int64","description":"User ID to which the time edit log belongs"},"original_project_id":{"type":"integer","format":"int64","description":"Original Project ID"},"original_task_id":{"type":"integer","format":"int64","description":"Original Task ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID"},"action":{"type":"string","description":"Action type"},"added_duration":{"type":"integer","format":"int32","description":"The number of seconds that were added due to this edit"},"deleted_duration":{"type":"integer","format":"int32","description":"The number of seconds that were deleted due to this edit"},"replaced_duration":{"type":"integer","format":"int32","description":"The number of seconds that were replaced due to this edit"},"reason":{"type":"string","description":"Reason for making the change"}},"required":["id","created_at","starts_at","stops_at","blame_user_id","user_id","action","added_duration","deleted_duration","replaced_duration","reason"],"description":"TimeEditLog model"},"TimeOffBalance":{"type":"object","properties":{"user_id":{"type":"integer","format":"int64","description":"User ID"},"time_off_policy_id":{"type":"integer","format":"int64","description":"Time off policy ID"},"policy_name":{"type":"string","description":"Time off policy name"},"amount":{"type":"integer","format":"int64","description":"Balance amount in seconds"}},"required":["user_id","time_off_policy_id","policy_name","amount"],"description":"TimeOffBalance model"},"postV2OrganizationsOrganizationIdTimeOffBalances":{"type":"object","properties":{"reason":{"type":"string","description":"Reason for adjustment"},"apply_accruals":{"type":"boolean","description":"Apply annual accrual to newly assigned users","default":false},"balance_adjustments":{"type":"array","items":{"type":"object","properties":{"time_off_policy_id":{"type":"integer","format":"int32","description":"Time off policy ID"},"user_ids":{"type":"array","description":"User IDs to adjust","items":{"type":"integer","format":"int32"}},"amount":{"type":"integer","format":"int32","description":"Amount in seconds"},"modify_balance":{"type":"string","description":"Whether to add to or replace the current balance","enum":["add","replace"]}},"required":["time_off_policy_id","user_ids","amount","modify_balance"]}}},"required":["reason","balance_adjustments"],"description":"Add organization time off balance adjustments"},"TimeOffPolicy":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Time off policy ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"name":{"type":"string","description":"Time off policy name"},"created_by_id":{"type":"integer","format":"int64","description":"User ID who created the policy"},"auto_add_new_users":{"type":"boolean","description":"Automatically add new members to this policy"},"allow_negative_balances":{"type":"boolean","description":"Member can request time off before having the balance for it."},"requires_approval":{"type":"boolean","description":"When false time off requests are automatically approved."},"balance_rolls_over_annually":{"type":"boolean","description":"balance rolls over annually"},"paid":{"type":"boolean","description":"When true members will be paid for time off taken."},"status":{"type":"string","description":"Policy status"},"policy_type":{"type":"string","description":"Type of policy"},"policy_config":{"type":"object","properties":{"starting_balance":{"type":"number","format":"float","description":"Starting balance (hours)"},"hours_per":{"type":"integer","format":"int32","description":"Hours per at amount accrued"},"hours_worked":{"type":"integer","format":"int32","description":"Hours worked at amount accrued"},"maximum_to_accrue":{"type":"integer","format":"int32","description":"Maximum amount of time off that can be accrued per year. (hours)"},"hours_per_year":{"type":"integer","format":"int32","description":"Hours per year"},"hours_per_month":{"type":"number","format":"float","description":"Hours per month"},"accrual_period":{"type":"string","enum":["month","year"],"description":"Accrual period. If set to \"month\", hours_per_month is required. If set to \"year\", hours_per_year is required"},"accrual_day":{"type":"string","enum":["first_day_of_month","monthly_anniversary","last_day_of_month"],"description":"Day of the month when accrual happens"},"prorate_on_start":{"type":"boolean","description":"Whether to prorate time based on start date"}}},"membership_rules":{"type":"object","properties":{"countries":{"type":"Array[String]","description":"ISO 3166-1 alpha-2 country codes"},"employment_types":{"type":"Array[String]","description":"Employment type filters"}},"required":["countries","employment_types"]}},"required":["id","organization_id","created_at","updated_at","name","auto_add_new_users","allow_negative_balances","requires_approval","balance_rolls_over_annually","paid","status","policy_type","policy_config"],"description":"TimeOffPolicy model"},"postV2OrganizationsOrganizationIdTimeOffPolicies":{"type":"object","properties":{"name":{"type":"string","description":"Policy name"},"accrual_type":{"type":"string","enum":["none","annual","monthly","hours_worked","joined_date"]},"accrual_policy":{"type":"object","description":"Accrual configuration (depends on accrual_type)","properties":{"hours_per_year":{"type":"number","format":"float"},"hours_worked":{"type":"number","format":"float"},"hours_per":{"type":"number","format":"float"},"maximum_to_accrue":{"type":"number","format":"float","description":"Max accrual hours/year (required except none and monthly)"},"hours_per_month":{"type":"number","format":"float"},"accrual_period":{"type":"string","enum":["month","year"]},"accrual_day":{"type":"string","enum":["first_day_of_month","monthly_anniversary","last_day_of_month"]},"prorate_on_start":{"type":"boolean"},"starting_balance":{"type":"number","format":"float"}}},"allow_negative_balances":{"type":"boolean"},"requires_approval":{"type":"boolean"},"balance_rolls_over_annually":{"type":"boolean"},"paid":{"type":"boolean"},"auto_add_new_users":{"type":"boolean"},"time_off_policy_user_ids":{"type":"array","description":"User IDs to add as members","items":{"type":"integer","format":"int32"}},"membership_rules":{"type":"object","description":"Auto-membership rules","properties":{"countries":{"type":"array","description":"ISO 3166-1 alpha-2 country codes","items":{"type":"string"}},"employment_types":{"type":"array","description":"Member employment type filter","items":{"type":"string","enum":["contractor_hourly","contractor_fixed_rate","contractor_project_based","fte_hourly","fte_salary","pte_hourly","pte_salary"]}}}}},"required":["name","accrual_type","allow_negative_balances","requires_approval","balance_rolls_over_annually","paid"],"description":"Create time off policy"},"TimeOffRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Time edit log ID"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"time_off_policy_id":{"type":"integer","format":"int64","description":"Time off request ID"},"status":{"type":"string","description":"Status"},"all_day":{"type":"boolean","description":"Time off request for all day (User's time zone)"},"starts_at":{"type":"string","format":"date-time","description":"Time off request start time"},"stops_at":{"type":"string","format":"date-time","description":"Time off request stop time"},"submitted_at":{"type":"string","format":"date-time","description":"Time off request submission time"},"approved_at":{"type":"string","format":"date-time","description":"Time off request approving time"},"denied_at":{"type":"string","format":"date-time","description":"Time off request denial time"},"paid":{"type":"boolean","description":"If the time off request has been paid"},"amount_used":{"type":"integer","format":"int32","description":"Time off request amount used"},"message":{"type":"string","description":"message"},"response":{"type":"string","description":"response"},"created_by_id":{"type":"integer","format":"int64","description":"User ID from creator"},"approved_by_id":{"type":"integer","format":"int64","description":"Approving User ID"},"denied_by_id":{"type":"integer","format":"int64","description":"Denying User ID"},"team_payment_detail_id":{"type":"integer","format":"int64","description":"Team payment detail ID"},"team_payment_id":{"type":"integer","format":"int64","description":"Team payment ID"},"time_off_request_days":{"$ref":"#/definitions/TimeOffRequestDay","description":"Individual work days covered by this time off request"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","user_id","time_off_policy_id","status","all_day","starts_at","stops_at","paid","amount_used","created_by_id","time_off_request_days","created_at","updated_at"],"description":"TimeOffRequest model"},"TimeOffRequestDay":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"Date of the time off day"},"amount_used":{"type":"integer","format":"int32","description":"Amount of time used in seconds for this day"},"starts_at":{"type":"string","format":"date-time","description":"Start time for this specific day"},"stops_at":{"type":"string","format":"date-time","description":"Stop time for this specific day"},"holiday":{"type":"boolean","description":"Whether this day is a holiday"},"paid":{"type":"boolean","description":"Whether this day has been paid"}},"required":["date","amount_used","starts_at","stops_at","holiday","paid"]},"postV2OrganizationsOrganizationIdTimeOffRequests":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"User ID"},"time_off_policy_id":{"type":"integer","format":"int32","description":"Time off policy ID"},"starts_at":{"type":"string","format":"date-time","description":"Start time (ISO 8601)"},"stops_at":{"type":"string","format":"date-time","description":"Stop time (ISO 8601)"},"message":{"type":"string","description":"Reason for time off"},"all_day":{"type":"boolean","description":"Full day request","default":true},"exclude_weekends":{"type":"boolean","default":false},"exclude_holidays":{"type":"boolean","default":false},"require_no_shift_overlap":{"type":"boolean","description":"Reject if overlapping shifts exist","default":false},"remove_shifts":{"type":"boolean","description":"Remove overlapping attendance shifts. Only honored when the policy does not require approval (auto-approved requests). For policies that require approval, use the status endpoint to remove shifts upon approval."},"time_off_request_days":{"type":"array","description":"Day allocations","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"amount_used":{"type":"integer","format":"int32","description":"Seconds"}},"required":["date","amount_used"]}}},"required":["user_id","time_off_policy_id","starts_at","stops_at","message","time_off_request_days"],"description":"Create time off request"},"Timesheet":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Timesheet ID"},"paid":{"type":"boolean","description":"Is the timesheet paid?"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"organization_id":{"type":"integer","format":"int64","description":"Organization ID"},"team_payment_id":{"type":"integer","format":"int64","description":"Team payment ID"},"team_invoice_id":{"type":"integer","format":"int64","description":"Team invoice ID"},"status":{"type":"string","description":"Status"},"keyboard":{"type":"integer","format":"int32","description":"Percentage of time keyboard was active within the time worked"},"mouse":{"type":"integer","format":"int32","description":"Percentage of time mouse was active within the time worked"},"overall":{"type":"integer","format":"int32","description":"Percentage of overall time active within the time worked"},"tracked":{"type":"integer","format":"int32","description":"Total time worked in seconds"},"input_tracked":{"type":"integer","format":"int32","description":"Total time worked in seconds when inputs (keyboard, mouse) were active"},"start_date":{"type":"string","format":"date","description":"Start date"},"stop_date":{"type":"string","format":"date","description":"Stop date"},"approved_on":{"type":"string","format":"date","description":"Approving date"},"submitted_on":{"type":"string","format":"date","description":"Submission date"},"approved_by_id":{"type":"integer","format":"int64","description":"Approving User ID"},"denial_reason":{"type":"string","description":"Denial reason"},"locked":{"type":"boolean","description":"Is the timesheet locked"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","paid","user_id","organization_id","status","keyboard","mouse","overall","tracked","input_tracked","start_date","stop_date","locked","created_at","updated_at"],"description":"Timesheet model"},"ToolUsage":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Tool usage ID"},"name":{"type":"string","description":"URL site or application name"},"tool_type":{"type":"string","description":"Tool type: application or url"},"date":{"type":"string","format":"date","description":"Organization date"},"time_slot":{"type":"string","format":"date-time","description":"Time slot"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"task_id":{"type":"integer","format":"int64","description":"Task ID"},"tracked":{"type":"integer","format":"int32","description":"Total time in seconds spent on this tool"},"details":{"type":"array","items":{"$ref":"#/definitions/UrlActivityDetail"},"description":"URL activity details"},"activations":{"type":"integer","format":"int32","description":"Number of times the app was brought to focus"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","name","tool_type","date","time_slot","user_id","project_id","tracked","created_at","updated_at"],"description":"ToolUsage model"},"UrlActivityDetail":{"type":"object","properties":{"title":{"type":"string","description":"Page title"},"url":{"type":"string","description":"Visited URL"},"tracked":{"type":"integer","format":"int32","description":"Total time in seconds spent on this URL"}},"required":["title","url","tracked"]},"TrackingState":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Tracking state event ID"},"occurred_at":{"type":"string","format":"date-time","description":"When the tracking state transition occurred (client-reported, UTC)"},"type":{"type":"string","description":"Event type: start or stop"},"user_id":{"type":"integer","format":"int64","description":"User ID"},"project_id":{"type":"integer","format":"int64","description":"Project ID"},"project_type":{"type":"string","description":"Project type (project, work_order, work_break)"},"task_id":{"type":"integer","format":"int64","description":"Task ID"}},"required":["id","occurred_at","type","user_id","project_id","project_type","task_id"],"description":"TrackingState model"},"postV2OrganizationsOrganizationIdWebhooks":{"type":"object","properties":{"events":{"type":"array","description":"Array of event types to subscribe to. Use [\"*\"] for all events.","items":{"type":"string"}},"target_url":{"type":"string","description":"The URL that will receive webhook POST requests"}},"required":["events","target_url"],"description":"Create organization webhook"},"WorkBreakProject":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Work break project ID"},"billable":{"type":"boolean","description":"Whether time on this break is billable"},"description":{"type":"string","description":"Description of the break"},"name":{"type":"string","description":"Name of the work break"},"trackable":{"type":"boolean","description":"Whether the break is trackable"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"},"policy":{"$ref":"#/definitions/WorkBreakPolicy","description":"Associated break policy"}},"required":["id","billable","description","name","trackable","created_at","updated_at","policy"],"description":"WorkBreakProject model"},"WorkBreakPolicy":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Policy ID"},"policy_duration":{"type":"integer","format":"int32","description":"Configured duration of the break"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","policy_duration","created_at","updated_at"]},"putV2OvertimePoliciesOvertimePolicyId":{"type":"object","properties":{"name":{"type":"string","description":"Policy name (2-50 characters)"},"policy_type":{"type":"string","description":"Cannot be changed once the policy is created","enum":["daily","weekly"]},"threshold":{"type":"number","format":"float","description":"Hours worked per period before overtime applies"},"pay_rate_multiplier":{"type":"number","format":"float","description":"Pay rate multiplier after the threshold"},"user_ids":{"type":"array","description":"User IDs to set as the policy members","items":{"type":"integer","format":"int32"}},"auto_add_new_users":{"type":"boolean","description":"Automatically add new members to this policy"},"notification_enabled":{"type":"boolean","description":"Whether overtime notifications are sent"},"notification_role_ids":{"type":"array","description":"Roles notified about overtime","items":{"type":"string","enum":["owner","manager","team_lead"]}},"starts_on":{"type":"string","format":"date","description":"Scheduled start date (period-aligned)"},"override":{"type":"boolean","description":"When assigning members, move any who are already on another active policy of the same type into this one. Without it, the request fails if any assigned member is already on such a policy.","default":false}},"description":"Update overtime policy"},"putV2ProjectsProjectId":{"type":"object","properties":{"name":{"type":"string","description":"The new name of the project"},"description":{"type":"string","description":"The new description of the project"},"client_id":{"type":"integer","format":"int32","description":"The client ID"},"billable":{"type":"boolean","description":"Whether time logged against this project is by default billable"},"status":{"type":"string","description":"The project status.","enum":["active","archived"]},"budget":{"type":"object","description":"Budget configuration","properties":{"type":{"type":"string","description":"The method for controlling the budget","enum":["cost","hours"]},"rate":{"type":"string","description":"When budget type is cost, specifies which rate to use.","enum":["bill_rate","pay_rate"],"default":"bill_rate"},"cost":{"type":"number","format":"float","description":"When budget type is cost. defines the cost limit."},"hours":{"type":"number","format":"float","description":"When budget type is hours. defines the hours limit."},"start_date":{"type":"string","format":"date","description":"The start date for the budget."},"recurrence":{"type":"string","description":"If given, makes budget reset on a weekly or monthly basis","enum":["weekly","monthly"]},"recurrence_start":{"type":"integer","format":"int32","description":"Day of week (0-6, 0=Sunday) for weekly recurrence, or day of month (1-31) for monthly recurrence"},"include_non_billable":{"type":"boolean","description":"Whether the budget includes non billable time","default":true},"stop_timer_when_budget_reached":{"type":"boolean","description":"Whether to stop timers when budget limit is reached"},"stop_at":{"type":"integer","format":"int32","description":"The budget percentage at which timers stop automatically"},"alerts":{"type":"object","properties":{"near_limit":{"type":"integer","format":"int32","description":"The percentage threshold for notifying when approaching the budget."},"notify_enabled":{"type":"boolean","description":"Whether budget notifications are enabled"},"notify_all_members":{"type":"boolean","description":"Whether to notify all project members"},"notify_group":{"type":"string","description":"The group to notify","enum":["all_members","org_management"]}}}},"required":["type","stop_at"]},"pay_rate":{"type":"number","format":"float","description":"Default pay rate (will be rounded to 2 decimal places). Set to null to remove the rate"},"bill_rate":{"type":"number","format":"float","description":"Default bill rate (will be rounded to 2 decimal places). Set to null to remove the rate"}},"description":"Update project"},"putV2ProjectsProjectIdUpdateMembers":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"User ID"},"role":{"type":"string","description":"Role for the user.","enum":["viewer","user","manager","remove"]},"pay_rate":{"type":"number","format":"float","description":"Default pay rate (will be rounded to 2 decimal places). Set to null to remove the rate"},"bill_rate":{"type":"number","format":"float","description":"Default bill rate (will be rounded to 2 decimal places). Set to null to remove the rate"}},"required":["user_id"]}}},"required":["members"],"description":"Update project members"},"putV2ProjectsProjectIdUpdateMetadata":{"type":"object","properties":{"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["metadata"],"description":"Update project metadata"},"MemberLimit":{"type":"object","properties":{"id":{"type":"integer","format":"int64","description":"Member limit group ID"},"type":{"type":"string","enum":["cost","hours"],"description":"Member limit type"},"rate":{"type":"string","enum":["bill_rate","pay_rate"],"description":"Rate used when type is cost"},"cost":{"type":"number","format":"float","description":"Cost limit when type is cost"},"hours":{"type":"number","format":"float","description":"Hours limit when type is hours"},"start_date":{"type":"string","format":"date","description":"Start date for fixed (non-recurring) budgets"},"recurrence":{"type":"string","enum":["weekly","monthly"],"description":"Budget recurrence period"},"recurrence_start":{"type":"integer","format":"int32","description":"Weekly: day of week (0=Sunday through 6=Saturday). Monthly: day of month (1-31)."},"alerts":{"type":"object","description":"Project-level alert settings shared by all member limit groups on the project"},"member_ids":{"type":"array","items":{"type":"integer","format":"int64"},"description":"User IDs assigned to this member limit group"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["id","type","alerts","member_ids","created_at","updated_at"],"description":"MemberLimit model"},"postV2ProjectsProjectIdMemberLimits":{"type":"object","properties":{"type":{"type":"string","description":"Member limit type (`cost` or `hours`)","enum":["cost","hours"]},"rate":{"type":"string","description":"When type is cost, specifies which rate to use (`bill_rate` or `pay_rate`)","enum":["bill_rate","pay_rate"]},"cost":{"type":"number","format":"float","description":"Cost limit (required when type is cost)"},"hours":{"type":"number","format":"float","description":"Hours limit (required when type is hours)"},"start_date":{"type":"string","format":"date","description":"Start date for fixed budgets (mutually exclusive with recurrence)"},"recurrence":{"type":"string","description":"Makes the limit reset periodically. Omit for fixed budgets","enum":["weekly","monthly"]},"recurrence_start":{"type":"integer","format":"int32","description":"Weekly: 0=Sunday..6=Saturday. Monthly: day of month (1-31)","minimum":0,"maximum":31},"alerts":{"type":"object","description":"Project-level alert settings shared across all groups on the project","properties":{"near_limit":{"type":"integer","format":"int32","description":"Percentage threshold for approaching-limit notifications (1-99)","minimum":1,"maximum":99},"notify_members":{"type":"boolean","description":"Whether to notify members when approaching the limit"}}},"member_ids":{"type":"array","description":"Project member user IDs assigned to the group","items":{"type":"integer","format":"int32"}}},"required":["type","member_ids"],"description":"Create project member limit"},"putV2ProjectsProjectIdMemberLimitsMemberLimitId":{"type":"object","properties":{"type":{"type":"string","description":"Member limit type (`cost` or `hours`)","enum":["cost","hours"]},"rate":{"type":"string","description":"When type is cost, specifies which rate to use (`bill_rate` or `pay_rate`)","enum":["bill_rate","pay_rate"]},"cost":{"type":"number","format":"float","description":"Cost limit (required when type is cost)"},"hours":{"type":"number","format":"float","description":"Hours limit (required when type is hours)"},"start_date":{"type":"string","format":"date","description":"Start date for fixed budgets (mutually exclusive with recurrence)"},"recurrence":{"type":"string","description":"Makes the limit reset periodically. Omit to preserve existing recurrence","enum":["weekly","monthly"]},"recurrence_start":{"type":"integer","format":"int32","description":"Weekly: 0=Sunday..6=Saturday. Monthly: day of month (1-31)","minimum":0,"maximum":31},"alerts":{"type":"object","description":"Project-level alert settings shared across all groups on the project","properties":{"near_limit":{"type":"integer","format":"int32","description":"Percentage threshold for approaching-limit notifications (1-99)","minimum":1,"maximum":99},"notify_members":{"type":"boolean","description":"Whether to notify members when approaching the limit"}}},"member_ids":{"type":"array","description":"Replaces the group member list when provided","items":{"type":"integer","format":"int32"}}},"description":"Update project member limit"},"ProjectMember":{"type":"object","properties":{"user_id":{"type":"integer","format":"int64","description":"User ID"},"pay_rate":{"type":"string","description":"Pay rate"},"bill_rate":{"type":"string","description":"Bill rate"},"currency":{"type":"string","description":"Currency of pay and bill rates"},"membership_role":{"type":"string","description":"Membership role"},"membership_status":{"type":"string","description":"Membership status"},"created_at":{"type":"string","format":"date-time","description":"When the member was added to the organization/project"},"updated_at":{"type":"string","format":"date-time","description":"When the membership was last updated"},"removed_at":{"type":"string","format":"date-time","description":"When the member was removed"},"last_client_activity":{"type":"string","format":"date-time","description":"Last client activity of user"},"team_id":{"type":"integer","format":"int64","description":"Team ID"},"profile":{"$ref":"#/definitions/OrganizationMemberProfile"}},"required":["user_id","membership_role","membership_status","created_at","updated_at","last_client_activity"],"description":"ProjectMember model"},"postV2ProjectsProjectIdTasks":{"type":"object","properties":{"assignee_id":{"type":"integer","format":"int32","description":"Assignee Id"},"assignee_ids":{"type":"array","description":"Assignee Ids","items":{"type":"integer","format":"int32"}},"summary":{"type":"string","description":"To-do summary"},"pay_rate":{"type":"number","format":"float","description":"Pay rate. Set to null to remove"},"bill_rate":{"type":"number","format":"float","description":"Bill rate. Set to null to remove"},"metadata":{"type":"array","description":"Task metadata. See the update_metadata endpoint","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["summary"],"description":"Create task"},"postV2ProjectsProjectIdWebhooks":{"type":"object","properties":{"events":{"type":"array","description":"Array of event types to subscribe to. Use [\"*\"] for all events.","items":{"type":"string"}},"target_url":{"type":"string","description":"The URL that will receive webhook POST requests"}},"required":["events","target_url"],"description":"Create project webhook"},"putV2TasksTaskId":{"type":"object","properties":{"assignee_id":{"type":"integer","format":"int32","description":"User Id"},"assignee_ids":{"type":"array","description":"User Ids","items":{"type":"integer","format":"int32"}},"lock_version":{"type":"integer","format":"int32","description":"Lock version"},"summary":{"type":"string","description":"To-do summary"},"status":{"type":"string","description":"The task status.","enum":["active","completed"]},"pay_rate":{"type":"number","format":"float","description":"Pay rate. Set to null to remove"},"bill_rate":{"type":"number","format":"float","description":"Bill rate. Set to null to remove"},"metadata":{"type":"array","description":"Task metadata. See the update_metadata endpoint","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["lock_version"],"description":"Update task"},"putV2TasksTaskIdUpdateMetadata":{"type":"object","properties":{"lock_version":{"type":"integer","format":"int32","description":"Lock version"},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["lock_version","metadata"],"description":"Update task metadata"},"TeamMember":{"type":"object","properties":{"user_id":{"type":"integer","format":"int64","description":"User ID"},"role":{"type":"string","description":"Default Project role"},"lead":{"type":"boolean","description":"Is the member a team lead?"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["user_id","role","lead","created_at","updated_at"],"description":"TeamMember model"},"TeamProject":{"type":"object","properties":{"project_id":{"type":"integer","format":"int64","description":"Project ID"},"created_at":{"type":"string","format":"date-time","description":"When the record was created"},"updated_at":{"type":"string","format":"date-time","description":"When the record was last updated"}},"required":["project_id","created_at","updated_at"],"description":"TeamProject model"},"putV2TeamsTeamId":{"type":"object","properties":{"name":{"type":"string","description":"The new name of the team"},"lead_options":{"type":"object","properties":{"approve_timesheets":{"type":"boolean","description":"Team leads can approve timesheets for team members"},"notifications_for_timesheets_only_leads":{"type":"boolean","description":"Only team leeds receive timesheet notifications. Requires approve_timesheets enabled."},"approve_time_off":{"type":"boolean","description":"Team leads can approve time off for team members"},"approve_manual_time":{"type":"boolean","description":"Team leads can approve manual time added for team members"},"receive_manual_time_notification":{"type":"boolean","description":"Only team leads receive manual time notifications. Requires approve_manual_time enabled."},"notifications_for_time_off_only_leads":{"type":"boolean","description":"Only team leads receive time off notifications. Requires approve_time_off enabled."},"schedule_shifts":{"type":"boolean","description":"Team leads can schedule shifts for team members"},"notifications_for_schedules_only_leads":{"type":"boolean","description":"Only team leads receive notifications for shifts. Requires schedule_shifts enabled."},"notifications_for_limits":{"type":"boolean","description":"Team leads receive weekly and daily limit notifications for team members"},"notifications_for_limits_only_leads":{"type":"boolean","description":"Team lead only receive weekly and daily limit notifications. Requires notifications_for_limits enabled."},"notifications_work_breaks":{"type":"boolean","description":"Team leads receive work break notifications for team members"},"notifications_work_breaks_only_leads":{"type":"boolean","description":"Only team leads receive work break notifications. Requires notifications_work_breaks enabled."},"manage_team_projects":{"type":"boolean","description":"Team leads can create team projects"},"manage_team_members":{"type":"boolean","description":"Team leads can edit members and their roles"},"invite_members_to_organization":{"type":"boolean","description":"Team leads can invite new members to the organization"},"notifications_for_job_sites":{"type":"boolean","description":"Team leads receive job site notifications"},"notifications_for_job_sites_only_leads":{"type":"boolean","description":"Only team leads receive job site notifications. Requires notifications_for_job_sites enabled."},"others_screenshots":{"type":"boolean","description":"View screenshots/activities for other members"},"manage_billing":{"type":"boolean","description":"Manage financials"}}}},"description":"Update team"},"putV2TeamsTeamIdUpdateMembers":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","format":"int32","description":"User ID"},"role":{"type":"string","description":"Role for the user.","enum":["viewer","user","manager","remove"]},"lead":{"type":"boolean","description":"Whether to set this user as a team lead"}},"required":["user_id"]}}},"required":["members"],"description":"Update team members"},"putV2TeamsTeamIdUpdateProjects":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":"integer","format":"int32","description":"List of project to add to the team"},"remove":{"type":"boolean","description":"If true then remove the project instead of adding it"}},"required":["project_id"]}}},"required":["projects"],"description":"Update team projects"},"putV2TeamsTeamIdUpdateMetadata":{"type":"object","properties":{"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The metadata key"},"value":{"type":"string","description":"The value for the metadata key"}},"required":["key","value"]}}},"required":["metadata"],"description":"Update team metadata"},"putV2TimeOffPoliciesTimeOffPolicyId":{"type":"object","properties":{"name":{"type":"string","description":"Policy name"},"accrual_policy":{"type":"object","description":"Accrual configuration (depends on accrual_type)","properties":{"hours_per_year":{"type":"number","format":"float"},"hours_worked":{"type":"number","format":"float"},"hours_per":{"type":"number","format":"float"},"maximum_to_accrue":{"type":"number","format":"float","description":"Max accrual hours/year (required except none and monthly)"},"hours_per_month":{"type":"number","format":"float"},"accrual_period":{"type":"string","enum":["month","year"]},"accrual_day":{"type":"string","enum":["first_day_of_month","monthly_anniversary","last_day_of_month"]},"prorate_on_start":{"type":"boolean"},"starting_balance":{"type":"number","format":"float"}}},"allow_negative_balances":{"type":"boolean"},"requires_approval":{"type":"boolean"},"balance_rolls_over_annually":{"type":"boolean"},"paid":{"type":"boolean"},"auto_add_new_users":{"type":"boolean"},"time_off_policy_user_ids":{"type":"array","description":"User IDs to set as members","items":{"type":"integer","format":"int32"}}},"description":"Update time off policy"},"putV2TimeOffRequestsTimeOffRequestIdStatus":{"type":"object","properties":{"status":{"type":"string","description":"New status","enum":["approved","denied"]},"response":{"type":"string","description":"Denial reason (required when denying)"},"remove_shifts":{"type":"boolean","description":"Remove overlapping shifts (used when approving)"}},"required":["status"],"description":"Update time off request status"},"putV2TimeOffRequestsTimeOffRequestId":{"type":"object","properties":{"time_off_policy_id":{"type":"integer","format":"int32","description":"Time off policy ID"},"starts_at":{"type":"string","format":"date-time","description":"Start time (ISO 8601)"},"stops_at":{"type":"string","format":"date-time","description":"Stop time (ISO 8601)"},"message":{"type":"string","description":"Reason for time off"},"all_day":{"type":"boolean","description":"Full day request","default":true},"exclude_weekends":{"type":"boolean","default":false},"exclude_holidays":{"type":"boolean","default":false},"require_no_shift_overlap":{"type":"boolean","description":"Reject if overlapping shifts exist","default":false},"remove_shifts":{"type":"boolean","description":"Remove overlapping attendance shifts. Only honored when the policy does not require approval (auto-approved requests). For policies that require approval, use the status endpoint to remove shifts upon approval."},"time_off_request_days":{"type":"array","description":"Day allocations","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"amount_used":{"type":"integer","format":"int32","description":"Seconds"}},"required":["date","amount_used"]}}},"required":["time_off_policy_id","starts_at","stops_at","message","time_off_request_days"],"description":"Update time off request"},"putV2TimesheetsTimesheetId":{"type":"object","properties":{"status":{"type":"string","description":"New status","enum":["open","submitted","approved","denied"]},"denial_reason":{"type":"string","description":"Denial reason"},"confirm_pending_manual_time_request_denial":{"type":"boolean","description":"Required to approve a timesheet with pending manual time requests that will be denied."},"acknowledge_pending_time_off_requests":{"type":"boolean","description":"Required to approve a timesheet with pending time off requests in the same period."}},"required":["status"],"description":"Update timesheet status"},"postV2UsersMeWebhooks":{"type":"object","properties":{"events":{"type":"array","description":"Array of event types to subscribe to. Use [\"*\"] for all events.","items":{"type":"string"}},"target_url":{"type":"string","description":"The URL that will receive webhook POST requests"}},"required":["events","target_url"],"description":"Create me webhook"},"postV2UsersUserIdTimeEntries":{"type":"object","properties":{"billable":{"type":"boolean","description":"Whether the time is billable or not. Defaults to the project setting."},"note":{"type":"string","description":"(it's REQUIRED by default) Can be modified to be optional in the Require Reason setting "},"project_id":{"type":"integer","format":"int32","description":"Project ID"},"start_time":{"type":"string","format":"date-time","description":"The start time for the activity in ISO8601 format"},"tracked":{"type":"integer","format":"int32","description":"The number of seconds tracked"},"task_id":{"type":"integer","format":"int32","description":"Task ID"}},"required":["project_id","start_time","tracked"],"description":"Create time entry"}}}