{"openapi":"3.1.0","info":{"title":"Windmill API","version":"2.0.0","description":"Use the Windmill API to integrate your systems, automate workflows, and build applications on your organization's data. Authenticate with an API key or OAuth access token. Each request uses the authenticated user's permissions within the selected workspace."},"paths":{"/c/{companyId}/employees/search":{"post":{"operationId":"employees.search","summary":"Search employee profiles","description":"Returns a page of employee names, contact details, job titles, manager IDs, and workspace membership details. For an individual employee's employment details and all known email addresses, use GET /c/{companyId}/employees/{employeeId}. Current employees are selected by default. Pages start at 1; pageSize defaults to 20 and is limited to 100. Set include.total to true to request a count; otherwise pagination.total is omitted. Without sort, a top-level filter.query uses relevance descending and other searches use name ascending.","tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchEmployeesRequest"}}}},"responses":{"200":{"description":"Employee profiles and pagination. Total is present only when requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchEmployeeMinViewsResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees/{employeeId}":{"get":{"operationId":"employees.get","summary":"Get an employee profile","description":"Returns one employee profile by ID, including identity and contact details, employment status, all known email addresses, direct-report counts, and the manager's profile. Current and former employees can be retrieved. Returns 404 when the employee does not exist in the company.","tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque employee ID in the company. This identifies an org-chart person, not a member or user.","title":"Employee ID","example":"employee-avery"},"required":true,"description":"Opaque employee ID in the company. This identifies an org-chart person, not a member or user.","name":"employeeId","in":"path"}],"responses":{"200":{"description":"The requested employee profile, including current or former status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEmployeeResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"patch":{"operationId":"employees.update","summary":"Update an employee profile","description":"Updates the supplied fields and returns the employee profile. Omitted fields keep their values; nullable fields accept null to clear them. Supply at least one field. primaryEmail must already be linked to the employee. Managers must belong to the company; an employee cannot become their own manager, directly or through their reporting chain. Value changes keep field ownership unchanged unless the field keys are included in claimOwnership. Include an integration-owned field in claimOwnership to switch it to manual ownership, or set its source to manual through PUT /c/{companyId}/employees/{employeeId}/field-sources/{fieldKey}. Ownership claims also work without value changes. The response omits some editable fields, including jobLevel, gender, and pronouns. Use PUT /c/{companyId}/employees/{employeeId}/employment-status to archive or restore an employee. Requires permission to manage employee profiles (`org_chart.manage`).","x-windmill-capabilities":{"allOf":["org_chart.manage"]},"tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque employee ID in the company. This identifies an org-chart person, not a member or user.","title":"Employee ID","example":"employee-avery"},"required":true,"description":"Opaque employee ID in the company. This identifies an org-chart person, not a member or user.","name":"employeeId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeePatch"}}}},"responses":{"200":{"description":"Extended employee profile after the patch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees/search/ids":{"post":{"operationId":"employees.searchIds","summary":"Search employee IDs","description":"Returns matching employee IDs in ascending order. Accepts the same filters as POST /c/{companyId}/employees/count. Current employees are selected by default. Pages start at 1; pageSize defaults to 1000 and is limited to 1000. Set include.total to true to request the matching count. Continue while pagination.hasMore is true.","tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindEmployeeIdsRequest"}}}},"responses":{"200":{"description":"Matching employee IDs and pagination for pages of up to 1000 IDs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindEmployeeIdsResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees/count":{"post":{"operationId":"employees.count","summary":"Count matching employees","description":"Returns the number of employees matching the same filter as the employee search routes. Current employees are selected by default. Omit the request body or send {} to count current employees without additional filters. Use filter.status = FORMER or ALL to count former employees or both statuses. This operation returns a total only and does not accept pagination or sort fields.","tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterEmployeesRequest"}}}},"responses":{"200":{"description":"Total number of matching employees, including zero when none match.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountEmployeesResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees":{"post":{"operationId":"employees.create","summary":"Create an employee","description":"Creates a new org-chart employee without inviting them to the workspace. An email matching any existing employee, including a former employee, returns 409 without changing the record. To restore a former employee, use PUT /c/{companyId}/employees/{employeeId}/employment-status with CURRENT. A supplied manager must be a current employee in the same company. Returns 201. Requires permission to manage employee profiles (`org_chart.manage`).","x-windmill-capabilities":{"allOf":["org_chart.manage"]},"tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeRequest"}}}},"responses":{"201":{"description":"New employee profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees/{employeeId}/employment-status":{"put":{"operationId":"employees.employmentStatus.update","summary":"Set an employee's employment status","description":"Sets CURRENT to restore an employee or FORMER to archive them without deleting their record. Repeating the existing status succeeds without a change. Rippling-managed employees cannot change status through this endpoint. An employee with active workspace access or a current direct report cannot become FORMER; remove their workspace access and reassign their direct reports first. Returns the updated employee profile. Requires permission to manage employee profiles (`org_chart.manage`).","x-windmill-capabilities":{"allOf":["org_chart.manage"]},"tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Opaque employee ID in the company. This identifies an org-chart person, not a member or user.","title":"Employee ID","example":"employee-avery"},"required":true,"description":"Opaque employee ID in the company. This identifies an org-chart person, not a member or user.","name":"employeeId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeEmploymentStatusRequest"}}}},"responses":{"200":{"description":"Employee profile with the requested employment status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeEmploymentStatusResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees/bulk":{"post":{"operationId":"employees.bulk.create","summary":"Create employees in bulk","description":"Creates 1 to 100 new employees and returns their profiles in input order. The entire batch fails without changes if an email matches an existing current or former employee, is repeated within the batch, or a manager is invalid. Email conflicts return 409. To restore a former employee, use PUT /c/{companyId}/employees/{employeeId}/employment-status with CURRENT. No workspace invitations are sent. Returns 201 for a successful batch. Requires permission to manage employee profiles (`org_chart.manage`).","x-windmill-capabilities":{"allOf":["org_chart.manage"]},"tags":["Employees"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeesRequest"}}}},"responses":{"201":{"description":"New employee profiles in input order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeesResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/field-sources/available-sources":{"get":{"operationId":"fieldSources.availableSources.list","summary":"List available employee field sources","description":"Lists connected sources that can supply employee fields, with the fields each source supports. Enabled SCIM provisioning is included, and manual ownership is always available for every supported field. This lists available choices; it does not show saved defaults or employee overrides. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"responses":{"200":{"description":"Available connected owning sources and supported fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAvailableEmployeeFieldSourcesResponse"}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/field-sources/defaults":{"get":{"operationId":"fieldSources.defaults.list","summary":"List company employee field defaults","description":"Lists saved company-wide field source defaults, ordered by field key. Each record has employeeId set to null. Employee overrides and fields without a saved default are omitted. An empty list means no defaults are saved. To find the source that applies to each employee, use POST /c/{companyId}/field-sources/resolve. This list is not paginated. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"responses":{"200":{"description":"Active company defaults, or an empty list when none are saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmployeeFieldSourceConfigsResponse"}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees/{employeeId}/field-sources":{"get":{"operationId":"employees.fieldSources.list","summary":"List employee field source overrides","description":"Lists saved source overrides for one employee, ordered by field key. Company defaults and fields without an override are omitted. An empty list means the employee has no saved overrides. To find the source that applies to each field, use POST /c/{companyId}/field-sources/resolve. Returns 404 when the employee does not exist in the company. This list is not paginated. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Employee ID in this company. This identifies an org-chart person, not a member.","title":"Employee ID","example":"employee-avery"},"required":true,"description":"Employee ID in this company. This identifies an org-chart person, not a member.","name":"employeeId","in":"path"}],"responses":{"200":{"description":"Active employee-specific overrides, or an empty list when none are saved.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListEmployeeFieldSourceConfigsResponse"},{"example":{"configs":[{"id":"field-config-job-title","companyId":"company-acme","employeeId":"employee-avery","fieldKey":"jobTitle","source":"manual","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z"}]}}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/field-sources/resolve":{"post":{"operationId":"fieldSources.resolve","summary":"Resolve effective employee field sources","description":"Returns the source that owns each requested employee field. An employee override takes precedence over the company default; fields with neither are omitted. Accepts up to 1000 employee IDs and 100 field keys. Repeated inputs are processed once in first-seen order. Every employee ID must belong to the company or the whole request returns 404. Omit fieldKeys to resolve all supported fields; an empty array for either input returns no results. isSyncing is true when Windmill can refresh the connected source and the latest saved field value has not been confirmed by that source. It does not indicate whether a sync job is running. This read does not start a sync or return employee field values. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveEmployeeFieldSourcesRequest"}}}},"responses":{"200":{"description":"Effective employee field owners and source-confirmation status; unowned pairs omitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveEmployeeFieldSourceIdsResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/field-sources/defaults/{fieldKey}":{"put":{"operationId":"fieldSources.defaults.set","summary":"Set a company employee field source","description":"Sets the company default source for the field in the URL. Existing employee overrides take precedence and are retained. A new source must be connected and support this field; manual is always available. Repeating the saved source returns the unchanged configuration, even after disconnection. This changes which source owns the field; it does not set an employee field value. When the selected source supports refresh, Windmill requests updated integration data in the background. A successful response confirms the ownership change, not that employee values have refreshed. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"$ref":"#/components/schemas/EmployeeFieldKey"},"required":true,"description":"Employee profile field whose owning source is configured or resolved.","name":"fieldKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetEmployeeFieldSourceRequest"}}}},"responses":{"200":{"description":"Saved company default. Employee overrides remain in effect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetEmployeeFieldSourceResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"delete":{"operationId":"fieldSources.defaults.delete","summary":"Remove a company employee field default","description":"Removes the company default for the field while retaining employee overrides. Returns 204 with no body, including when no default exists. Stored employee values and their history are preserved, even when no source owns the field. Removing a saved default can request updated data from the remaining sources in the background. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"$ref":"#/components/schemas/EmployeeFieldKey"},"required":true,"description":"Employee profile field whose owning source is configured or resolved.","name":"fieldKey","in":"path"}],"responses":{"204":{"description":"Company default removed or already absent. No response body."},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/employees/{employeeId}/field-sources/{fieldKey}":{"put":{"operationId":"employees.fieldSources.set","summary":"Set an employee field source override","description":"Sets the source for one employee field, taking precedence over the company default.\n\n- First call GET /c/{companyId}/field-sources/available-sources to choose a source that supports the field. New integration assignments require a connected source; manual is always available.\n- This request is idempotent: repeating the saved source returns the unchanged configuration without requesting another refresh, even after disconnection.\n- This saves ownership, not a field value. To enter a value yourself, select manual, then use PATCH /c/{companyId}/employees/{employeeId} for a field accepted by that operation's request schema. For example, set jobTitle to manual, then PATCH `{\"jobTitle\":\"Senior Engineer\"}`. Manual ownership does not make every field writable.\n- Updating the value separately requires permission to manage employee profiles (`org_chart.manage`).\n- When the selected source supports refresh, Windmill requests updated integration data in the background. A successful response confirms the ownership change, not that employee values have refreshed. The response contains configuration only.\n\nThe employee must exist in the company. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Employee ID in this company. This identifies an org-chart person, not a member.","title":"Employee ID","example":"employee-avery"},"required":true,"description":"Employee ID in this company. This identifies an org-chart person, not a member.","name":"employeeId","in":"path"},{"schema":{"$ref":"#/components/schemas/EmployeeFieldKey"},"required":true,"description":"Employee profile field whose owning source is configured or resolved.","name":"fieldKey","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetEmployeeFieldSourceRequest"}}}},"responses":{"200":{"description":"Saved employee-specific field owner override.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SetEmployeeFieldSourceResponse"},{"example":{"config":{"id":"field-config-job-title","companyId":"company-acme","employeeId":"employee-avery","fieldKey":"jobTitle","source":"manual","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z"}}}]}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"delete":{"operationId":"employees.fieldSources.delete","summary":"Remove an employee field source override","description":"Removes the employee override so the company default applies. If no default exists, the field has no owner. Returns 204 with no body, including when the override is already absent. The employee must exist in the company. Stored field values and their history are preserved. Removing a saved override can request updated data from the remaining source in the background. Requires permission to manage employee field sources (`employees.manage_field_mappings`).","x-windmill-capabilities":{"allOf":["employees.manage_field_mappings"]},"tags":["Employee Field Sources"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Employee ID in this company. This identifies an org-chart person, not a member.","title":"Employee ID","example":"employee-avery"},"required":true,"description":"Employee ID in this company. This identifies an org-chart person, not a member.","name":"employeeId","in":"path"},{"schema":{"$ref":"#/components/schemas/EmployeeFieldKey"},"required":true,"description":"Employee profile field whose owning source is configured or resolved.","name":"fieldKey","in":"path"}],"responses":{"204":{"description":"Employee override removed or already absent. No response body."},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups":{"get":{"operationId":"groups.list","summary":"List readable employee groups","description":"Lists non-archived employee groups that you can read. Filter by name, type, source, category, sharing, creator, integration, external group type, or employee count. categoryId and externalType accept one value or repeated query parameters. A group can match any selected category; includeUncategorized also includes groups without an active category. All other supplied filters must match. Pages start at 1; pageSize defaults to 50 and is limited to 100. Request include.total for the matching count; otherwise the count is omitted. Continue while pagination.hasMore is true. Groups are sorted by name ascending, then ID, unless another sort is requested.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Optional search text. Group and category names use a case-insensitive substring match.","title":"Search text","example":"Engineering"},"required":false,"description":"Optional search text. Group and category names use a case-insensitive substring match.","name":"query","in":"query"},{"schema":{"type":"string","enum":["MANUAL","FILTER","SYNCED","SCIM"],"description":"MANUAL has an explicit roster; FILTER uses employee rules; SYNCED follows an integration group; SCIM is provisioned.","title":"Group type","example":"MANUAL"},"required":false,"description":"MANUAL has an explicit roster; FILTER uses employee rules; SYNCED follows an integration group; SCIM is provisioned.","name":"type","in":"query"},{"schema":{"type":"array","items":{"type":"string","format":"uuid"},"description":"One or more category UUIDs. Matching any selected category is sufficient.","title":"Category filter","example":["11111111-1111-4111-8111-111111111111"]},"required":false,"description":"One or more category UUIDs. Matching any selected category is sufficient.","name":"categoryId","in":"query"},{"schema":{"type":"string","description":"Include groups with no active categories, combined with categoryId by OR.","title":"Include uncategorized","example":"true"},"required":false,"description":"Include groups with no active categories, combined with categoryId by OR.","name":"includeUncategorized","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"description":"Integration-defined group type. The group list accepts a single value or repeated values.","title":"External type filter"},"required":false,"description":"Integration-defined group type. The group list accepts a single value or repeated values.","name":"externalType","in":"query"},{"schema":{"type":"string","enum":["windmill","scim","integration"],"description":"windmill selects MANUAL/FILTER groups; scim selects SCIM; integration selects SYNCED groups.","title":"Group source","example":"windmill"},"required":false,"description":"windmill selects MANUAL/FILTER groups; scim selects SCIM; integration selects SYNCED groups.","name":"source","in":"query"},{"schema":{"type":"string","description":"Owning integration identifier, or null for groups without an integration link.","title":"Integration ID"},"required":false,"description":"Owning integration identifier, or null for groups without an integration link.","name":"integrationId","in":"query"},{"schema":{"type":"string","enum":["company","restricted"],"description":"company selects company-wide or global read access; restricted selects other readable groups.","title":"Sharing filter","example":"company"},"required":false,"description":"company selects company-wide or global read access; restricted selects other readable groups.","name":"visibility","in":"query"},{"schema":{"type":"string","description":"Employee who created this resource, or null when no employee creator is recorded.","title":"Creator employee ID"},"required":false,"description":"Employee who created this resource, or null when no employee creator is recorded.","name":"createdByEmployeeId","in":"query"},{"schema":{"type":"string","enum":["lt","lte","eq","gt","gte"],"description":"Comparison applied to memberCount. Supply both fields together.","title":"Member count comparison","example":"gte"},"required":false,"description":"Comparison applied to memberCount. Supply both fields together.","name":"memberCountOperator","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Nonnegative member count threshold. Supply memberCountOperator with this value.","title":"Member count","example":1},"required":false,"description":"Nonnegative member count threshold. Supply memberCountOperator with this value.","name":"memberCount","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90071992547409,"default":1,"description":"One-based page number. Defaults to 1.","title":"Page number","example":1},"required":false,"description":"One-based page number. Defaults to 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum results per page, from 1 to 100. Defaults to 50.","title":"Page size","example":50},"required":false,"description":"Maximum results per page, from 1 to 100. Defaults to 50.","name":"pageSize","in":"query"},{"schema":{"type":"object","properties":{"total":{"type":"boolean","description":"Set true to count all matching items and include pagination.total. False or omission skips the count.","title":"Include total count","example":true}},"description":"Request total:true to include pagination.total; otherwise no count is performed.","title":"Additional response details","example":{"total":true}},"required":false,"description":"Request total:true to include pagination.total; otherwise no count is performed.","style":"deepObject","explode":true,"name":"include","in":"query"},{"schema":{"$ref":"#/components/schemas/EmployeeGroupSortProperty"},"required":false,"description":"Field used to order results. Supported values depend on this listing. Defaults to name.","name":"sortProperty","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Ascending or descending order. Defaults to asc.","title":"Sort direction","example":"asc"},"required":false,"description":"Ascending or descending order. Defaults to asc.","name":"sortDirection","in":"query"}],"responses":{"200":{"description":"List employee groups.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmployeeGroupsResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"post":{"operationId":"groups.create","summary":"Create an employee group","description":"Creates a MANUAL group with an employee list or a FILTER smart group with employee rules. Requires permission to manage groups (`groups.manage`). The name is trimmed and must contain 1–200 characters; duplicate names are allowed. Assign up to 100 active category UUIDs. MANUAL groups reject rules. FILTER rules default to an empty employee filter, and membership is updated before the response. Rules cannot refer to other groups at any nesting level; relative start dates must use tenure ranges. New groups are readable company-wide. Their creator and members with permission to manage groups can edit them. Returns HTTP 200 with the new id.","x-windmill-capabilities":{"allOf":["groups.manage"]},"tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeGroupRequest"}}}},"responses":{"200":{"description":"Create an employee group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeGroupResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/count":{"get":{"operationId":"groups.count","summary":"Count readable employee groups","description":"Counts non-archived groups using the same filters and access rules as GET /c/{companyId}/groups. Returns only the count. A group can match any selected category; all other supplied filters must match. Supply memberCount and memberCountOperator together.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Optional search text. Group and category names use a case-insensitive substring match.","title":"Search text","example":"Engineering"},"required":false,"description":"Optional search text. Group and category names use a case-insensitive substring match.","name":"query","in":"query"},{"schema":{"type":"string","enum":["MANUAL","FILTER","SYNCED","SCIM"],"description":"MANUAL has an explicit roster; FILTER uses employee rules; SYNCED follows an integration group; SCIM is provisioned.","title":"Group type","example":"MANUAL"},"required":false,"description":"MANUAL has an explicit roster; FILTER uses employee rules; SYNCED follows an integration group; SCIM is provisioned.","name":"type","in":"query"},{"schema":{"type":"array","items":{"type":"string","format":"uuid"},"description":"One or more category UUIDs. Matching any selected category is sufficient.","title":"Category filter","example":["11111111-1111-4111-8111-111111111111"]},"required":false,"description":"One or more category UUIDs. Matching any selected category is sufficient.","name":"categoryId","in":"query"},{"schema":{"type":"string","description":"Include groups with no active categories, combined with categoryId by OR.","title":"Include uncategorized","example":"true"},"required":false,"description":"Include groups with no active categories, combined with categoryId by OR.","name":"includeUncategorized","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"description":"Integration-defined group type. The group list accepts a single value or repeated values.","title":"External type filter"},"required":false,"description":"Integration-defined group type. The group list accepts a single value or repeated values.","name":"externalType","in":"query"},{"schema":{"type":"string","enum":["windmill","scim","integration"],"description":"windmill selects MANUAL/FILTER groups; scim selects SCIM; integration selects SYNCED groups.","title":"Group source","example":"windmill"},"required":false,"description":"windmill selects MANUAL/FILTER groups; scim selects SCIM; integration selects SYNCED groups.","name":"source","in":"query"},{"schema":{"type":"string","description":"Owning integration identifier, or null for groups without an integration link.","title":"Integration ID"},"required":false,"description":"Owning integration identifier, or null for groups without an integration link.","name":"integrationId","in":"query"},{"schema":{"type":"string","enum":["company","restricted"],"description":"company selects company-wide or global read access; restricted selects other readable groups.","title":"Sharing filter","example":"company"},"required":false,"description":"company selects company-wide or global read access; restricted selects other readable groups.","name":"visibility","in":"query"},{"schema":{"type":"string","description":"Employee who created this resource, or null when no employee creator is recorded.","title":"Creator employee ID"},"required":false,"description":"Employee who created this resource, or null when no employee creator is recorded.","name":"createdByEmployeeId","in":"query"},{"schema":{"type":"string","enum":["lt","lte","eq","gt","gte"],"description":"Comparison applied to memberCount. Supply both fields together.","title":"Member count comparison","example":"gte"},"required":false,"description":"Comparison applied to memberCount. Supply both fields together.","name":"memberCountOperator","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Nonnegative member count threshold. Supply memberCountOperator with this value.","title":"Member count","example":1},"required":false,"description":"Nonnegative member count threshold. Supply memberCountOperator with this value.","name":"memberCount","in":"query"}],"responses":{"200":{"description":"Matching readable groups.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupCount"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}":{"get":{"operationId":"groups.get","summary":"Get an employee group","description":"Returns one non-archived group that you can read, including its source, category IDs, current employee count, and sharing settings. canWrite indicates whether you can edit the group. Includes saved employee rules when present. Missing, archived, or inaccessible groups return 404.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"responses":{"200":{"description":"Get an employee group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEmployeeGroupResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"patch":{"operationId":"groups.update","summary":"Update an employee group","description":"Updates the name and categories together; if either is invalid, neither changes. Names are trimmed, contain 1–200 characters, and can be changed only for MANUAL and FILTER groups. Renaming SCIM or SYNCED groups returns 400. categoryIds replaces all categories for any group type with up to 100 active company category UUIDs. Repeated IDs are used once; an empty list removes all categories. Omitted properties keep their values; an empty object is accepted. Type, rules, membership, and sharing are unchanged. Requires permission to edit the group.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeGroupRequest"}}}},"responses":{"200":{"description":"Update group details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"delete":{"operationId":"groups.delete","summary":"Delete an employee group","description":"Deletes a group of any type so it no longer appears in group lists or supplies memberships. There is no restore operation, and integration sync cannot bring it back. Employee records and the connected provider's group are retained. Repeating deletion succeeds if you still have permission to edit the deleted group. Requires permission to edit the group. Returns HTTP 200 with success:true.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"responses":{"200":{"description":"Delete a group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/members":{"get":{"operationId":"groups.members.list","summary":"List employees in a group","description":"Lists non-archived employees in a group that you can read, whether or not they have workspace access. Access to this list comes from the group; individual employee profile visibility does not further limit it. Supports employee-name search. Pages start at 1; pageSize defaults to 50 and is limited to 100. Request include.total for the matching count. Continue while pagination.hasMore is true. The default name order is last name, first name, then employee ID. Other sorts use the selected field, then employee ID. Missing, archived, or inaccessible groups return 404.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"},{"schema":{"type":"string","description":"Employee-name search using the same matching as the group member list.","title":"Search text","example":"Avery"},"required":false,"description":"Employee-name search using the same matching as the group member list.","name":"query","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90071992547409,"default":1,"description":"One-based page number. Defaults to 1.","title":"Page number","example":1},"required":false,"description":"One-based page number. Defaults to 1.","name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum results per page, from 1 to 100. Defaults to 50.","title":"Page size","example":50},"required":false,"description":"Maximum results per page, from 1 to 100. Defaults to 50.","name":"pageSize","in":"query"},{"schema":{"type":"object","properties":{"total":{"type":"boolean","description":"Set true to count all matching items and include pagination.total. False or omission skips the count.","title":"Include total count","example":true}},"description":"Request total:true to include pagination.total; otherwise no count is performed.","title":"Additional response details","example":{"total":true}},"required":false,"description":"Request total:true to include pagination.total; otherwise no count is performed.","style":"deepObject","explode":true,"name":"include","in":"query"},{"schema":{"$ref":"#/components/schemas/EmployeeGroupMemberSortProperty"},"required":false,"description":"Field used to order results. Supported values depend on this listing. Defaults to name.","name":"sortProperty","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc","description":"Ascending or descending order. Defaults to asc.","title":"Sort direction","example":"asc"},"required":false,"description":"Ascending or descending order. Defaults to asc.","name":"sortDirection","in":"query"}],"responses":{"200":{"description":"List group members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmployeeGroupMembersResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"post":{"operationId":"groups.members.add","summary":"Add employees to a manual group","description":"Adds employees to a MANUAL group that you can edit. EXPLICIT accepts 1–1000 unique employee IDs. ALL_MATCHING selects employees you can access using the employee API filter; status defaults to CURRENT. Put exclusions in filter.excludedEmployeeIds. expectedCount must match all selected employees, including existing members, before any changes are saved. It does not count only new memberships. Existing members are retained. A missing employee or stale count fails the whole request without changes. FILTER, SYNCED, SCIM, and integration-managed groups reject manual membership changes.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddEmployeeGroupMembersRequest"}}}},"responses":{"200":{"description":"Add group members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/members/count":{"get":{"operationId":"groups.members.count","summary":"Count employee group members","description":"Counts non-archived employees in a group that you can read, using the same name search as GET /c/{companyId}/groups/{groupId}/members. Returns only the count. Access comes from the group; individual employee profile visibility does not further limit the count. Missing, archived, inaccessible, or out-of-company groups return 404.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"},{"schema":{"type":"string","description":"Employee-name search using the same matching as the group member list.","title":"Search text","example":"Avery"},"required":false,"description":"Employee-name search using the same matching as the group member list.","name":"query","in":"query"}],"responses":{"200":{"description":"Matching group members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupCount"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/members/remove":{"post":{"operationId":"groups.members.remove","summary":"Remove employees from a manual group","description":"Removes employees from a MANUAL group that you can edit without deleting their employee records. EXPLICIT accepts 1–1000 unique employee IDs currently in this group. ALL_MATCHING applies the employee API filter to this group's non-archived employees; put exclusions in filter.excludedEmployeeIds. Only those employees can be removed, even when the filter requests other groups or status ALL. expectedCount must equal the selected employee count before changes are saved. A stale count or an EXPLICIT employee not in the group returns 400 without changes. Zero matches with expectedCount 0 succeeds without changes.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveEmployeeGroupMembersRequest"}}}},"responses":{"200":{"description":"Remove group members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/rules":{"put":{"operationId":"groups.rules.save","summary":"Replace smart group employee rules","description":"Replaces all employee rules for a FILTER smart group that you can edit. Membership is updated before the response, which includes counts of employees added and removed. Rules cannot refer to other groups at any nesting level; relative start dates must use supported tenure ranges. The rules determine the entire employee list, so this request can both add and remove employees. Other group types return 400.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupRulesRequest"}}}},"responses":{"200":{"description":"Save smart group rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupRefreshResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/sync":{"post":{"operationId":"groups.sync","summary":"Refresh an employee group","description":"Refreshes a FILTER smart group from its saved rules or a SYNCED group from the integration data already stored in Windmill. It does not fetch new data from the connected provider. Returns archived:false with current group details. If the linked source is archived or inactive, the group is archived and the response contains archived:true and group:null. MANUAL and SCIM groups return 400. Requires permission to read and edit the group. A missing linked integration group returns 404.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"responses":{"200":{"description":"Refreshed or archived group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncEmployeeGroupNowResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/access":{"put":{"operationId":"groups.access.set","summary":"Replace employee group sharing","description":"Replaces sharing settings for everyone in the company, managers, selected employees, employee groups, and reporting subtrees. All five fields are required, with up to 500 entries per recipient list. An empty list removes that kind of direct sharing. Access supplied by workspace permissions and automations is retained, including edit access for members who can manage groups. Everyone who can edit can also read. Works for every group type and requires existing permission to edit the group. You can remove your own directly granted access.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupAccessRequest"}}}},"responses":{"200":{"description":"Set group sharing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/members/imports/uploads":{"post":{"operationId":"groups.memberImports.upload","summary":"Upload and review a group member CSV","description":"Uploads a CSV in the file field of a multipart/form-data request, up to 10 MiB and 5000 data rows. The CSV must contain a column named exactly email. Addresses are trimmed, lowercased, and matched to active company employees. Returns full accepted and rejected counts, up to 50 preview rows of each kind, and an uploadId. This step does not change membership. Requires permission to read and edit a MANUAL group. Only the employee who uploaded the file can submit it, and only for this group.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"title":"Group member CSV upload","type":"object","properties":{"file":{"type":"string","format":"binary","title":"CSV file","description":"CSV file with an email header, up to 10 MiB and 5000 data rows."}},"required":["file"],"description":"Multipart CSV upload in the \"file\" field, up to 10 MiB."}}}},"responses":{"200":{"description":"Upload ID, validated rows and errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupImportUploadResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/members/imports":{"post":{"operationId":"groups.memberImports.submit","summary":"Submit a reviewed group member import","description":"Starts an import from a previously reviewed upload for a MANUAL group. Requires permission to edit the group and an employee with workspace access. The employee who uploaded the file must submit it. Repeating the same upload returns the existing importId. The upload is checked again and must match at least one active employee. Employees are added in the background; existing members are retained. Check GET /c/{companyId}/groups/{groupId}/members/imports/{importId} for progress.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitEmployeeGroupImportRequest"}}}},"responses":{"200":{"description":"Queued import.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupImportResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/{groupId}/members/imports/{importId}":{"get":{"operationId":"groups.memberImports.get","summary":"Get group member import progress","description":"Returns import status, processed row counts, and up to 50 failed-row details. imported counts completed CSV rows, including employees who were already members; it is not a count of new memberships. While the import is running, imported and rejected cover only processed rows. Requires permission to read and edit the MANUAL group. An unknown import or an import belonging to another group returns 404.","tags":["Groups"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"required":true,"description":"Opaque employee group identifier in this company.","name":"groupId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of a member import for this group.","title":"Import ID","example":"33333333-3333-4333-8333-333333333333"},"required":true,"description":"UUID of a member import for this group.","name":"importId","in":"path"}],"responses":{"200":{"description":"Import progress and row errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupImportStatus"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/categories":{"get":{"operationId":"groups.categories.list","summary":"List employee group categories","description":"Lists all active categories in the company, optionally filtered by a trimmed, case-insensitive name search. Categories are shared company-wide. groupCount includes only non-archived groups you can read; employeeCount counts distinct non-archived employees across those groups. Returns all matches without pagination, sorted by case-insensitive name, then ID. Categories with no groups you can read are included with zero counts.","tags":["Group categories"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","description":"Optional search text. Group and category names use a case-insensitive substring match.","title":"Search text","example":"Engineering"},"required":false,"description":"Optional search text. Group and category names use a case-insensitive substring match.","name":"query","in":"query"}],"responses":{"200":{"description":"Group categories by name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmployeeGroupCategoriesResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"post":{"operationId":"groups.categories.create","summary":"Create an employee group category","description":"Creates a company-wide category with a trimmed name of 1–100 characters, an optional description up to 500 characters, and a required emoji/color or glyph/color icon. Names must be unique among active company categories, ignoring case; conflicts return 409. Empty descriptions are saved as null. Requires permission to manage group categories (`groups.manage_categories`). Returns HTTP 200 with the new category UUID.","x-windmill-capabilities":{"allOf":["groups.manage_categories"]},"tags":["Group categories"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeGroupCategoryRequest"}}}},"responses":{"200":{"description":"The new category ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmployeeGroupResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/categories/{categoryId}":{"get":{"operationId":"groups.categories.get","summary":"Get an employee group category","description":"Returns one active category in the company. groupCount includes only non-archived groups you can read; employeeCount counts distinct non-archived employees across those groups. The category is visible even if you cannot read any of its groups. Missing, archived, or out-of-company categories return 404.","tags":["Group categories"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active employee group category in this company.","title":"Category ID","example":"11111111-1111-4111-8111-111111111111"},"required":true,"description":"UUID of an active employee group category in this company.","name":"categoryId","in":"path"}],"responses":{"200":{"description":"The category.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEmployeeGroupCategoryResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"patch":{"operationId":"groups.categories.update","summary":"Update an employee group category","description":"Updates the supplied category properties; omitted properties keep their values. Name and icon cannot be null. Set description to null or an empty string to clear it. Names must be unique among active company categories, ignoring case; conflicts return 409. An empty object is accepted. Requires permission to manage group categories (`groups.manage_categories`).","x-windmill-capabilities":{"allOf":["groups.manage_categories"]},"tags":["Group categories"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active employee group category in this company.","title":"Category ID","example":"11111111-1111-4111-8111-111111111111"},"required":true,"description":"UUID of an active employee group category in this company.","name":"categoryId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEmployeeGroupCategoryRequest"}}}},"responses":{"200":{"description":"Update a category.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"delete":{"operationId":"groups.categories.delete","summary":"Delete an employee group category","description":"Deletes an active category and removes it from every group. Groups, employee memberships, and other category assignments are retained. There is no restore operation. Requires permission to manage group categories (`groups.manage_categories`). Missing or already deleted categories return 404. Returns HTTP 200 with success:true.","x-windmill-capabilities":{"allOf":["groups.manage_categories"]},"tags":["Group categories"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active employee group category in this company.","title":"Category ID","example":"11111111-1111-4111-8111-111111111111"},"required":true,"description":"UUID of an active employee group category in this company.","name":"categoryId","in":"path"}],"responses":{"200":{"description":"Delete a category.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/categories/{categoryId}/groups":{"post":{"operationId":"groups.categories.groups.add","summary":"Add employee groups to a category","description":"Adds 1–200 groups of any type to an active company category. Requires permission to edit every supplied group; permission to manage categories is not required. Repeated IDs are used once. Existing assignments and all other categories are retained. An invalid category or inaccessible group fails the request.","tags":["Group categories"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active employee group category in this company.","title":"Category ID","example":"11111111-1111-4111-8111-111111111111"},"required":true,"description":"UUID of an active employee group category in this company.","name":"categoryId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupCategoryGroupsRequest"}}}},"responses":{"200":{"description":"Add groups to a category.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/groups/categories/{categoryId}/groups/remove":{"post":{"operationId":"groups.categories.groups.remove","summary":"Remove employee groups from a category","description":"Removes the selected category from 1–200 groups of any type. Other categories and employee memberships are unchanged. Requires permission to edit every supplied group; permission to manage categories is not required. Repeated IDs are used once, and missing assignments are ignored. The category itself does not need to exist.","tags":["Group categories"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active employee group category in this company.","title":"Category ID","example":"11111111-1111-4111-8111-111111111111"},"required":true,"description":"UUID of an active employee group category in this company.","name":"categoryId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupCategoryGroupsRequest"}}}},"responses":{"200":{"description":"Remove groups from a category.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeGroupMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/metadata/search":{"post":{"operationId":"stats.metadata.search","summary":"Search stat definitions","description":"Finds non-archived global and workspace stat definitions by definition ID, stat identifier, value type, literal text, or ownership. Disabled definitions are excluded unless includeDisabled is true. All supplied filters must match; within a list, matching any value is enough. With employee supplied, only definitions with recorded stat values for matching employees are returned. Any recorded date qualifies, including values of zero. Viewing stats for all employees requires workspace-wide analytics access. Other callers can read their own stats and those of their direct and indirect reports, plus employees covered by delegated reporting access. Employee filters only narrow that access. Omit employee to discover definitions even when no values have been recorded. Results use page/pageSize pagination, default 1/20 with a maximum page size of 100. Sorting defaults to label ascending with an ID tie-breaker. Set include.total to request the matching count. Any authenticated workspace member can search definitions.","tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchStatMetadataRequest"}}}},"responses":{"200":{"description":"One page of stat definitions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchStatMetadataResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/metadata/count":{"post":{"operationId":"stats.metadata.count","summary":"Count stat definitions","description":"Counts definitions using the same filters, disabled-definition default, archived exclusion, and employee analytics access rules as the stat definition search. Counts each definition once, regardless of how many employees or stat rows match. Pagination does not affect the count.","tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountStatMetadataRequest"}}}},"responses":{"200":{"description":"Number of matching stat definitions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/metadata":{"put":{"operationId":"stats.metadata.upsert","summary":"Create or replace a custom stat definition","description":"Creates or updates a custom stat definition owned by the caller's workspace, keyed by the stat identifier. Supply all required fields on every call: omitted optional display fields reset to null, and displayAsPercent resets to false. The aggregation type can change only before any values have been recorded for this definition. A later type change returns 409 without changing the definition or its values; create a new definition for the new type. Display edits and same-type saves remain available. This route defines a stat; it does not write employee stat values. Global Windmill-managed definitions are never modified; an identifier that matches a global stat creates a separate definition belonging to this workspace.","x-windmill-capabilities":{"allOf":["analytics.manage"]},"tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertStatMetadataRequest"}}}},"responses":{"200":{"description":"The created or updated stat definition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertStatMetadataResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/values":{"put":{"operationId":"stats.values.upsert","summary":"Upload custom employee stat values","description":"Creates or replaces up to 1000 dated employee values for one workspace custom stat definition. Create the definition first, then send its ID and employee values. The definition's aggregation type determines how values are interpreted. Repeating the same employee, date, and optional dimension replaces that value, so retries never add to totals. Omitted values are preserved. Different dimensions contribute separately to the combined daily value. The entire request succeeds or fails together. Disabled or archived definitions cannot receive values. Missing or out-of-workspace resources return 404; identifiers reserved for Windmill-managed stats return 409. Read uploaded values through stat series, employee totals, or CSV export using the caller's analytics access.","x-windmill-capabilities":{"allOf":["analytics.manage"]},"tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomStatValuesRequest"}}}},"responses":{"200":{"description":"Number of values written","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCustomStatValuesResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/search":{"post":{"operationId":"stats.search","summary":"Search employee stat series","description":"Returns employee stat series and range totals for a date range, keyed by employee ID. Discover definitions with POST /c/{companyId}/stats/metadata/search. Omit both statTypes and statMetadataIds to select all non-archived definitions; when both are supplied, a definition must match both. Employees and periods with no recorded data are omitted. Set include.data to false for range totals without period buckets. This response is not paginated. Viewing stats for all employees requires workspace-wide analytics access. Other callers can read their own stats and those of their direct and indirect reports, plus employees covered by delegated reporting access. Employee filters only narrow that access.","tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchStatsRequest"}}}},"responses":{"200":{"description":"Stats keyed by employee ID, limited to employees the caller can access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchStatsResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/employees/search":{"post":{"operationId":"stats.employees.search","summary":"Search employee stat totals","description":"Returns one page of employees with their totals for the requested stats over a date range. Employees with no data in the range are included with values of 0. Select 1 to 50 stat identifiers, then optionally filter by totals and sort by a selected stat or employee name. Pagination starts at page 1, with at most 100 employees per page. Request include.total for the count, include.aggregates for statistics across all matching employees, or include.rankOf for one employee's position across all pages. Viewing stats for all employees requires workspace-wide analytics access. Other callers can read their own stats and those of their direct and indirect reports, plus employees covered by delegated reporting access. Employee filters only narrow that access.","tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchEmployeeStatTotalsRequest"}}}},"responses":{"200":{"description":"One page of employees with their stat totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchEmployeeStatTotalsResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/employees/count":{"post":{"operationId":"stats.employees.count","summary":"Count employees matching stat totals","description":"Counts employees matching the supplied date range, stat selection, employee filter, search text, and conditions on stat totals. Employees with no data count when their zero totals satisfy the conditions. The count is independent of pagination. Viewing stats for all employees requires workspace-wide analytics access. Other callers can read their own stats and those of their direct and indirect reports, plus employees covered by delegated reporting access. Employee filters only narrow that access.","tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountEmployeeStatTotalsRequest"}}}},"responses":{"200":{"description":"Number of matching employees","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/export/csv":{"post":{"operationId":"stats.exportCsv","summary":"Export employee stats as CSV","description":"Streams stats-export.csv as a downloadable attachment with columns ID, Name, Job Title, Stat, Date, and Value. Disabled and archived definitions are excluded. Select data by date range, stat identifiers or definition IDs, employee filter, and period length. Each row represents an employee, stat, and period; Stat contains the definition's display label. Includes matching employees without data and fills missing values with 0 for periods present in the selected data. With no selected data, the file contains only the header. include.data does not change the CSV output. Viewing stats for all employees requires workspace-wide analytics access. Other callers can read their own stats and those of their direct and indirect reports, plus employees covered by delegated reporting access. Employee filters only narrow that access.","tags":["Stats"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchStatsRequest"}}}},"responses":{"200":{"description":"CSV containing the selected stat series.","content":{"text/csv":{"schema":{"$ref":"#/components/schemas/ExportStatsCsvResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/views":{"get":{"operationId":"stats.views.query","summary":"List stat views","description":"Lists active saved stat views the caller owns or can read through sharing. Views store stat selections and employee filters, rather than snapshots of stat values. Results are ordered by case-insensitive name, then view ID. Uses cursor pagination: send nextCursor as cursor on the next request with the same search. take defaults to 20 and is capped at 50. Request include.total to add the matching count at the response root. Requires access to Analytics in the workspace. Sharing a view shares its saved selections; each viewer can still read only the employee stats their own permissions allow.","tags":["Stat views"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","maxLength":120,"description":"Case-insensitive text matched against view names. Omit for all readable views.","title":"View name search","example":"Engineering"},"required":false,"description":"Case-insensitive text matched against view names. Omit for all readable views.","name":"search","in":"query"},{"schema":{"type":"string","maxLength":1024,"description":"Opaque nextCursor from the previous response. Omit for the first page; retain the same search when continuing. Malformed cursors return 400.","title":"Pagination cursor"},"required":false,"description":"Opaque nextCursor from the previous response. Omit for the first page; retain the same search when continuing. Malformed cursors return 400.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"Maximum views to return, from 1 to 50. Defaults to 20.","title":"Page size","example":20},"required":false,"description":"Maximum views to return, from 1 to 50. Defaults to 20.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"total":{"type":"boolean","description":"Set true to include the total number of readable views matching search, independent of the cursor, in the response's top-level total field.","title":"Include total count","example":true}},"description":"Additional listing details to calculate. Omit to skip the count.","title":"Additional response details","example":{"total":true}},"required":false,"description":"Additional listing details to calculate. Omit to skip the count.","name":"include","in":"query"}],"responses":{"200":{"description":"Accessible stat views in deterministic name order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryStatViewsResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"post":{"operationId":"stats.views.create","summary":"Create a stat view","description":"Saves a name, an ordered selection of stat definition IDs, and an employee filter. The view is private to its creator until shared. Definitions must be non-archived and either global or owned by this workspace. Returns the view ID and initial version 1; fetch that ID to read the full configuration. Requests are limited to 32 KiB of JSON, 50 unique stat definition IDs, 5 filter nesting levels including the root, 50 filter objects, and 500 values per filter array. Requires access to Analytics in the workspace. Sharing a view shares its saved selections; each viewer can still read only the employee stats their own permissions allow.","tags":["Stat views"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStatViewRequest"}}}},"responses":{"200":{"description":"Created stat view identity and version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatViewMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/views/count":{"get":{"operationId":"stats.views.count","summary":"Count stat views","description":"Counts active saved stat views that match the name search and that the caller owns or can read through sharing. The count includes all matching views, regardless of pagination. Requires access to Analytics in the workspace. Sharing a view shares its saved selections; each viewer can still read only the employee stats their own permissions allow.","tags":["Stat views"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","maxLength":120,"description":"Case-insensitive text matched against view names. Omit for all readable views.","title":"View name search","example":"Engineering"},"required":false,"description":"Case-insensitive text matched against view names. Omit for all readable views.","name":"search","in":"query"}],"responses":{"200":{"description":"The matching view count.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/views/{id}":{"get":{"operationId":"stats.views.get","summary":"Get a stat view","description":"Returns a readable saved view's stat definition IDs, employee filter, creator, sharing settings, current version, and caller-specific permissions. visibility describes whether all, some, or none of the filter's matching employees are accessible to this caller, or whether the filter has no matches. It does not indicate whether stats exist. Missing, archived, and unreadable views return 404. Requires access to Analytics in the workspace. Sharing a view shares its saved selections; each viewer can still read only the employee stats their own permissions allow.","tags":["Stat views"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active saved stat view in this workspace.","title":"Stat view ID","example":"22222222-2222-4222-8222-222222222222"},"required":true,"description":"UUID of an active saved stat view in this workspace.","name":"id","in":"path"}],"responses":{"200":{"description":"Stat view configuration and viewer-specific visibility","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatViewDetailResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"patch":{"operationId":"stats.views.update","summary":"Update a stat view","description":"Updates a saved view owned by the caller. Supply expectedVersion from the latest view response and at least one of name, statMetadataIds, or employeeFilter. Omitted fields are preserved; supplied arrays and filters replace their previous values. A successful update increments the version. A stale version returns 409: reload the view before retrying. Recipients cannot edit a shared view. The same size and filter limits as creation apply. Requires access to Analytics in the workspace. Sharing a view shares its saved selections; each viewer can still read only the employee stats their own permissions allow.","tags":["Stat views"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active saved stat view in this workspace.","title":"Stat view ID","example":"22222222-2222-4222-8222-222222222222"},"required":true,"description":"UUID of an active saved stat view in this workspace.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStatViewRequest"}}}},"responses":{"200":{"description":"Updated stat view identity and version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatViewMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}},"delete":{"operationId":"stats.views.archive","summary":"Delete a stat view","description":"Removes a saved view owned by the caller from subsequent lists, counts, and reads. Returns 204 with no body. Recipients cannot delete a shared view. No expectedVersion is required, and there is no restore route. Missing, unreadable, or already archived views return 404. Employee stat data and stat definitions are unaffected. Requires access to Analytics in the workspace. Sharing a view shares its saved selections; each viewer can still read only the employee stats their own permissions allow.","tags":["Stat views"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active saved stat view in this workspace.","title":"Stat view ID","example":"22222222-2222-4222-8222-222222222222"},"required":true,"description":"UUID of an active saved stat view in this workspace.","name":"id","in":"path"}],"responses":{"204":{"description":"Stat view removed"},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}},"/c/{companyId}/stats/views/{id}/access":{"put":{"operationId":"stats.views.access.set","summary":"Set stat view access","description":"Replaces all recipient grants on a saved view owned by the caller. Omitted audiences reset to no access, so include grants that should remain. Recipient access is read-only; the owner's write access is preserved. Employees and readable groups must belong to the workspace. A team grant may target only the owner's reporting team, and the owner must have a direct report. Changing workspace-wide or all-manager access, including removing it, requires permission to share analytics views workspace-wide. Supply expectedVersion for changes; a stale version returns 409. An identical sharing configuration returns the current version without incrementing it. Sharing with automations or by capability is unsupported. Requires access to Analytics in the workspace. Sharing a view shares its saved selections; each viewer can still read only the employee stats their own permissions allow.","tags":["Stat views"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","title":"Company ID","example":"company-acme"},"required":true,"description":"Company ID. A URL slug is also accepted. The caller must have access to this company.","name":"companyId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"UUID of an active saved stat view in this workspace.","title":"Stat view ID","example":"22222222-2222-4222-8222-222222222222"},"required":true,"description":"UUID of an active saved stat view in this workspace.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetStatViewAccessRequest"}}}},"responses":{"200":{"description":"Updated stat view identity and version","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatViewMutationResponse"}}}},"400":{"description":"Bad request or request validation failed","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR"]},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]}}},"required":["code","message","requestId","details"]}},"required":["error"]}]}}}},"401":{"description":"Authentication is missing or invalid. Send a valid API key or OAuth access token in the Authorization: Bearer <TOKEN> header before retrying.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}},"429":{"description":"The API-client request budget is exhausted. API keys allow 500 requests per minute per key; OAuth clients allow 500 per minute per client and workspace. Reads and writes share the budget. One HTTP request counts once, including bulk requests. Wait for the Retry-After delay before retrying.","headers":{"Retry-After":{"description":"Number of seconds to wait before retrying the request.","required":true,"schema":{"type":"integer","minimum":0,"example":42}},"RateLimit":{"description":"Current request budget: limit is the maximum count, remaining is the unused count, and reset is seconds until the window resets, not a timestamp.","required":true,"schema":{"type":"string","example":"limit=500, remaining=0, reset=42"}},"RateLimit-Policy":{"description":"Request limit and window length in seconds, formatted as <limit>;w=<seconds>.","required":true,"schema":{"type":"string","example":"500;w=60"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMITED"]},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]}}}}}}}},"servers":[{"url":"https://api.gowindmill.com/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Use an API key or OAuth access token. Enter only the token in the authorization dialog; requests send it as `Authorization: Bearer <TOKEN>`.\n\nCreate an API key in your workspace's **Settings → API keys**. Keys start with `wm_api_` and only work in the workspace where they were created. Read-only keys can read data; creating, updating, or deleting data requires a read-write key.\n\n```http\nAuthorization: Bearer wm_api_example\n```\n\nOAuth access tokens are issued for connected Windmill applications.\n\n```http\nAuthorization: Bearer <OAUTH_ACCESS_TOKEN>\n```\n\nBoth token types use the authenticated user's workspace permissions. Each endpoint's permission requirements and the sharing settings of the requested items still apply."}},"schemas":{"CoreEmployeeFilter":{"type":"object","properties":{"hasDirectReports":{"type":["boolean","null"]},"hasManager":{"type":["boolean","null"]},"employeeGroupId":{"type":["string","null"]},"employeeGroupIds":{"type":["array","null"],"items":{"type":"string"}},"employeeGroupIdSets":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"},"minItems":1}},"jobTitle":{"type":["string","null"]},"jobTitles":{"type":["array","null"],"items":{"type":"string"}},"countries":{"type":["array","null"],"items":{"type":"string"}},"emails":{"type":["array","null"],"items":{"type":"string"}},"emailDomains":{"type":["array","null"],"items":{"type":"string"}},"employeeId":{"type":["string","null"]},"employeeIds":{"type":["array","null"],"items":{"type":"string"}},"excludedEmployeeId":{"type":["string","null"]},"excludedEmployeeIds":{"type":["array","null"],"items":{"type":"string"}},"managerId":{"type":["string","null"]},"managerIds":{"type":["array","null"],"items":{"type":"string"}},"ancestorManagerId":{"type":["string","null"]},"ancestorManagerIds":{"type":["array","null"],"items":{"type":"string"}},"indirectManagerId":{"type":["string","null"]},"indirectManagerIds":{"type":["array","null"],"items":{"type":"string"}},"isMember":{"type":["boolean","null"]},"memberRole":{"type":["string","null"],"enum":["admin","hr-admin","integration-manager","data-analyst","team-member",null]},"query":{"type":["string","null"]},"includeArchived":{"type":["boolean","null"]},"onlyArchived":{"type":["boolean","null"]},"includeExternalOrgs":{"type":["boolean","null"]},"platformAccess":{"type":["string","null"],"enum":["HAS_ACCESS","INVITE_PENDING","NO_ACCESS",null]},"startDate":{"anyOf":[{"type":"object","properties":{"range":{"type":"string"}},"required":["range"]},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},{"type":"null"}]},"isAccountAdmin":{"type":["boolean","null"]},"hasIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"lacksIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"and":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}}}},"SearchEmployeeMinViewsResponse":{"type":"object","properties":{"employees":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeMinView"},"description":"Employee profiles returned by this operation. An empty search page contains an empty array.","title":"Employees"},"pagination":{"$ref":"#/components/schemas/SearchPaginationResponse"}},"required":["employees","pagination"],"additionalProperties":false,"title":"Employee profile search response","example":{"employees":[{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":true}],"pagination":{"page":1,"pageSize":20,"hasMore":false,"total":1}}},"EmployeeMinView":{"type":"object","properties":{"id":{"type":"string","description":"Opaque employee identifier. This identifies an org-chart person, not a member or user.","title":"Employee ID","example":"employee-avery"},"name":{"type":"string","description":"Resolved display name for the employee.","title":"Display name","example":"Avery Chen"},"avatarUrl":{"type":["string","null"],"description":"Employee avatar URL, or null when no avatar is available.","title":"Avatar URL"},"jobTitle":{"type":["string","null"],"description":"Employee job title. Null indicates no recorded title.","title":"Job title","example":"Engineer"},"managerId":{"type":["string","null"],"description":"Employee ID of the direct manager, or null when no manager is assigned.","title":"Manager ID","example":"employee-morgan"},"primaryEmail":{"type":["string","null"],"description":"Primary employee email address, or null when none is set.","title":"Primary email","example":"avery@example.test"},"phoneNumber":{"type":["string","null"],"description":"Employee phone number, or null when unavailable.","title":"Phone number"},"firstName":{"type":["string","null"],"description":"Employee first name, or null when unavailable.","title":"First name","example":"Avery"},"preferredName":{"type":["string","null"],"description":"Employee preferred first name, or null when unavailable.","title":"Preferred name"},"lastName":{"type":["string","null"],"description":"Employee last name, or null when unavailable.","title":"Last name","example":"Chen"},"isActiveMember":{"type":"boolean","description":"Whether the employee has an active linked workspace membership.","title":"Has active workspace access","example":true}},"required":["id","name","avatarUrl","jobTitle","managerId","primaryEmail","phoneNumber","firstName","preferredName","lastName","isActiveMember"],"title":"Basic employee profile","description":"Identity, contact details, and workspace membership for an org-chart employee.","example":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":true}},"SearchPaginationResponse":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1,"description":"One-based page number. Defaults to 1.","title":"Page number","example":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum results per page, from 1 to 100. Defaults to 20.","title":"Page size","example":20},"hasMore":{"type":"boolean","description":"Whether there are more matching results after this page.","title":"Has another page","example":false},"total":{"type":"integer","minimum":0,"description":"Total matching items, independent of pagination. The route determines the item type.","title":"Total matches","example":1}},"required":["page","pageSize","hasMore"],"description":"Returned page and page size, plus hasMore. Total is omitted unless include.total was requested.","title":"Pagination"},"SearchEmployeesRequest":{"type":"object","properties":{"include":{"type":"object","properties":{"total":{"type":"boolean","description":"Set true to count all matching items and include pagination.total. False or omission skips the count.","title":"Include total count","example":true}},"description":"Set total to true to count all matching results. Omit it to avoid the count query.","title":"Additional response details","example":{"total":true}},"filter":{"$ref":"#/components/schemas/EmployeeFilter"},"sort":{"$ref":"#/components/schemas/EmployeeSort"},"page":{"type":"integer","minimum":1,"default":1,"description":"One-based page number. Defaults to 1.","title":"Page number","example":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Maximum results per page, from 1 to 100. Defaults to 20.","title":"Page size","example":20}},"additionalProperties":false,"title":"Search employees request","example":{"filter":{"status":"CURRENT","query":"Avery"},"page":1,"pageSize":20,"include":{"total":true}}},"EmployeeFilter":{"type":"object","properties":{"hasDirectReports":{"type":["boolean","null"],"description":"True selects managers with a direct report; false selects employees without direct reports.","title":"Has direct reports","example":true},"hasManager":{"type":["boolean","null"],"description":"True selects employees with an assigned manager; false selects employees without a manager.","title":"Has a manager","example":true},"employeeGroupId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select employees belonging to this employee group.","title":"Employee group ID","example":"group-engineering"},"employeeGroupIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select members of any listed employee group. Up to 1000 IDs.","title":"Employee group IDs","example":["group-engineering"]},"jobTitle":{"type":["string","null"],"maxLength":256,"description":"Select employees whose job title exactly matches this value.","title":"Exact job title","example":"Engineer"},"jobTitles":{"type":["array","null"],"items":{"type":"string","maxLength":256},"maxItems":1000,"description":"Select employees whose job title exactly matches any listed value. Up to 1000 titles.","title":"Exact job titles","example":["Engineer","Designer"]},"countries":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees whose HRIS work country matches any listed country code. Up to 1000 values.","title":"Work countries","example":["US"]},"emails":{"type":["array","null"],"items":{"type":"string","maxLength":320,"format":"email"},"maxItems":1000,"description":"Select employees associated with any listed email address. Up to 1000 valid addresses.","title":"Employee email addresses","example":["avery@example.test"]},"emailDomains":{"type":["array","null"],"items":{"type":"string","maxLength":254},"maxItems":1000,"description":"Select employees with an email address on any listed domain. A domain matches exactly, so subdomains are listed separately. Up to 1000 values.","title":"Employee email domains","example":["example.test"]},"employeeId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select a single employee by ID.","title":"Employee ID","example":"employee-avery"},"employeeIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees with any listed ID. Up to 1000 IDs.","title":"Employee IDs","example":["employee-avery"]},"excludedEmployeeId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Exclude this employee from the results.","title":"Excluded employee ID","example":"employee-excluded"},"excludedEmployeeIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Exclude employees with any listed ID. Use this field for exclusions in API bulk mutations. Up to 1000 IDs.","title":"Excluded employee IDs","example":["employee-excluded"]},"managerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select direct reports of this manager; exclude deeper reports.","title":"Direct manager ID","example":"employee-morgan"},"managerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select direct reports of any listed manager, at depth 1. Up to 1000 manager IDs.","title":"Direct manager IDs","example":["employee-morgan"]},"ancestorManagerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select direct and indirect reports below this manager at any depth.","title":"Ancestor manager ID","example":"employee-morgan"},"ancestorManagerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select anyone below any listed manager, at depth 1 or greater. Up to 1000 manager IDs.","title":"Ancestor manager IDs","example":["employee-morgan"]},"indirectManagerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select reports at depth 2 or greater below this manager; exclude direct reports.","title":"Indirect manager ID","example":"employee-morgan"},"indirectManagerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select reports at depth 2 or greater below any listed manager. Up to 1000 manager IDs.","title":"Indirect manager IDs","example":["employee-morgan"]},"isMember":{"type":["boolean","null"],"description":"True selects employees with active workspace membership; false selects employees without a member link or with inactive membership.","title":"Has active workspace membership","example":true},"memberRole":{"type":["string","null"],"enum":["admin","hr-admin","integration-manager","data-analyst","team-member",null],"description":"Select employees associated with this workspace member role.","title":"Workspace role","example":"team-member"},"query":{"type":["string","null"],"maxLength":256,"description":"Search employee name, email, and job title. A top-level query controls the default relevance ordering.","title":"Employee search text","example":"Avery"},"platformAccess":{"type":["string","null"],"enum":["HAS_ACCESS","INVITE_PENDING","NO_ACCESS",null],"description":"HAS_ACCESS selects active access; INVITE_PENDING selects pending invitations; NO_ACCESS selects employees without access.","title":"Workspace access status","example":"HAS_ACCESS"},"startDate":{"anyOf":[{"type":"object","properties":{"range":{"type":"string","minLength":1,"maxLength":128}},"required":["range"],"additionalProperties":false},{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}],"description":"ISO 8601 date or datetime. Inclusive lower bound."},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}],"description":"ISO 8601 date or datetime. Inclusive upper bound."}},"additionalProperties":false},{"type":"null"}],"description":"Select start dates within inclusive date bounds or a supported named date range.","title":"Start-date range","example":{"from":"2025-01-01","to":"2025-12-31"}},"isAccountAdmin":{"type":["boolean","null"],"description":"True selects account administrators; false selects employees who are not account administrators.","title":"Account administrator","example":false},"hasIntegrationIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees linked to every listed integration identifier. Up to 1000 IDs.","title":"Linked integrations","example":["slack"]},"lacksIntegrationIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees without links to the listed integration identifiers. Up to 1000 IDs.","title":"Unlinked integrations","example":["slack"]},"status":{"type":"string","enum":["CURRENT","FORMER","ALL"],"default":"CURRENT","description":"CURRENT selects unarchived employees, FORMER selects archived employees, and ALL includes both. Defaults to CURRENT.","title":"Employment status","example":"CURRENT"},"and":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFilterPredicate"},"maxItems":49,"description":"All child filters must match, in addition to the other predicates in this filter. Up to 49 children.","title":"All conditions"},"or":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFilterPredicate"},"maxItems":49,"description":"At least one child filter must match, in addition to the other predicates in this filter. Up to 49 children.","title":"Any condition"}},"additionalProperties":false,"description":"Conditions applied to the selection. The API filter defaults employment status to CURRENT.","title":"Employee filter","example":{"status":"CURRENT"}},"EmployeeFilterPredicate":{"type":"object","properties":{"hasDirectReports":{"type":["boolean","null"],"description":"True selects managers with a direct report; false selects employees without direct reports.","title":"Has direct reports","example":true},"hasManager":{"type":["boolean","null"],"description":"True selects employees with an assigned manager; false selects employees without a manager.","title":"Has a manager","example":true},"employeeGroupId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select employees belonging to this employee group.","title":"Employee group ID","example":"group-engineering"},"employeeGroupIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select members of any listed employee group. Up to 1000 IDs.","title":"Employee group IDs","example":["group-engineering"]},"jobTitle":{"type":["string","null"],"maxLength":256,"description":"Select employees whose job title exactly matches this value.","title":"Exact job title","example":"Engineer"},"jobTitles":{"type":["array","null"],"items":{"type":"string","maxLength":256},"maxItems":1000,"description":"Select employees whose job title exactly matches any listed value. Up to 1000 titles.","title":"Exact job titles","example":["Engineer","Designer"]},"countries":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees whose HRIS work country matches any listed country code. Up to 1000 values.","title":"Work countries","example":["US"]},"emails":{"type":["array","null"],"items":{"type":"string","maxLength":320,"format":"email"},"maxItems":1000,"description":"Select employees associated with any listed email address. Up to 1000 valid addresses.","title":"Employee email addresses","example":["avery@example.test"]},"emailDomains":{"type":["array","null"],"items":{"type":"string","maxLength":254},"maxItems":1000,"description":"Select employees with an email address on any listed domain. A domain matches exactly, so subdomains are listed separately. Up to 1000 values.","title":"Employee email domains","example":["example.test"]},"employeeId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select a single employee by ID.","title":"Employee ID","example":"employee-avery"},"employeeIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees with any listed ID. Up to 1000 IDs.","title":"Employee IDs","example":["employee-avery"]},"excludedEmployeeId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Exclude this employee from the results.","title":"Excluded employee ID","example":"employee-excluded"},"excludedEmployeeIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Exclude employees with any listed ID. Use this field for exclusions in API bulk mutations. Up to 1000 IDs.","title":"Excluded employee IDs","example":["employee-excluded"]},"managerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select direct reports of this manager; exclude deeper reports.","title":"Direct manager ID","example":"employee-morgan"},"managerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select direct reports of any listed manager, at depth 1. Up to 1000 manager IDs.","title":"Direct manager IDs","example":["employee-morgan"]},"ancestorManagerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select direct and indirect reports below this manager at any depth.","title":"Ancestor manager ID","example":"employee-morgan"},"ancestorManagerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select anyone below any listed manager, at depth 1 or greater. Up to 1000 manager IDs.","title":"Ancestor manager IDs","example":["employee-morgan"]},"indirectManagerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select reports at depth 2 or greater below this manager; exclude direct reports.","title":"Indirect manager ID","example":"employee-morgan"},"indirectManagerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select reports at depth 2 or greater below any listed manager. Up to 1000 manager IDs.","title":"Indirect manager IDs","example":["employee-morgan"]},"isMember":{"type":["boolean","null"],"description":"True selects employees with active workspace membership; false selects employees without a member link or with inactive membership.","title":"Has active workspace membership","example":true},"memberRole":{"type":["string","null"],"enum":["admin","hr-admin","integration-manager","data-analyst","team-member",null],"description":"Select employees associated with this workspace member role.","title":"Workspace role","example":"team-member"},"query":{"type":["string","null"],"maxLength":256,"description":"Search employee name, email, and job title. A top-level query controls the default relevance ordering.","title":"Employee search text","example":"Avery"},"platformAccess":{"type":["string","null"],"enum":["HAS_ACCESS","INVITE_PENDING","NO_ACCESS",null],"description":"HAS_ACCESS selects active access; INVITE_PENDING selects pending invitations; NO_ACCESS selects employees without access.","title":"Workspace access status","example":"HAS_ACCESS"},"startDate":{"anyOf":[{"type":"object","properties":{"range":{"type":"string","minLength":1,"maxLength":128}},"required":["range"],"additionalProperties":false},{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}],"description":"ISO 8601 date or datetime. Inclusive lower bound."},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}],"description":"ISO 8601 date or datetime. Inclusive upper bound."}},"additionalProperties":false},{"type":"null"}],"description":"Select start dates within inclusive date bounds or a supported named date range.","title":"Start-date range","example":{"from":"2025-01-01","to":"2025-12-31"}},"isAccountAdmin":{"type":["boolean","null"],"description":"True selects account administrators; false selects employees who are not account administrators.","title":"Account administrator","example":false},"hasIntegrationIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees linked to every listed integration identifier. Up to 1000 IDs.","title":"Linked integrations","example":["slack"]},"lacksIntegrationIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees without links to the listed integration identifiers. Up to 1000 IDs.","title":"Unlinked integrations","example":["slack"]},"status":{"type":"string","enum":["CURRENT","FORMER","ALL"],"default":"CURRENT","description":"CURRENT selects unarchived employees, FORMER selects archived employees, and ALL includes both. Defaults to CURRENT.","title":"Employment status","example":"CURRENT"},"and":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFilterPredicate"},"maxItems":49,"description":"All child filters must match, in addition to the other predicates in this filter. Up to 49 children.","title":"All conditions"},"or":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFilterPredicate"},"maxItems":49,"description":"At least one child filter must match, in addition to the other predicates in this filter. Up to 49 children.","title":"Any condition"}},"additionalProperties":false},"EmployeeSort":{"type":"object","properties":{"field":{"type":"string","enum":["id","name","email","relevance"],"description":"Sort by ID, display name, primary email, or text-search relevance.","title":"Sort field","example":"name"},"direction":{"type":"string","enum":["asc","desc"],"description":"Ascending (asc) or descending (desc) order.","title":"Sort direction","example":"asc"}},"required":["field","direction"],"additionalProperties":false,"title":"Sort order","example":{"field":"name","direction":"asc"},"description":"Defaults to relevance descending for a top-level text query, otherwise name ascending."},"GetEmployeeResponse":{"type":"object","properties":{"employee":{"$ref":"#/components/schemas/EmployeeView"}},"required":["employee"],"additionalProperties":false,"title":"Employee profile response","example":{"employee":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":true,"startDate":"2025-03-17","timezone":"America/New_York","employmentStatus":"CURRENT","emails":["avery@example.test"],"directReportsCount":0,"directReportMembersCount":0,"manager":{"id":"employee-morgan","name":"Morgan Reed","avatarUrl":null,"jobTitle":"Engineering Manager","managerId":null,"primaryEmail":"morgan@example.test","phoneNumber":null,"firstName":"Morgan","preferredName":null,"lastName":"Reed","isActiveMember":true}}}},"EmployeeView":{"allOf":[{"$ref":"#/components/schemas/EmployeeMinView"},{"type":"object","properties":{"startDate":{"type":["string","null"],"description":"Employee start date as YYYY-MM-DD, or null when unavailable.","title":"Start date","example":"2025-03-17"},"timezone":{"type":["string","null"],"description":"Resolved IANA timezone name, or null when unavailable.","title":"Timezone","example":"America/New_York"},"employmentStatus":{"type":"string","enum":["CURRENT","FORMER"],"description":"CURRENT means the employee is not archived; FORMER means archived. Employment status is separate from member access.","title":"Employment status","example":"CURRENT"},"emails":{"type":"array","items":{"type":"string"},"description":"Known email addresses associated with the employee.","title":"Known email addresses","example":["avery@example.test"]},"directReportsCount":{"type":"number","description":"Direct reports in the primary organization. Former reports are included only when the caller requests archived-report counts.","title":"Direct report count","example":0},"directReportMembersCount":{"type":"number","description":"Direct reports in the primary organization with active workspace memberships, independent of employee archive status.","title":"Direct report member count","example":0},"manager":{"allOf":[{"$ref":"#/components/schemas/EmployeeMinView"},{"type":["object","null"],"title":"Direct manager","description":"Basic profile of the direct manager, or null when none is assigned."}]}},"required":["startDate","timezone","employmentStatus","emails","directReportsCount","directReportMembersCount","manager"]}],"title":"Employee","description":"Employee profile returned by this operation.","example":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":true,"startDate":"2025-03-17","timezone":"America/New_York","employmentStatus":"CURRENT","emails":["avery@example.test"],"directReportsCount":0,"directReportMembersCount":0,"manager":{"id":"employee-morgan","name":"Morgan Reed","avatarUrl":null,"jobTitle":"Engineering Manager","managerId":null,"primaryEmail":"morgan@example.test","phoneNumber":null,"firstName":"Morgan","preferredName":null,"lastName":"Reed","isActiveMember":true}}},"FindEmployeeIdsResponse":{"type":"object","properties":{"employeeIds":{"type":"array","items":{"type":"string"},"description":"Matching employee IDs on this page, in ascending ID order. Empty when the page has no results.","title":"Employee IDs","example":["employee-avery"]},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1,"description":"One-based page number. Defaults to 1.","title":"Page number","example":1},"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"description":"Employee ID page size, from 1 to 1000.","title":"Page size","example":1000},"hasMore":{"type":"boolean","description":"Whether there are more matching results after this page.","title":"Has another page","example":false},"total":{"type":"integer","minimum":0,"description":"Total matching items, independent of pagination. The route determines the item type.","title":"Total matches","example":1}},"required":["hasMore"],"description":"Returned page and page size, plus hasMore. Total is omitted unless include.total was requested.","title":"Pagination"}},"required":["employeeIds","pagination"],"additionalProperties":false,"title":"Employee ID search response","example":{"employeeIds":["employee-avery"],"pagination":{"page":1,"pageSize":1000,"hasMore":false,"total":1}}},"FindEmployeeIdsRequest":{"allOf":[{"$ref":"#/components/schemas/FilterEmployeesRequest"},{"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1,"description":"One-based page number. Defaults to 1.","title":"Page number","example":1},"pageSize":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"description":"Maximum employee IDs per page, from 1 to 1000. Defaults to 1000.","title":"Page size","example":1000},"include":{"type":"object","properties":{"total":{"type":"boolean","description":"Set true to count all matching items and include pagination.total. False or omission skips the count.","title":"Include total count","example":true}},"description":"Set total to true to count all matching results. Omit it to avoid the count query.","title":"Additional response details","example":{"total":true}}},"additionalProperties":false}],"title":"Search employee IDs request","example":{"filter":{"status":"CURRENT"},"page":1,"pageSize":1000,"include":{"total":true}}},"FilterEmployeesRequest":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/EmployeeFilter"}},"additionalProperties":false,"title":"Count employees request","example":{"filter":{"status":"CURRENT"}}},"CountEmployeesResponse":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total matching items, independent of pagination. The route determines the item type.","title":"Total matches","example":1}},"required":["total"],"additionalProperties":false,"title":"Matching item count","description":"The matching item count; the route determines whether items are employees, job titles, or levels.","example":{"total":1}},"CreateEmployeeResponse":{"type":"object","properties":{"employee":{"$ref":"#/components/schemas/EmployeeView"}},"required":["employee"],"additionalProperties":false,"title":"Created employee response","example":{"employee":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":true,"startDate":"2025-03-17","timezone":"America/New_York","employmentStatus":"CURRENT","emails":["avery@example.test"],"directReportsCount":0,"directReportMembersCount":0,"manager":{"id":"employee-morgan","name":"Morgan Reed","avatarUrl":null,"jobTitle":"Engineering Manager","managerId":null,"primaryEmail":"morgan@example.test","phoneNumber":null,"firstName":"Morgan","preferredName":null,"lastName":"Reed","isActiveMember":true}}}},"CreateEmployeeRequest":{"anyOf":[{"type":"object","properties":{"primaryEmail":{"type":"string","maxLength":320,"format":"email","description":"Valid email address for the new employee. Any existing current or former employee match returns 409. Takes precedence over the deprecated email alias.","title":"Initial employee email","example":"avery@example.test"},"email":{"type":"string","maxLength":320,"format":"email","description":"Deprecated alias for primaryEmail. Supply primaryEmail for new integrations.","title":"Legacy initial employee email","deprecated":true},"firstName":{"type":"string","minLength":1,"maxLength":200,"description":"Required first name, from 1 to 200 characters.","title":"First name","example":"Avery"},"lastName":{"type":"string","minLength":1,"maxLength":200,"description":"Required last name, from 1 to 200 characters.","title":"Last name","example":"Chen"},"jobTitle":{"type":["string","null"],"maxLength":256,"description":"Job title for the new employee, up to 256 characters. Optional and nullable.","title":"Job title","example":"Engineer"},"managerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"A current employee in the same company. Omit or send null for no manager.","title":"Manager ID","example":"employee-morgan"}},"required":["primaryEmail","firstName","lastName"],"additionalProperties":false},{"type":"object","properties":{"primaryEmail":{"type":"string","maxLength":320,"format":"email","description":"Valid email address for the new employee. Any existing current or former employee match returns 409. Takes precedence over the deprecated email alias.","title":"Initial employee email","example":"avery@example.test"},"email":{"type":"string","maxLength":320,"format":"email","description":"Deprecated alias for primaryEmail. Supply primaryEmail for new integrations.","title":"Legacy initial employee email","deprecated":true},"firstName":{"type":"string","minLength":1,"maxLength":200,"description":"Required first name, from 1 to 200 characters.","title":"First name","example":"Avery"},"lastName":{"type":"string","minLength":1,"maxLength":200,"description":"Required last name, from 1 to 200 characters.","title":"Last name","example":"Chen"},"jobTitle":{"type":["string","null"],"maxLength":256,"description":"Job title for the new employee, up to 256 characters. Optional and nullable.","title":"Job title","example":"Engineer"},"managerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"A current employee in the same company. Omit or send null for no manager.","title":"Manager ID","example":"employee-morgan"}},"required":["email","firstName","lastName"],"additionalProperties":false}],"title":"Create employee request","example":{"primaryEmail":"avery@example.test","firstName":"Avery","lastName":"Chen","jobTitle":"Engineer","managerId":"employee-morgan"}},"UpdateEmployeeResponse":{"type":"object","properties":{"employee":{"$ref":"#/components/schemas/EmployeeView"}},"required":["employee"],"additionalProperties":false,"title":"Updated employee response","example":{"employee":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Senior Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":true,"startDate":"2025-03-17","timezone":"America/New_York","employmentStatus":"CURRENT","emails":["avery@example.test"],"directReportsCount":0,"directReportMembersCount":0,"manager":{"id":"employee-morgan","name":"Morgan Reed","avatarUrl":null,"jobTitle":"Engineering Manager","managerId":null,"primaryEmail":"morgan@example.test","phoneNumber":null,"firstName":"Morgan","preferredName":null,"lastName":"Reed","isActiveMember":true}}}},"EmployeePatch":{"type":"object","properties":{"firstName":{"type":"string","maxLength":200,"description":"New first name, up to 200 characters. Omit to retain it; an empty string is accepted.","title":"First name","example":"Avery"},"lastName":{"type":"string","maxLength":200,"description":"New last name, up to 200 characters. Omit to retain it; an empty string is accepted.","title":"Last name","example":"Chen"},"displayFullName":{"type":"string","maxLength":400,"description":"Display name to use for this employee. Omit it to retain the existing value.","title":"Display name","example":"Avery Chen"},"jobTitle":{"type":["string","null"],"maxLength":256,"description":"New job title, up to 256 characters. Omit to retain it or send null to clear it.","title":"Job title","example":"Senior Engineer"},"jobLevel":{"type":["string","null"],"maxLength":256,"description":"New job level, up to 256 characters. Omit to retain it or send null to clear it. Not included in this route's returned profile.","title":"Job level","example":"L3"},"managerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"New manager employee ID in the company. Omit to retain it or send null to remove the manager.","title":"Manager ID","example":"employee-morgan"},"primaryEmail":{"type":["string","null"],"maxLength":320,"description":"New primary email, up to 320 characters. A non-empty value must already be a known employee email. Null clears it.","title":"Primary email","example":"avery@example.test"},"startDate":{"type":["string","null"],"format":"date","description":"New date in YYYY-MM-DD format. Omit to retain it or send null to clear it.","title":"Start date","example":"2025-03-17"},"gender":{"type":["string","null"],"maxLength":256,"description":"Employee gender value. Omit it to retain the value or send null to clear it.","title":"Gender"},"pronouns":{"type":["string","null"],"maxLength":256,"description":"Employee pronouns. Omit them to retain the value or send null to clear them.","title":"Pronouns","example":"they/them"},"claimOwnership":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFieldKey"},"maxItems":22,"description":"Unique field keys to claim as manually owned. Claims can take over integration-owned or unowned fields without changing their values. Omit to leave ownership unchanged.","title":"Claim manual field ownership","example":["jobTitle"]}},"additionalProperties":false,"title":"Employee profile patch","description":"Supply at least one field. Omitted fields stay unchanged; null clears only nullable fields.","example":{"jobTitle":"Senior Engineer","claimOwnership":["jobTitle"]}},"EmployeeFieldKey":{"type":"string","enum":["avatarUrl","dateOfBirth","departments","displayFullName","employmentStatus","employmentType","ethnicity","firstName","preferredName","gender","jobLevel","jobTitle","lastName","managerId","maritalStatus","phoneNumber","primaryEmail","pronouns","startDate","terminationDate","workLocation","country"],"description":"Employee profile field whose owning source is configured or resolved.","title":"Employee field key","example":"jobTitle"},"UpdateEmployeeEmploymentStatusResponse":{"type":"object","properties":{"employee":{"$ref":"#/components/schemas/EmployeeView"}},"required":["employee"],"additionalProperties":false,"title":"Employee employment status response","example":{"employee":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":false,"startDate":"2025-03-17","timezone":"America/New_York","employmentStatus":"FORMER","emails":["avery@example.test"],"directReportsCount":0,"directReportMembersCount":0,"manager":{"id":"employee-morgan","name":"Morgan Reed","avatarUrl":null,"jobTitle":"Engineering Manager","managerId":null,"primaryEmail":"morgan@example.test","phoneNumber":null,"firstName":"Morgan","preferredName":null,"lastName":"Reed","isActiveMember":true}}}},"UpdateEmployeeEmploymentStatusRequest":{"type":"object","properties":{"employmentStatus":{"type":"string","enum":["CURRENT","FORMER"],"description":"CURRENT means the employee is not archived; FORMER means archived. Employment status is separate from member access.","title":"Employment status","example":"CURRENT"}},"required":["employmentStatus"],"additionalProperties":false,"title":"Set employee employment status request","example":{"employmentStatus":"FORMER"}},"CreateEmployeesResponse":{"type":"object","properties":{"employees":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeMinView"},"description":"New employee profiles in the same order as the submitted entries.","title":"Employees"}},"required":["employees"],"additionalProperties":false,"title":"Created employee batch response","example":{"employees":[{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer","managerId":"employee-morgan","primaryEmail":"avery@example.test","phoneNumber":null,"firstName":"Avery","preferredName":null,"lastName":"Chen","isActiveMember":true}]}},"CreateEmployeesRequest":{"type":"object","properties":{"employees":{"type":"array","items":{"$ref":"#/components/schemas/CreateEmployeeRequest"},"minItems":1,"maxItems":100,"description":"Between 1 and 100 new employee requests. The batch is transactional.","title":"Employees"}},"required":["employees"],"additionalProperties":false,"title":"Create employee batch","example":{"employees":[{"primaryEmail":"avery@example.test","firstName":"Avery","lastName":"Chen","jobTitle":"Engineer","managerId":"employee-morgan"}]}},"ListAvailableEmployeeFieldSourcesResponse":{"type":"object","properties":{"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/AvailableEmployeeFieldSource"}}},"required":["capabilities"]},"AvailableEmployeeFieldSource":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/AssignableEmployeeFieldSourceId"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFieldKey"},"description":"Fields this source can supply. Saved defaults and employee overrides are listed separately.","title":"Supported fields","example":["jobTitle"]}},"required":["source","fields"]},"AssignableEmployeeFieldSourceId":{"type":"string","enum":["manual","scim","slack","google-workspace","google-workspace-individual","outlook-calendar","adp-workforce-now","bamboo-hr","charthop","darwinbox","dayforce","deel","gusto","hibob","humaans","just-works","oracle-hcm","paylocity","rippling","trinet","ukg-pro","workday"],"description":"An owning source. New assignments require a connected source supporting the field. Manual is always available; SCIM requires enabled provisioning.","example":"manual"},"ListEmployeeFieldSourceConfigsResponse":{"type":"object","properties":{"configs":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFieldSourceConfig"}}},"required":["configs"]},"EmployeeFieldSourceConfig":{"type":"object","properties":{"id":{"type":"string","description":"Opaque identifier of this configuration record.","title":"Configuration ID","example":"field-config-job-title"},"companyId":{"type":"string","description":"Company ID owning this configuration. This is not the company URL slug.","title":"Company ID","example":"company-acme"},"employeeId":{"type":["string","null"],"description":"Employee ID for a per-employee override. Null identifies a company-wide default.","title":"Employee ID","example":"employee-avery"},"fieldKey":{"$ref":"#/components/schemas/EmployeeFieldKey"},"source":{"$ref":"#/components/schemas/EmployeeFieldSourceId"},"createdAt":{"type":"string","description":"Timestamp when this configuration record was created.","title":"Created at","example":"2026-01-15T10:00:00.000Z"},"updatedAt":{"type":"string","description":"Timestamp when this configuration record was last updated.","title":"Updated at","example":"2026-01-15T10:00:00.000Z"}},"required":["id","companyId","employeeId","fieldKey","source","createdAt","updatedAt"]},"EmployeeFieldSourceId":{"type":"string","enum":["manual","system","scim","slack","slack-analytics","google-workspace","google-workspace-individual","notion","airtable","attio","gong","monday","merge","adp-workforce-now","bamboo-hr","charthop","darwinbox","dayforce","deel","gusto","hibob","humaans","just-works","oracle-hcm","outlook-calendar","paylocity","rippling","trinet","ukg-pro","workday","asana","bonusly","claude","clickup","codex","cursor","devin","figma","front","github","granola","hubspot","intercom","jira","linear","pipedrive","roam","salesforce","slack-agent","windmill","zendesk","zendesk-chat","zoom"],"description":"Public source identifier. Saved configurations may retain a disconnected source.","example":"bamboo-hr"},"ResolveEmployeeFieldSourceIdsResponse":{"type":"object","properties":{"resolutions":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFieldSourceResolution"}}},"required":["resolutions"]},"EmployeeFieldSourceResolution":{"type":"object","properties":{"employeeId":{"type":"string","description":"Requested employee ID for this field resolution.","title":"Employee ID","example":"employee-avery"},"fieldKey":{"$ref":"#/components/schemas/EmployeeFieldKey"},"source":{"$ref":"#/components/schemas/EmployeeFieldSourceId"},"isSyncing":{"type":"boolean","description":"True when Windmill can refresh the connected source and the latest saved field value has not been confirmed by that source. This does not mean a sync is running. False does not guarantee that the value is up to date.","title":"Awaiting source confirmation","example":false}},"required":["employeeId","fieldKey","source","isSyncing"]},"ResolveEmployeeFieldSourcesRequest":{"type":"object","properties":{"employeeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":1000,"description":"Up to 1000 employee IDs, each 1–256 characters. Every ID must belong to the company. Repeated IDs are resolved once in first-seen order. An empty array returns no resolutions.","title":"Employee IDs","example":["employee-avery"]},"fieldKeys":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeFieldKey"},"maxItems":100,"description":"Up to 100 field keys. Repeated keys are resolved once in first-seen order. Omit to inspect all supported field keys; an empty array resolves no fields.","title":"Field keys","example":["jobTitle"]}},"required":["employeeIds"],"title":"Resolve field owners request","example":{"employeeIds":["employee-avery"],"fieldKeys":["jobTitle"]}},"SetEmployeeFieldSourceResponse":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/EmployeeFieldSourceConfig"}},"required":["config"]},"SetEmployeeFieldSourceRequest":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/AssignableEmployeeFieldSourceId"}},"required":["source"]},"ListEmployeeGroupsResponse":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeGroupV3"},"description":"Matching groups in the requested page, or an empty array.","title":"Groups","example":[]},"pagination":{"$ref":"#/components/schemas/EmployeeGroupPagination"}},"required":["groups","pagination"],"title":"Employee group list","description":"Readable group page, continuation flag, and optional matching count.","example":{"groups":[{"id":"group-engineering","name":"Engineering","type":"MANUAL","categoryIds":["11111111-1111-4111-8111-111111111111"],"employeeCount":1,"integrationId":null,"integrationUserGroupId":null,"integrationUserGroupExternalType":null,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z","sharingAccess":{"companyAccess":"read","allManagersAccess":"none","employeeAccess":[{"employeeId":"employee-avery","access":"write"}],"groupAccess":[],"subtreeAccess":[]},"canWrite":true}],"pagination":{"page":1,"pageSize":50,"hasMore":false,"total":1}}},"EmployeeGroupV3":{"type":"object","properties":{"id":{"type":"string","description":"Opaque employee group identifier in this company.","title":"Employee group ID","example":"group-engineering"},"name":{"type":"string","description":"Employee group display name.","title":"Group name","example":"Engineering"},"type":{"type":"string","enum":["MANUAL","FILTER","SYNCED","SCIM"],"description":"MANUAL has an explicit roster; FILTER uses employee rules; SYNCED follows an integration group; SCIM is provisioned.","title":"Group type","example":"MANUAL"},"categoryIds":{"type":"array","items":{"type":"string"},"description":"Active category UUIDs assigned to the group. A group can belong to multiple categories.","title":"Category IDs","example":["11111111-1111-4111-8111-111111111111"]},"employeeCount":{"type":"number","description":"Number of non-archived employees currently in this group, independently of workspace membership.","title":"Employee count","example":1},"integrationId":{"type":["string","null"],"description":"Owning integration identifier, or null for groups without an integration link.","title":"Integration ID"},"integrationUserGroupId":{"type":["string","null"],"description":"Identifier of the linked integration group, or null when no such link exists.","title":"Integration group ID"},"integrationUserGroupExternalType":{"type":["string","null"],"description":"Integration-defined group type, or null when unavailable.","title":"External group type"},"createdByEmployeeId":{"type":["string","null"],"description":"Employee who created this resource, or null when no employee creator is recorded.","title":"Creator employee ID"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp in ISO 8601 format.","title":"Created at","example":"2026-01-15T10:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last recorded update timestamp in ISO 8601 format.","title":"Updated at","example":"2026-01-15T10:00:00.000Z"},"sharingAccess":{"$ref":"#/components/schemas/EmployeeGroupSharingAccess"},"canWrite":{"type":"boolean","description":"Whether you have permission to edit this group.","title":"Can edit","example":true}},"required":["id","name","type","categoryIds","employeeCount","integrationId","integrationUserGroupId","integrationUserGroupExternalType","createdByEmployeeId","createdAt","updatedAt","sharingAccess","canWrite"],"title":"Employee group","description":"Employee group in this company, its current employee count, and your permission to edit it.","example":{"id":"group-engineering","name":"Engineering","type":"MANUAL","categoryIds":["11111111-1111-4111-8111-111111111111"],"employeeCount":1,"integrationId":null,"integrationUserGroupId":null,"integrationUserGroupExternalType":null,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z","sharingAccess":{"companyAccess":"read","allManagersAccess":"none","employeeAccess":[{"employeeId":"employee-avery","access":"write"}],"groupAccess":[],"subtreeAccess":[]},"canWrite":true}},"EmployeeGroupSharingAccess":{"type":"object","properties":{"companyAccess":{"type":"string","enum":["none","read","write"],"description":"Access for everyone in this company.","title":"Company access","example":"read"},"allManagersAccess":{"type":"string","enum":["none","read","write"],"description":"Access for employees who manage others.","title":"All managers access","example":"read"},"employeeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this company.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"No access, read access, or read and edit access.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"description":"Access granted directly to employees.","title":"Employee access","example":[{"employeeId":"employee-avery","access":"write"}]},"groupAccess":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","minLength":1,"description":"Employee group ID in this company.","title":"Group ID","example":"group-engineering"},"access":{"type":"string","enum":["none","read","write"],"description":"No access, read access, or read and edit access.","title":"Access level","example":"read"}},"required":["groupId","access"]},"description":"Access granted to members of employee groups.","title":"Group access","example":[]},"subtreeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this company.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"No access, read access, or read and edit access.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"description":"Access granted to employees in the specified reporting subtrees.","title":"Reporting subtree access","example":[]}},"required":["companyAccess","allManagersAccess","employeeAccess","groupAccess","subtreeAccess"],"title":"Sharing access","description":"Who can read or edit this employee group."},"EmployeeGroupPagination":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1,"description":"One-based page number. Defaults to 1.","title":"Page number","example":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":50,"description":"Maximum results per page, from 1 to 100. Defaults to 50.","title":"Page size","example":50},"hasMore":{"type":"boolean","description":"Whether there are more matching results after this page.","title":"Has another page","example":false},"total":{"type":"integer","minimum":0,"description":"Total matching items, independent of pagination. The route determines the item type.","title":"Total matches","example":1}},"required":["page","pageSize","hasMore"],"title":"Group pagination","example":{"page":1,"pageSize":50,"hasMore":false,"total":1},"description":"Page position and optional total count."},"EmployeeGroupSortProperty":{"type":"string","enum":["name","employeeCount","externalType","createdAt","updatedAt"],"default":"name","title":"Sort field","description":"Field used to order results. Supported values depend on this listing. Defaults to name.","example":"name"},"EmployeeGroupCount":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total matching items, independent of pagination. The route determines the item type.","title":"Total matches","example":1}},"required":["total"],"title":"Group or member count","example":{"total":1}},"GetEmployeeGroupResponse":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/EmployeeGroupDetailV3"}},"required":["group"],"title":"Employee group response","description":"One readable, non-archived group.","example":{"group":{"id":"group-engineering","name":"Engineering","type":"MANUAL","categoryIds":["11111111-1111-4111-8111-111111111111"],"employeeCount":1,"integrationId":null,"integrationUserGroupId":null,"integrationUserGroupExternalType":null,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z","sharingAccess":{"companyAccess":"read","allManagersAccess":"none","employeeAccess":[{"employeeId":"employee-avery","access":"write"}],"groupAccess":[],"subtreeAccess":[]},"canWrite":true}}},"EmployeeGroupDetailV3":{"allOf":[{"$ref":"#/components/schemas/EmployeeGroupV3"},{"type":"object","properties":{"rules":{"allOf":[{"$ref":"#/components/schemas/EmployeeFilter"},{"description":"Employee filter for a FILTER group. Group references are rejected at every depth; relative start dates must be tenure ranges.","title":"Employee rules"}]}}}],"title":"Group","description":"The readable employee group returned by this operation.","example":{"id":"group-engineering","name":"Engineering","type":"MANUAL","categoryIds":["11111111-1111-4111-8111-111111111111"],"employeeCount":1,"integrationId":null,"integrationUserGroupId":null,"integrationUserGroupExternalType":null,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z","sharingAccess":{"companyAccess":"read","allManagersAccess":"none","employeeAccess":[{"employeeId":"employee-avery","access":"write"}],"groupAccess":[],"subtreeAccess":[]},"canWrite":true}},"CreateEmployeeGroupResponse":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the newly created employee group or category.","title":"Created resource ID","example":"11111111-1111-4111-8111-111111111111"}},"required":["id"],"title":"Created resource response","description":"Identifier of the newly created group or category.","example":{"id":"11111111-1111-4111-8111-111111111111"}},"CreateEmployeeGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Group name, trimmed, 1–200 characters. Duplicate group names are permitted.","title":"Group name","example":"Engineering"},"type":{"type":"string","enum":["MANUAL","FILTER"],"description":"MANUAL creates an explicit roster; FILTER creates a smart group. SYNCED and SCIM use their own provisioning flows.","title":"Group type","example":"MANUAL"},"categoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Up to 100 active category UUIDs. Duplicate IDs are deduplicated. Empty means no categories.","title":"Category IDs","example":["11111111-1111-4111-8111-111111111111"]},"rules":{"allOf":[{"$ref":"#/components/schemas/EmployeeFilter"},{"description":"Employee filter for a FILTER group. Group references are rejected at every depth; relative start dates must be tenure ranges.","title":"Employee rules"}]}},"required":["name","type"],"title":"Create employee group","description":"Create a MANUAL or FILTER group. Rules are rejected for MANUAL; FILTER defaults to an empty API employee filter.","example":{"name":"Engineering","type":"MANUAL","categoryIds":["11111111-1111-4111-8111-111111111111"]}},"EmployeeGroupMutationResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"True when the command completed successfully.","title":"Success","example":true}},"required":["success"],"title":"Group command response","description":"Confirmation that the command completed.","example":{"success":true}},"UpdateEmployeeGroupRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Group name, trimmed, 1–200 characters. Duplicate group names are permitted.","title":"Group name","example":"Engineering"},"categoryIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Replacement list of up to 100 active category UUIDs. Duplicate IDs are deduplicated. Omit to keep existing categories; an empty list removes all categories.","title":"Category IDs","example":["11111111-1111-4111-8111-111111111111"]}},"title":"Update employee group","description":"Updates name and categories together. Names are editable for MANUAL and FILTER groups; categories are editable for every group type. Omitted properties are unchanged.","example":{"name":"Product Engineering","categoryIds":["11111111-1111-4111-8111-111111111111"]}},"ListEmployeeGroupMembersResponse":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeGroupMember"},"description":"Matching non-archived employees in the group. They need not have workspace membership.","title":"Employees","example":[{"id":"employee-avery","firstName":"Avery","lastName":"Chen","displayFullName":"Avery Chen","avatarUrl":null,"primaryEmail":"avery@example.test","jobTitle":"Engineer"}]},"pagination":{"$ref":"#/components/schemas/EmployeeGroupPagination"}},"required":["members","pagination"],"title":"Group members response","description":"Current non-archived roster page and optional matching count.","example":{"members":[{"id":"employee-avery","firstName":"Avery","lastName":"Chen","displayFullName":"Avery Chen","avatarUrl":null,"primaryEmail":"avery@example.test","jobTitle":"Engineer"}],"pagination":{"page":1,"pageSize":50,"hasMore":false,"total":1}}},"EmployeeGroupMember":{"type":"object","properties":{"id":{"type":"string","description":"Opaque employee identifier in this company.","title":"Employee ID","example":"employee-avery"},"firstName":{"type":["string","null"],"description":"Recorded employee first name, or null when unavailable.","title":"First name","example":"Avery"},"lastName":{"type":["string","null"],"description":"Recorded employee last name, or null when unavailable.","title":"Last name","example":"Chen"},"displayFullName":{"type":["string","null"],"description":"Recorded employee display name, or null when unavailable.","title":"Display name","example":"Avery Chen"},"avatarUrl":{"type":["string","null"],"description":"Avatar URL, or null when no avatar is available.","title":"Avatar URL","example":null},"primaryEmail":{"type":["string","null"],"description":"Primary employee email, or null when unavailable.","title":"Primary email","example":"avery@example.test"},"jobTitle":{"type":["string","null"],"description":"Recorded employee job title, or null when unavailable.","title":"Job title","example":"Engineer"}},"required":["id","firstName","lastName","displayFullName","avatarUrl","primaryEmail","jobTitle"],"title":"Group employee","description":"An org-chart employee, independent of workspace membership.","example":{"id":"employee-avery","firstName":"Avery","lastName":"Chen","displayFullName":"Avery Chen","avatarUrl":null,"primaryEmail":"avery@example.test","jobTitle":"Engineer"}},"EmployeeGroupMemberSortProperty":{"type":"string","enum":["name","email","jobTitle","id"],"default":"name","title":"Sort field","description":"Field used to order results. Supported values depend on this listing. Defaults to name.","example":"name"},"AddEmployeeGroupMembersRequest":{"type":"object","properties":{"selection":{"$ref":"#/components/schemas/EmployeeBulkSelection"},"expectedCount":{"type":"integer","minimum":0,"description":"Must equal the number of employees resolved by the selection before the operation. A mismatch rejects the request.","title":"Expected selected count","example":1}},"required":["selection","expectedCount"],"additionalProperties":false,"title":"Add selected employees to a group","example":{"selection":{"mode":"EXPLICIT","employeeIds":["employee-avery"]},"expectedCount":1},"description":"Select employee IDs or all employees matching the API filter. expectedCount counts selected employees, including existing group members, rather than new memberships."},"EmployeeBulkSelection":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["EXPLICIT"],"description":"Request variant. Must be EXPLICIT.","title":"Mode"},"employeeIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"maxItems":1000,"description":"Between 1 and 1000 unique employee IDs to select.","title":"Selected employee IDs","example":["employee-avery"]}},"required":["mode","employeeIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","enum":["ALL_MATCHING"],"description":"Request variant. Must be ALL_MATCHING.","title":"Mode"},"filter":{"$ref":"#/components/schemas/EmployeeFilter"}},"required":["mode","filter"],"additionalProperties":false}],"title":"Employee selection","description":"Employees selected for the operation.","example":{"mode":"EXPLICIT","employeeIds":["employee-avery"]}},"RemoveEmployeeGroupMembersRequest":{"type":"object","properties":{"selection":{"$ref":"#/components/schemas/EmployeeBulkSelection"},"expectedCount":{"type":"integer","minimum":0,"description":"Must equal the number of employees resolved by the selection before the operation. A mismatch rejects the request.","title":"Expected selected count","example":1}},"required":["selection","expectedCount"],"additionalProperties":false,"title":"Remove selected group members","example":{"selection":{"mode":"EXPLICIT","employeeIds":["employee-avery"]},"expectedCount":1},"description":"Select current group members by explicit employee IDs or the API employee filter. expectedCount must match before memberships are removed; employees are not deleted."},"EmployeeGroupRefreshResponse":{"type":"object","properties":{"added":{"type":"number","description":"Number of memberships created while refreshing saved smart-group rules.","title":"Members added","example":1},"removed":{"type":"number","description":"Number of memberships deleted while refreshing saved smart-group rules.","title":"Members removed","example":0}},"required":["added","removed"],"title":"Membership refresh counts","description":"Number of memberships added and removed by the rule refresh.","example":{"added":1,"removed":0}},"EmployeeGroupRulesRequest":{"type":"object","properties":{"rules":{"allOf":[{"$ref":"#/components/schemas/EmployeeFilter"},{"description":"Employee filter for a FILTER group. Group references are rejected at every depth; relative start dates must be tenure ranges.","title":"Employee rules"}]}},"required":["rules"],"title":"Smart group rules","description":"Replace the saved employee filter and refresh membership before returning.","example":{"rules":{"status":"CURRENT","jobTitles":["Engineer"]}}},"SyncEmployeeGroupNowResponse":{"oneOf":[{"type":"object","properties":{"archived":{"type":"boolean","enum":[false],"description":"True when sync archived the group instead of returning refreshed details.","title":"Group archived","example":false},"group":{"allOf":[{"$ref":"#/components/schemas/EmployeeGroupDetailV3"},{"description":"Refreshed group details, or null when the linked source caused the group to be archived."}]}},"required":["archived","group"]},{"type":"object","properties":{"archived":{"type":"boolean","enum":[true],"description":"True when sync archived the group instead of returning refreshed details.","title":"Group archived","example":true},"group":{"type":"null","description":"Refreshed group details, or null when the linked source caused the group to be archived.","title":"Group"}},"required":["archived","group"]}],"title":"Group refresh response","description":"Refreshed group details, or archived:true and group:null when its linked source is unavailable.","example":{"archived":false,"group":{"id":"group-engineering","name":"Engineering","type":"MANUAL","categoryIds":["11111111-1111-4111-8111-111111111111"],"employeeCount":1,"integrationId":null,"integrationUserGroupId":null,"integrationUserGroupExternalType":null,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z","sharingAccess":{"companyAccess":"read","allManagersAccess":"none","employeeAccess":[{"employeeId":"employee-avery","access":"write"}],"groupAccess":[],"subtreeAccess":[]},"canWrite":true}}},"EmployeeGroupAccessRequest":{"type":"object","properties":{"companyAccess":{"type":"string","enum":["none","read","write"],"description":"Access for everyone in this company.","title":"Company access","example":"read"},"allManagersAccess":{"type":"string","enum":["none","read","write"],"description":"Access for employees who manage others.","title":"All managers access","example":"read"},"employeeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this company.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"No access, read access, or read and edit access.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"maxItems":500,"description":"Replacement employee grants. Omitted employees lose their direct grant.","title":"Employee access","example":[{"employeeId":"employee-avery","access":"write"}]},"groupAccess":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","minLength":1,"description":"Employee group ID in this company.","title":"Group ID","example":"group-engineering"},"access":{"type":"string","enum":["none","read","write"],"description":"No access, read access, or read and edit access.","title":"Access level","example":"read"}},"required":["groupId","access"]},"maxItems":500,"description":"Replacement employee-group grants.","title":"Group access","example":[]},"subtreeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this company.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"No access, read access, or read and edit access.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"maxItems":500,"description":"Replacement reporting-subtree grants.","title":"Reporting subtree access","example":[]}},"required":["companyAccess","allManagersAccess","employeeAccess","groupAccess","subtreeAccess"],"additionalProperties":false,"title":"Group sharing request","description":"Replace editable sharing grants. System-managed permissions are preserved.","example":{"companyAccess":"read","allManagersAccess":"none","employeeAccess":[{"employeeId":"employee-avery","access":"write"}],"groupAccess":[],"subtreeAccess":[]}},"EmployeeGroupImportUploadResponse":{"allOf":[{"$ref":"#/components/schemas/EmployeeGroupImportReview"},{"type":"object","properties":{"uploadId":{"type":"string","format":"uuid","description":"UUID returned by upload review. The upload is scoped to the company, group, and uploading employee.","title":"Upload ID","example":"22222222-2222-4222-8222-222222222222"}},"required":["uploadId"]}],"title":"CSV upload response","description":"Review results plus the upload ID used to submit this import.","example":{"total":1,"accepted":1,"rejected":0,"ready":[{"row":2,"email":"avery@example.test","employee":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer"}}],"errors":[],"uploadId":"22222222-2222-4222-8222-222222222222"}},"EmployeeGroupImportRowError":{"type":"object","properties":{"row":{"type":"integer","description":"One-based CSV row number, including the header. The first data row is 2.","title":"CSV row number","example":2},"email":{"type":["string","null"],"description":"Email text as submitted in the CSV, or null when missing or unavailable.","title":"Email address","example":"avery@example.test"},"error":{"type":["string","null"],"description":"Explanation of a rejected row or failed sync. Null or absence means no error is recorded.","title":"Error message"}},"required":["row","email","error"],"title":"Import row error","description":"A rejected CSV data row.","example":{"row":2,"email":"missing@example.test","error":"No active employee matches this email"}},"EmployeeGroupImportReview":{"type":"object","properties":{"total":{"type":"number","description":"Total CSV data rows reviewed, excluding the header.","title":"Total matches","example":1},"accepted":{"type":"number","description":"Number of CSV rows that currently resolve to an active employee in the company.","title":"Accepted rows","example":1},"rejected":{"type":"number","description":"Number of rejected CSV rows; in job status, the number of processed rows that failed.","title":"Rejected rows","example":0},"ready":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","description":"One-based CSV row number, including the header. The first data row is 2.","title":"CSV row number","example":2},"email":{"type":"string","description":"Employee email address. CSV input is trimmed and lowercased before matching.","title":"Email address","example":"avery@example.test"},"employee":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Opaque employee identifier in this company.","title":"Employee ID","example":"employee-avery"},"name":{"type":"string","description":"Resolved employee display name.","title":"Employee name","example":"Avery Chen"},"avatarUrl":{"type":["string","null"],"description":"Avatar URL, or null when no avatar is available.","title":"Avatar URL","example":null},"jobTitle":{"type":["string","null"],"description":"Recorded employee job title, or null when unavailable.","title":"Job title","example":"Engineer"}},"required":["id","name","avatarUrl","jobTitle"],"description":"Matched employee summary, or null when unavailable during review.","title":"Matched employee"}},"required":["row","email","employee"]},"description":"First 50 accepted CSV rows, with matched employee summaries. This is a preview rather than the full import.","title":"Accepted row preview"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeGroupImportRowError"},"description":"First 50 rejected or failed rows. The rejected count can exceed the length of this preview.","title":"Row errors","example":[]}},"required":["total","accepted","rejected","ready","errors"],"title":"CSV review","description":"Full row counts and up to 50 accepted and rejected row previews.","example":{"total":1,"accepted":1,"rejected":0,"ready":[{"row":2,"email":"avery@example.test","employee":{"id":"employee-avery","name":"Avery Chen","avatarUrl":null,"jobTitle":"Engineer"}}],"errors":[]}},"EmployeeGroupImportResponse":{"type":"object","properties":{"importId":{"type":"string","format":"uuid","description":"UUID of the asynchronous member import.","title":"Import ID","example":"33333333-3333-4333-8333-333333333333"}},"required":["importId"],"title":"Group import response","description":"Identifier of the queued or existing import.","example":{"importId":"33333333-3333-4333-8333-333333333333"}},"SubmitEmployeeGroupImportRequest":{"type":"object","properties":{"uploadId":{"type":"string","format":"uuid","description":"UUID returned by upload review. The upload is scoped to the company, group, and uploading employee.","title":"Upload ID","example":"22222222-2222-4222-8222-222222222222"}},"required":["uploadId"],"title":"Submit group import request","description":"Submit a previously reviewed CSV upload.","example":{"uploadId":"22222222-2222-4222-8222-222222222222"}},"EmployeeGroupImportStatus":{"type":"object","properties":{"importId":{"type":"string","format":"uuid","description":"UUID of the asynchronous member import.","title":"Import ID","example":"33333333-3333-4333-8333-333333333333"},"status":{"type":"string","enum":["VALIDATED","IMPORTING","COMPLETED","FAILED"],"description":"Current import or referenced-resource status. See the containing response for its meaning.","title":"Status","example":"COMPLETED"},"imported":{"type":"number","description":"Number of completed import rows, including rows whose employee was already a member.","title":"Imported rows","example":1},"rejected":{"type":"number","description":"Number of rejected CSV rows; in job status, the number of processed rows that failed.","title":"Rejected rows","example":0},"errors":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeGroupImportRowError"},"description":"First 50 rejected or failed rows. The rejected count can exceed the length of this preview.","title":"Row errors","example":[]}},"required":["importId","status","imported","rejected","errors"],"title":"Group import progress","description":"Processed row counts and at most 50 row failures. Counts can change while the job runs.","example":{"importId":"33333333-3333-4333-8333-333333333333","status":"COMPLETED","imported":1,"rejected":0,"errors":[]}},"ListEmployeeGroupCategoriesResponse":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeGroupCategory"},"description":"Active company categories, ordered by case-insensitive name then ID.","title":"Categories","example":[{"id":"11111111-1111-4111-8111-111111111111","name":"Teams","description":"Organizational teams.","icon":{"emoji":"👥","color":"#3B82F6"},"groupCount":1,"employeeCount":1,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z"}]}},"required":["categories"],"title":"Group categories response","description":"Active company categories ordered by name then ID.","example":{"categories":[{"id":"11111111-1111-4111-8111-111111111111","name":"Teams","description":"Organizational teams.","icon":{"emoji":"👥","color":"#3B82F6"},"groupCount":1,"employeeCount":1,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z"}]}},"EmployeeGroupCategory":{"type":"object","properties":{"id":{"type":"string","description":"UUID of this company-wide group category.","title":"Category ID","example":"11111111-1111-4111-8111-111111111111"},"name":{"type":"string","description":"Company-wide category display name.","title":"Category name","example":"Teams"},"description":{"type":["string","null"],"description":"Category description, or null when no description is saved.","title":"Description","example":"Organizational teams."},"icon":{"$ref":"#/components/schemas/EmployeeGroupCategoryIcon"},"groupCount":{"type":"number","description":"Number of active groups in this category that the caller can read.","title":"Readable groups","example":1},"employeeCount":{"type":"number","description":"Number of distinct non-archived employees in the group or accessible category groups.","title":"Employee count","example":1},"createdByEmployeeId":{"type":["string","null"],"description":"Employee who created this resource, or null when no employee creator is recorded.","title":"Creator employee ID"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp in ISO 8601 format.","title":"Created at","example":"2026-01-15T10:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Last recorded update timestamp in ISO 8601 format.","title":"Updated at","example":"2026-01-15T10:00:00.000Z"}},"required":["id","name","description","icon","groupCount","employeeCount","createdByEmployeeId","createdAt","updatedAt"],"title":"Group category","description":"Company-wide category with counts limited to groups readable by the caller.","example":{"id":"11111111-1111-4111-8111-111111111111","name":"Teams","description":"Organizational teams.","icon":{"emoji":"👥","color":"#3B82F6"},"groupCount":1,"employeeCount":1,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z"}},"EmployeeGroupCategoryIcon":{"anyOf":[{"type":"object","properties":{"emoji":{"type":"string","description":"Emoji used for the category icon. Choose either the emoji or glyph form.","title":"Emoji","example":"👥"},"color":{"$ref":"#/components/schemas/EmployeeGroupCategoryColor"}},"required":["emoji","color"],"additionalProperties":false},{"type":"object","properties":{"glyph":{"type":"string","enum":["ACTIVITY","AI","ALERT","ALERT_TRIANGLE","ANALYTICS","ANONYMOUS","ANTENNA_BARS_1","ANTENNA_BARS_2","ANTENNA_BARS_3","ANTENNA_BARS_4","ANTENNA_BARS_5","ARROW_DOWN","ARROW_LEFT","ARROW_NARROW_UP_DASHED","ARROW_RIGHT","ARROW_TO_DOWN_LINE","ARROW_TO_UP_LINE","ARROW_UP","BELL_OFF","BELL_RING","BOT","BUILDING","CALENDAR","CALENDAR_PAUSE","CARD","CARET_UP_FILLED","CHANNEL","CHECK","CHECK_CIRCLE_FILLED","CHECKS","CHEVRON_DOWN","CHEVRON_DOWN_PIXEL","CHEVRON_RIGHT","CHOOSE_STATS","CLICK","CLOCK","CLOCK_FILLED","CODE","COG","COLUMNS","COMPANY","COMPARISON","COPY","COST","DATABASE","DEBUG","DEEP_DIVE","DELEGATED_ACCESS","DELIVERY","DEVICE_DESKTOP_ANALYTICS","DISCONNECT","DOCUMENT","DOCUMENT_TEMPLATE","DOT","EDIT","EMAIL","EMPLOYEE","EMPLOYEES","ERROR","EXTERNAL_LINK","EYE","FEATURE_INDETERMINATE","FEATURE_OFF","FEATURE_ON","FEATURES","FEEDBACK","FEEDBACK_GIVEN","FEEDBACK_RECEIVED","FILTER","FLAG","FLAME","FULL_SCREEN","GLOBE","GRID_DOTS","GROUPS","HAMBURGER","HAPPY","HEALTH","HELP_SQUARE_ROUNDED","HERO_NUMBER","HIGHLIGHTS","HOME","HOME_GRID","INBOX","IMPACT","INFO_CIRCLE","INTEGRATIONS","KEY","KNOWLEDGE","KEYBOARD_DOUBLE_ARROW_RIGHT","KEYBOARD_SINGLE_ARROW_RIGHT","LAYOUT_COLUMNS","LAYOUT_ROWS","LEADERBOARD","LIGHTNING_BOLT","LIST_SEARCH","LIGHT_BULB","LINK","LINKED_IN","LOADING","LOCK","LOGOUT","MAILBOX","MAPPING","MEETINGS","MEDAL","COMPANY_VALUES","MERGE","MEGAPHONE","MESSAGES","MICROPHONE","MOON","NEW_ACTIVITY","NEW_TAB","NOTES","NOTIFICATIONS","ONE_ON_ONE","ORG_CHART","ORGS","PAINT_BRUSH","PANEL_LEFT_CLOSE","PANEL_LEFT_OPEN","PANEL_RIGHT_CLOSE","PAUSE","PAUSE_FILLED","PAPER_CLIP","PENCIL_BOLT","PERFORMANCE","PLAY","PERSON","PERSON_CHECK","PERSON_MULTIPLE_CHECK","PIGGY_BANK","PIN","PIN_FILLED","PINNED_OFF","PLAY_CIRCLE","PLUS","PLUS_CIRCLE","PROGRESS_CHECK","PULSE","PUZZLED","RECAPS","RECEIPT_DOLLAR","RECORDING","RECORDING_NOT_FOUND","REFRESH","RELATIONSHIP_DIRECT_MANAGER","RELATIONSHIP_DIRECT_REPORT","RELATIONSHIP_PEER","RELATIONSHIP_SKIP_LEVEL_MANAGER","RELATIONSHIP_SKIP_LEVEL_REPORT","REPEAT","REPORT","REVIEWS","REVIEW_SELF","REVIEW_UPWARD","REVIEW_MANAGER","REVIEW_PEER","ROBOT_FACE","ROCKET","ROUTINES","SAD","SAVED_VIEW","SEARCH","SEND","SETTINGS","SHIELD","SHOUTOUT","SMILE_PLUS","SMS","SQUARE_ROUNDED_PLUS","SPINNER","SPINNER_LINE","STAR","STAR_FILLED","STATS","SUMMARY","SUN","SUPERPOWERS","SUPPORT","SURVEY","SWITCH","SYNC_INTEGRATION","TABLE","TAG","TEAM","TELESCOPE","TERMINAL","TEST","THREE_DOTS_VERTICAL","THUMBS_UP","TIME_SPENT","TRENDING_DOWN","TRENDING_UP","TRASH","TWITTER","USER","USER_CIRCLE","USER_PLUS","USERS_GROUP","WINDY","WINDY_CHAT","WINDY_CHAT_PLUS","WRENCH","X","X_CIRCLE_FILLED","YOUTUBE"],"description":"Supported standard icon identifier. Choose either the glyph or emoji form.","title":"Icon glyph"},"color":{"$ref":"#/components/schemas/EmployeeGroupCategoryColor"}},"required":["glyph","color"],"additionalProperties":false}],"title":"Category icon","description":"Emoji/color or standard glyph/color object. The icon object rejects unknown fields.","example":{"emoji":"👥","color":"#3B82F6"}},"EmployeeGroupCategoryColor":{"type":"string","description":"Palette hex color, accepted case-insensitively: #3B82F6, #6366F1, #8B5CF6, #EC4899, #EF4444, #F97316, #F59E0B, #10B981, #14B8A6, #64748B.","title":"Icon color","example":"#3B82F6"},"GetEmployeeGroupCategoryResponse":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/EmployeeGroupCategory"},{"title":"Category","description":"Active company category with counts limited to readable groups."}]}},"required":["category"],"title":"Group category response","description":"One active company category.","example":{"category":{"id":"11111111-1111-4111-8111-111111111111","name":"Teams","description":"Organizational teams.","icon":{"emoji":"👥","color":"#3B82F6"},"groupCount":1,"employeeCount":1,"createdByEmployeeId":"employee-avery","createdAt":"2026-01-15T10:00:00.000Z","updatedAt":"2026-01-15T10:00:00.000Z"}}},"CreateEmployeeGroupCategoryRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Category name, trimmed, 1–100 characters. Must be unique among active company categories, ignoring case.","title":"Category name","example":"Teams"},"description":{"type":["string","null"],"maxLength":500,"description":"Optional category description, trimmed, up to 500 characters. Null or empty clears the saved description.","title":"Description","example":"Organizational teams."},"icon":{"$ref":"#/components/schemas/EmployeeGroupCategoryIcon"}},"required":["name","icon"],"title":"Create group category","description":"Category name must be unique among active company categories, ignoring case.","example":{"name":"Teams","description":"Organizational teams.","icon":{"emoji":"👥","color":"#3B82F6"}}},"UpdateEmployeeGroupCategoryRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Category name, trimmed, 1–100 characters. Must be unique among active company categories, ignoring case.","title":"Category name","example":"Teams"},"description":{"type":["string","null"],"maxLength":500,"description":"Optional category description, trimmed, up to 500 characters. Null or empty clears the saved description.","title":"Description","example":"Organizational teams."},"icon":{"$ref":"#/components/schemas/EmployeeGroupCategoryIcon"}},"title":"Update group category","description":"Omitted properties remain unchanged; null or empty description clears it.","example":{"description":"Updated team categories."}},"EmployeeGroupCategoryGroupsRequest":{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":200,"description":"1–200 group IDs to add to or remove from a category. Each group requires edit access.","title":"Group IDs","example":["group-engineering"]}},"required":["groupIds"],"title":"Category group changes","description":"Add or remove up to 200 editable groups while retaining their other categories.","example":{"groupIds":["group-engineering"]}},"SearchStatMetadataResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/StatMetadata"},"description":"One page of matching, non-archived global or workspace stat definitions.","title":"Stat definitions"},"pagination":{"$ref":"#/components/schemas/SearchPaginationResponse"}},"required":["results","pagination"],"title":"Stat definition search response"},"StatMetadata":{"type":"object","properties":{"id":{"type":"string","description":"Opaque stat definition ID. Use it in the ids filter when searching definitions.","title":"Stat definition ID","example":"11111111-1111-4111-8111-111111111111"},"createdAt":{"type":"string","description":"Creation time as an ISO 8601 timestamp.","title":"Created at","example":"2026-01-01T10:00:00.000Z"},"updatedAt":{"type":"string","description":"Last update time as an ISO 8601 timestamp.","title":"Updated at","example":"2026-01-01T10:00:00.000Z"},"archivedAt":{"type":["string","null"],"description":"Archive time as an ISO 8601 timestamp, or null while the definition is active.","title":"Archived at","example":null},"stat":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Kebab-case identifier of a global Windmill stat or a workspace custom stat. Discover identifiers with POST /c/{companyId}/stats/metadata/search.","title":"Stat identifier","example":"code-prs-merged"},"valueType":{"type":"string","enum":["COUNT","AGGREGATE","AVERAGE"],"description":"How stat values aggregate over a period: COUNT sums event counts, AGGREGATE sums measured values and counts a denominator, AVERAGE is a denominator-weighted per-unit ratio.","title":"Value type","example":"COUNT"},"disabled":{"type":"boolean","description":"True when the definition is turned off. Search excludes disabled definitions unless includeDisabled is true.","title":"Disabled","example":false},"isGlobal":{"type":"boolean","description":"True for global Windmill-managed definitions shared by every workspace. False for definitions owned by this workspace.","title":"Global definition","example":true},"label":{"type":"string","description":"Display name of the stat.","title":"Label","example":"Pull requests merged"},"shortLabel":{"type":["string","null"],"description":"Compact display name for dense layouts, or null when unset.","title":"Short label","example":"PRs merged"},"description":{"type":["string","null"],"description":"Explanation of what the stat measures, or null when unset.","title":"Description","example":"Number of pull requests merged."},"displayAsPercent":{"type":"boolean","description":"Whether clients should display the value as a percentage; does not alter values.","title":"Display as percentage","example":false},"unitSingular":{"type":"string","description":"Singular display unit for the value.","title":"Unit","example":"pull request"},"unitPlural":{"type":["string","null"],"description":"Plural display unit for the value, or null when unset.","title":"Plural unit","example":"pull requests"},"denominatorUnitSingular":{"type":["string","null"],"description":"Singular display unit for the denominator, or null when unset.","title":"Denominator unit","example":null},"relatedStatTypes":{"type":"array","items":{"type":"string"},"description":"Identifiers of related stats that give context for this stat.","title":"Related stat identifiers","example":[]},"relatedData":{"type":"array","items":{"type":"string"},"description":"Related data categories linked to the stat, such as \"MEETING\" or \"AI\".","title":"Related data categories","example":[]},"icon":{"anyOf":[{"type":"object","properties":{"icon":{"type":"string","enum":["ACTIVITY","AI","ALERT","ALERT_TRIANGLE","ANALYTICS","ANONYMOUS","ANTENNA_BARS_1","ANTENNA_BARS_2","ANTENNA_BARS_3","ANTENNA_BARS_4","ANTENNA_BARS_5","ARROW_DOWN","ARROW_LEFT","ARROW_NARROW_UP_DASHED","ARROW_RIGHT","ARROW_TO_DOWN_LINE","ARROW_TO_UP_LINE","ARROW_UP","BELL_OFF","BELL_RING","BOT","BUILDING","CALENDAR","CALENDAR_PAUSE","CARD","CARET_UP_FILLED","CHANNEL","CHECK","CHECK_CIRCLE_FILLED","CHECKS","CHEVRON_DOWN","CHEVRON_DOWN_PIXEL","CHEVRON_RIGHT","CHOOSE_STATS","CLICK","CLOCK","CLOCK_FILLED","CODE","COG","COLUMNS","COMPANY","COMPARISON","COPY","COST","DATABASE","DEBUG","DEEP_DIVE","DELEGATED_ACCESS","DELIVERY","DEVICE_DESKTOP_ANALYTICS","DISCONNECT","DOCUMENT","DOCUMENT_TEMPLATE","DOT","EDIT","EMAIL","EMPLOYEE","EMPLOYEES","ERROR","EXTERNAL_LINK","EYE","FEATURE_INDETERMINATE","FEATURE_OFF","FEATURE_ON","FEATURES","FEEDBACK","FEEDBACK_GIVEN","FEEDBACK_RECEIVED","FILTER","FLAG","FLAME","FULL_SCREEN","GLOBE","GRID_DOTS","GROUPS","HAMBURGER","HAPPY","HEALTH","HELP_SQUARE_ROUNDED","HERO_NUMBER","HIGHLIGHTS","HOME","HOME_GRID","INBOX","IMPACT","INFO_CIRCLE","INTEGRATIONS","KEY","KNOWLEDGE","KEYBOARD_DOUBLE_ARROW_RIGHT","KEYBOARD_SINGLE_ARROW_RIGHT","LAYOUT_COLUMNS","LAYOUT_ROWS","LEADERBOARD","LIGHTNING_BOLT","LIST_SEARCH","LIGHT_BULB","LINK","LINKED_IN","LOADING","LOCK","LOGOUT","MAILBOX","MAPPING","MEETINGS","MEDAL","COMPANY_VALUES","MERGE","MEGAPHONE","MESSAGES","MICROPHONE","MOON","NEW_ACTIVITY","NEW_TAB","NOTES","NOTIFICATIONS","ONE_ON_ONE","ORG_CHART","ORGS","PAINT_BRUSH","PANEL_LEFT_CLOSE","PANEL_LEFT_OPEN","PANEL_RIGHT_CLOSE","PAUSE","PAUSE_FILLED","PAPER_CLIP","PENCIL_BOLT","PERFORMANCE","PLAY","PERSON","PERSON_CHECK","PERSON_MULTIPLE_CHECK","PIGGY_BANK","PIN","PIN_FILLED","PINNED_OFF","PLAY_CIRCLE","PLUS","PLUS_CIRCLE","PROGRESS_CHECK","PULSE","PUZZLED","RECAPS","RECEIPT_DOLLAR","RECORDING","RECORDING_NOT_FOUND","REFRESH","RELATIONSHIP_DIRECT_MANAGER","RELATIONSHIP_DIRECT_REPORT","RELATIONSHIP_PEER","RELATIONSHIP_SKIP_LEVEL_MANAGER","RELATIONSHIP_SKIP_LEVEL_REPORT","REPEAT","REPORT","REVIEWS","REVIEW_SELF","REVIEW_UPWARD","REVIEW_MANAGER","REVIEW_PEER","ROBOT_FACE","ROCKET","ROUTINES","SAD","SAVED_VIEW","SEARCH","SEND","SETTINGS","SHIELD","SHOUTOUT","SMILE_PLUS","SMS","SQUARE_ROUNDED_PLUS","SPINNER","SPINNER_LINE","STAR","STAR_FILLED","STATS","SUMMARY","SUN","SUPERPOWERS","SUPPORT","SURVEY","SWITCH","SYNC_INTEGRATION","TABLE","TAG","TEAM","TELESCOPE","TERMINAL","TEST","THREE_DOTS_VERTICAL","THUMBS_UP","TIME_SPENT","TRENDING_DOWN","TRENDING_UP","TRASH","TWITTER","USER","USER_CIRCLE","USER_PLUS","USERS_GROUP","WINDY","WINDY_CHAT","WINDY_CHAT_PLUS","WRENCH","X","X_CIRCLE_FILLED","YOUTUBE"]},"isBadge":{"type":"boolean"}},"required":["icon"]},{"type":"object","properties":{"imageUrl":{"type":["string","null"]},"fallbackIcon":{"type":"string","enum":["ACTIVITY","AI","ALERT","ALERT_TRIANGLE","ANALYTICS","ANONYMOUS","ANTENNA_BARS_1","ANTENNA_BARS_2","ANTENNA_BARS_3","ANTENNA_BARS_4","ANTENNA_BARS_5","ARROW_DOWN","ARROW_LEFT","ARROW_NARROW_UP_DASHED","ARROW_RIGHT","ARROW_TO_DOWN_LINE","ARROW_TO_UP_LINE","ARROW_UP","BELL_OFF","BELL_RING","BOT","BUILDING","CALENDAR","CALENDAR_PAUSE","CARD","CARET_UP_FILLED","CHANNEL","CHECK","CHECK_CIRCLE_FILLED","CHECKS","CHEVRON_DOWN","CHEVRON_DOWN_PIXEL","CHEVRON_RIGHT","CHOOSE_STATS","CLICK","CLOCK","CLOCK_FILLED","CODE","COG","COLUMNS","COMPANY","COMPARISON","COPY","COST","DATABASE","DEBUG","DEEP_DIVE","DELEGATED_ACCESS","DELIVERY","DEVICE_DESKTOP_ANALYTICS","DISCONNECT","DOCUMENT","DOCUMENT_TEMPLATE","DOT","EDIT","EMAIL","EMPLOYEE","EMPLOYEES","ERROR","EXTERNAL_LINK","EYE","FEATURE_INDETERMINATE","FEATURE_OFF","FEATURE_ON","FEATURES","FEEDBACK","FEEDBACK_GIVEN","FEEDBACK_RECEIVED","FILTER","FLAG","FLAME","FULL_SCREEN","GLOBE","GRID_DOTS","GROUPS","HAMBURGER","HAPPY","HEALTH","HELP_SQUARE_ROUNDED","HERO_NUMBER","HIGHLIGHTS","HOME","HOME_GRID","INBOX","IMPACT","INFO_CIRCLE","INTEGRATIONS","KEY","KNOWLEDGE","KEYBOARD_DOUBLE_ARROW_RIGHT","KEYBOARD_SINGLE_ARROW_RIGHT","LAYOUT_COLUMNS","LAYOUT_ROWS","LEADERBOARD","LIGHTNING_BOLT","LIST_SEARCH","LIGHT_BULB","LINK","LINKED_IN","LOADING","LOCK","LOGOUT","MAILBOX","MAPPING","MEETINGS","MEDAL","COMPANY_VALUES","MERGE","MEGAPHONE","MESSAGES","MICROPHONE","MOON","NEW_ACTIVITY","NEW_TAB","NOTES","NOTIFICATIONS","ONE_ON_ONE","ORG_CHART","ORGS","PAINT_BRUSH","PANEL_LEFT_CLOSE","PANEL_LEFT_OPEN","PANEL_RIGHT_CLOSE","PAUSE","PAUSE_FILLED","PAPER_CLIP","PENCIL_BOLT","PERFORMANCE","PLAY","PERSON","PERSON_CHECK","PERSON_MULTIPLE_CHECK","PIGGY_BANK","PIN","PIN_FILLED","PINNED_OFF","PLAY_CIRCLE","PLUS","PLUS_CIRCLE","PROGRESS_CHECK","PULSE","PUZZLED","RECAPS","RECEIPT_DOLLAR","RECORDING","RECORDING_NOT_FOUND","REFRESH","RELATIONSHIP_DIRECT_MANAGER","RELATIONSHIP_DIRECT_REPORT","RELATIONSHIP_PEER","RELATIONSHIP_SKIP_LEVEL_MANAGER","RELATIONSHIP_SKIP_LEVEL_REPORT","REPEAT","REPORT","REVIEWS","REVIEW_SELF","REVIEW_UPWARD","REVIEW_MANAGER","REVIEW_PEER","ROBOT_FACE","ROCKET","ROUTINES","SAD","SAVED_VIEW","SEARCH","SEND","SETTINGS","SHIELD","SHOUTOUT","SMILE_PLUS","SMS","SQUARE_ROUNDED_PLUS","SPINNER","SPINNER_LINE","STAR","STAR_FILLED","STATS","SUMMARY","SUN","SUPERPOWERS","SUPPORT","SURVEY","SWITCH","SYNC_INTEGRATION","TABLE","TAG","TEAM","TELESCOPE","TERMINAL","TEST","THREE_DOTS_VERTICAL","THUMBS_UP","TIME_SPENT","TRENDING_DOWN","TRENDING_UP","TRASH","TWITTER","USER","USER_CIRCLE","USER_PLUS","USERS_GROUP","WINDY","WINDY_CHAT","WINDY_CHAT_PLUS","WRENCH","X","X_CIRCLE_FILLED","YOUTUBE"]},"cropToCircle":{"type":"boolean"}},"required":["imageUrl"]},{"type":"object","properties":{"emoji":{"type":"string"},"color":{"type":"string"}},"required":["emoji","color"]},{"type":"object","properties":{"color":{"type":"string"}},"required":["color"]},{"type":"object","properties":{"integrationId":{"type":"string"}},"required":["integrationId"]},{"type":"object","properties":{"employee":{"type":"object","properties":{"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"primaryEmail":{"type":["string","null"]},"emails":{"type":["array","null"],"items":{"type":"string"}}},"required":["name","avatarUrl","primaryEmail"]}},"required":["employee"]},{"type":"null"}],"description":"Display icon, or null when unset.","title":"Icon"},"requiresMatchingIntegration":{"$ref":"#/components/schemas/StatRequiresMatchingIntegration"}},"required":["id","createdAt","updatedAt","archivedAt","stat","valueType","disabled","isGlobal","label","shortLabel","description","displayAsPercent","unitSingular","unitPlural","denominatorUnitSingular","relatedStatTypes","relatedData","icon","requiresMatchingIntegration"],"description":"A stat definition available to the workspace.","title":"Stat definition"},"StatRequiresMatchingIntegration":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["AI_AGENT","CALENDAR","CHAT","CODE_REPOSITORY","CRM","CUSTOMER_SUPPORT","DESIGN","DOCUMENT_MANAGEMENT","EMAIL","HRIS","MEETING","PROJECT_MANAGEMENT","RECORDING","VIRTUAL_OFFICE"],"description":"Integration type the workspace must have connected for the stat to apply.","title":"Integration type"},"integrationIds":{"type":"array","items":{"type":"string"},"description":"Specific integration IDs; the workspace must have one of them connected.","title":"Integration IDs","example":["integration-code"]}},"description":"Integration requirement for the stat, or null when the stat has no requirement.","title":"Integration requirement"},"SearchStatMetadataRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Match any of these stat definition UUIDs. Omitted or empty adds no restriction.","title":"Stat definition IDs","example":["11111111-1111-4111-8111-111111111111"]},"statTypes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Kebab-case identifier of a global Windmill stat or a workspace custom stat. Discover identifiers with POST /c/{companyId}/stats/metadata/search.","title":"Stat identifier","example":"code-prs-merged"},"maxItems":100,"description":"Match any of these stat identifiers. Omitted or empty adds no restriction.","title":"Stat identifiers","example":["code-prs-merged"]},"valueTypes":{"type":"array","items":{"type":"string","enum":["COUNT","AGGREGATE","AVERAGE"],"description":"How stat values aggregate over a period: COUNT sums event counts, AGGREGATE sums measured values and counts a denominator, AVERAGE is a denominator-weighted per-unit ratio.","title":"Value type","example":"COUNT"},"maxItems":3,"description":"Match any selected aggregation type. Omitted or empty matches all value types.","title":"Value types","example":["COUNT"]},"search":{"type":"string","maxLength":200,"description":"Case-insensitive literal text matched within the identifier, label, or description. Regular expressions and wildcard patterns are not interpreted.","title":"Search text","example":"pull request"},"isGlobal":{"type":"boolean","description":"True selects global Windmill-managed definitions; false selects this workspace's custom definitions. Omit to include both.","title":"Global definitions","example":true},"includeDisabled":{"type":"boolean","default":false,"description":"Include disabled definitions alongside enabled ones. Archived definitions never match.","title":"Include disabled definitions","example":false},"employee":{"allOf":[{"$ref":"#/components/schemas/EmployeeFilter"},{"description":"Return only definitions with at least one recorded stat value for a matching employee whose analytics the caller can read. Any recorded date qualifies, including values of zero. Omit to list definitions even without recorded data; an empty object applies the default employee filter. This filter never expands employee access.","title":"Employees with stat data","example":{"query":"Avery"}}]},"sort":{"type":"object","properties":{"property":{"type":"string","enum":["label","stat"],"description":"Sort by display label or stat identifier. Definition ID breaks ties.","title":"Sort field","example":"label"},"direction":{"type":"string","enum":["asc","desc"]}},"default":{"property":"label","direction":"asc"},"required":["property","direction"],"description":"Sort order. Defaults to label ascending, with an ascending ID tie-breaker.","title":"Sort order","example":{"property":"label","direction":"asc"}},"page":{"type":"integer","minimum":1,"default":1,"description":"1-indexed page number","title":"Page number","example":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size","title":"Page size","example":20},"include":{"type":"object","properties":{"total":{"type":"boolean","description":"Set true to count all matching items and include pagination.total. False or omission skips the count.","title":"Include total count","example":true}},"title":"Additional response details","example":{"total":true}}},"additionalProperties":false,"title":"Stat definition search request","description":"All supplied filters must match. Within a list, matching any value is enough.","example":{"employee":{"query":"Avery"},"valueTypes":["COUNT"],"includeDisabled":false,"page":1,"pageSize":20,"include":{"total":true}}},"CountResponse":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total matching items, independent of pagination. The route determines the item type.","title":"Total matches","example":1}},"required":["total"]},"CountStatMetadataRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Match any of these stat definition UUIDs. Omitted or empty adds no restriction.","title":"Stat definition IDs","example":["11111111-1111-4111-8111-111111111111"]},"statTypes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Kebab-case identifier of a global Windmill stat or a workspace custom stat. Discover identifiers with POST /c/{companyId}/stats/metadata/search.","title":"Stat identifier","example":"code-prs-merged"},"maxItems":100,"description":"Match any of these stat identifiers. Omitted or empty adds no restriction.","title":"Stat identifiers","example":["code-prs-merged"]},"valueTypes":{"type":"array","items":{"type":"string","enum":["COUNT","AGGREGATE","AVERAGE"],"description":"How stat values aggregate over a period: COUNT sums event counts, AGGREGATE sums measured values and counts a denominator, AVERAGE is a denominator-weighted per-unit ratio.","title":"Value type","example":"COUNT"},"maxItems":3,"description":"Match any selected aggregation type. Omitted or empty matches all value types.","title":"Value types","example":["COUNT"]},"search":{"type":"string","maxLength":200,"description":"Case-insensitive literal text matched within the identifier, label, or description. Regular expressions and wildcard patterns are not interpreted.","title":"Search text","example":"pull request"},"isGlobal":{"type":"boolean","description":"True selects global Windmill-managed definitions; false selects this workspace's custom definitions. Omit to include both.","title":"Global definitions","example":true},"includeDisabled":{"type":"boolean","default":false,"description":"Include disabled definitions alongside enabled ones. Archived definitions never match.","title":"Include disabled definitions","example":false},"employee":{"allOf":[{"$ref":"#/components/schemas/EmployeeFilter"},{"description":"Return only definitions with at least one recorded stat value for a matching employee whose analytics the caller can read. Any recorded date qualifies, including values of zero. Omit to list definitions even without recorded data; an empty object applies the default employee filter. This filter never expands employee access.","title":"Employees with stat data","example":{"query":"Avery"}}]}},"additionalProperties":false,"title":"Stat definition count request","example":{"valueTypes":["COUNT"],"includeDisabled":false}},"UpsertStatMetadataResponse":{"type":"object","properties":{"statMetadata":{"allOf":[{"$ref":"#/components/schemas/StatMetadata"},{"description":"The created or updated stat definition."}]}},"required":["statMetadata"],"title":"Custom stat definition response"},"UpsertStatMetadataRequest":{"type":"object","properties":{"stat":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Identifier of the workspace custom stat to create or update. The write is scoped to the caller's workspace; global Windmill definitions are never modified.","title":"Stat identifier","example":"custom-items-completed"},"valueType":{"type":"string","enum":["COUNT","AGGREGATE","AVERAGE"],"description":"Aggregation type. It can change only before values have been recorded for this definition. Changing it afterward returns 409; create a new definition for the new type.","title":"Value type","example":"COUNT"},"label":{"type":"string","minLength":1,"maxLength":200,"description":"Display name of the stat, from 1 to 200 characters.","title":"Label","example":"Items completed"},"unitSingular":{"type":"string","minLength":1,"maxLength":100,"description":"Singular display unit for the value, from 1 to 100 characters.","title":"Unit","example":"item"},"shortLabel":{"type":"string","maxLength":100,"description":"Compact display name, up to 100 characters. Resets to null when omitted.","title":"Short label","example":"Completed"},"description":{"type":"string","maxLength":1000,"description":"What the stat measures, up to 1,000 characters. Resets to null when omitted.","title":"Description","example":"Number of completed work items."},"unitPlural":{"type":"string","maxLength":100,"description":"Plural display unit, up to 100 characters. Resets to null when omitted.","title":"Plural unit","example":"items"},"denominatorUnitSingular":{"type":"string","maxLength":100,"description":"Denominator display unit, up to 100 characters. Resets to null when omitted.","title":"Denominator unit","example":"item"},"displayAsPercent":{"type":"boolean","description":"Whether clients should display a percentage. Resets to false when omitted.","title":"Display as percentage","example":false},"icon":{"type":"object","properties":{"icon":{"type":"string","enum":["ACTIVITY","AI","ALERT","ALERT_TRIANGLE","ANALYTICS","ANONYMOUS","ANTENNA_BARS_1","ANTENNA_BARS_2","ANTENNA_BARS_3","ANTENNA_BARS_4","ANTENNA_BARS_5","ARROW_DOWN","ARROW_LEFT","ARROW_NARROW_UP_DASHED","ARROW_RIGHT","ARROW_TO_DOWN_LINE","ARROW_TO_UP_LINE","ARROW_UP","BELL_OFF","BELL_RING","BOT","BUILDING","CALENDAR","CALENDAR_PAUSE","CARD","CARET_UP_FILLED","CHANNEL","CHECK","CHECK_CIRCLE_FILLED","CHECKS","CHEVRON_DOWN","CHEVRON_DOWN_PIXEL","CHEVRON_RIGHT","CHOOSE_STATS","CLICK","CLOCK","CLOCK_FILLED","CODE","COG","COLUMNS","COMPANY","COMPARISON","COPY","COST","DATABASE","DEBUG","DEEP_DIVE","DELEGATED_ACCESS","DELIVERY","DEVICE_DESKTOP_ANALYTICS","DISCONNECT","DOCUMENT","DOCUMENT_TEMPLATE","DOT","EDIT","EMAIL","EMPLOYEE","EMPLOYEES","ERROR","EXTERNAL_LINK","EYE","FEATURE_INDETERMINATE","FEATURE_OFF","FEATURE_ON","FEATURES","FEEDBACK","FEEDBACK_GIVEN","FEEDBACK_RECEIVED","FILTER","FLAG","FLAME","FULL_SCREEN","GLOBE","GRID_DOTS","GROUPS","HAMBURGER","HAPPY","HEALTH","HELP_SQUARE_ROUNDED","HERO_NUMBER","HIGHLIGHTS","HOME","HOME_GRID","INBOX","IMPACT","INFO_CIRCLE","INTEGRATIONS","KEY","KNOWLEDGE","KEYBOARD_DOUBLE_ARROW_RIGHT","KEYBOARD_SINGLE_ARROW_RIGHT","LAYOUT_COLUMNS","LAYOUT_ROWS","LEADERBOARD","LIGHTNING_BOLT","LIST_SEARCH","LIGHT_BULB","LINK","LINKED_IN","LOADING","LOCK","LOGOUT","MAILBOX","MAPPING","MEETINGS","MEDAL","COMPANY_VALUES","MERGE","MEGAPHONE","MESSAGES","MICROPHONE","MOON","NEW_ACTIVITY","NEW_TAB","NOTES","NOTIFICATIONS","ONE_ON_ONE","ORG_CHART","ORGS","PAINT_BRUSH","PANEL_LEFT_CLOSE","PANEL_LEFT_OPEN","PANEL_RIGHT_CLOSE","PAUSE","PAUSE_FILLED","PAPER_CLIP","PENCIL_BOLT","PERFORMANCE","PLAY","PERSON","PERSON_CHECK","PERSON_MULTIPLE_CHECK","PIGGY_BANK","PIN","PIN_FILLED","PINNED_OFF","PLAY_CIRCLE","PLUS","PLUS_CIRCLE","PROGRESS_CHECK","PULSE","PUZZLED","RECAPS","RECEIPT_DOLLAR","RECORDING","RECORDING_NOT_FOUND","REFRESH","RELATIONSHIP_DIRECT_MANAGER","RELATIONSHIP_DIRECT_REPORT","RELATIONSHIP_PEER","RELATIONSHIP_SKIP_LEVEL_MANAGER","RELATIONSHIP_SKIP_LEVEL_REPORT","REPEAT","REPORT","REVIEWS","REVIEW_SELF","REVIEW_UPWARD","REVIEW_MANAGER","REVIEW_PEER","ROBOT_FACE","ROCKET","ROUTINES","SAD","SAVED_VIEW","SEARCH","SEND","SETTINGS","SHIELD","SHOUTOUT","SMILE_PLUS","SMS","SQUARE_ROUNDED_PLUS","SPINNER","SPINNER_LINE","STAR","STAR_FILLED","STATS","SUMMARY","SUN","SUPERPOWERS","SUPPORT","SURVEY","SWITCH","SYNC_INTEGRATION","TABLE","TAG","TEAM","TELESCOPE","TERMINAL","TEST","THREE_DOTS_VERTICAL","THUMBS_UP","TIME_SPENT","TRENDING_DOWN","TRENDING_UP","TRASH","TWITTER","USER","USER_CIRCLE","USER_PLUS","USERS_GROUP","WINDY","WINDY_CHAT","WINDY_CHAT_PLUS","WRENCH","X","X_CIRCLE_FILLED","YOUTUBE"],"description":"Standard icon name.","title":"Icon"},"isBadge":{"type":"boolean","description":"Whether clients should render the icon as a badge.","title":"Badge","example":false}},"required":["icon"],"description":"Display icon for the stat. Resets to null when omitted.","title":"Icon"}},"required":["stat","valueType","label","unitSingular"],"title":"Custom stat definition request","description":"Complete display configuration for a workspace custom stat.","example":{"stat":"custom-items-completed","valueType":"COUNT","label":"Items completed","unitSingular":"item","unitPlural":"items"}},"UpsertCustomStatValuesResponse":{"type":"object","properties":{"updated":{"type":"integer","minimum":0,"description":"Number of submitted values successfully created or replaced.","title":"Values written","example":1}},"required":["updated"],"title":"Custom stat values response"},"UpsertCustomStatValuesRequest":{"type":"object","properties":{"statMetadataId":{"type":"string","format":"uuid","description":"ID of an enabled, non-archived custom definition owned by this workspace. Windmill-managed definitions and their identifiers cannot be written through this route.","title":"Custom stat definition ID","example":"11111111-1111-4111-8111-111111111111"},"values":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"maxLength":128,"description":"ID of an active employee in this workspace.","title":"Employee ID","example":"employee-avery"},"date":{"type":"string","format":"date","description":"Calendar date for this value, YYYY-MM-DD, with a year from 0001 to 9999.","title":"Date","example":"2026-01-05"},"value":{"type":"number","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Daily value for COUNT or AGGREGATE. For AVERAGE, send the numerator sum, not the already-divided average; readers divide by the denominator. Must be finite with absolute value at most 9007199254740991.","title":"Value","example":5},"denominator":{"type":["integer","null"],"minimum":0,"maximum":2147483647,"description":"Observation count, required for AGGREGATE and AVERAGE; omit or use null for COUNT. A zero denominator requires a zero value. Maximum 2147483647.","title":"Denominator","example":null},"dimension":{"type":"string","minLength":1,"maxLength":200,"description":"Optional source key, 1 to 200 characters. Different keys store separate contributions for the same employee and date; reads combine them. Omit for an unkeyed daily value.","title":"Dimension","example":"project-aurora"}},"required":["employeeId","date","value"],"additionalProperties":false},"minItems":1,"maxItems":1000,"description":"1 to 1000 values for this definition. Each employee/date/dimension key must be unique within the request. All values are validated and written together.","title":"Employee stat values"}},"required":["statMetadataId","values"],"additionalProperties":false,"title":"Custom stat values request","example":{"statMetadataId":"11111111-1111-4111-8111-111111111111","values":[{"employeeId":"employee-avery","date":"2026-01-05","value":5}]}},"SearchStatsResponse":{"type":"object","properties":{"employeeStats":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeStat"}},"description":"Stat series keyed by employee ID. Workspace-wide analytics access allows stats for all matching employees. Other callers can read their own stats, those of their direct and indirect reports, and employees covered by delegated reporting access. Employees with no stat data in the range are omitted.","title":"Series by employee ID"}},"required":["employeeStats"],"title":"Employee stat series response","example":{"employeeStats":{"employee-avery":[{"employeeId":"employee-avery","stat":"code-prs-merged","statMetadataId":"11111111-1111-4111-8111-111111111111","type":"COUNT","data":[{"date":"2026-01-05","type":"COUNT","value":2,"denominator":null},{"date":"2026-01-12","type":"COUNT","value":3,"denominator":null}],"last":3,"value":5,"denominator":null}]}}},"EmployeeStat":{"type":"object","properties":{"employeeId":{"type":"string","description":"Employee the stat series belongs to.","title":"Employee ID","example":"employee-avery"},"stat":{"type":"string","description":"Stat identifier, global or workspace-specific.","title":"Stat identifier","example":"code-prs-merged"},"statMetadataId":{"type":"string","description":"Stat definition ID from POST /c/{companyId}/stats/metadata/search.","title":"Stat definition ID","example":"11111111-1111-4111-8111-111111111111"},"type":{"type":"string","enum":["COUNT","AGGREGATE","AVERAGE"],"description":"How stat values aggregate over a period: COUNT sums event counts, AGGREGATE sums measured values and counts a denominator, AVERAGE is a denominator-weighted per-unit ratio.","title":"Value type","example":"COUNT"},"data":{"type":"array","items":{"$ref":"#/components/schemas/StatData"},"description":"Stored period buckets in ascending date order; missing periods are not filled with zeros. Omitted when include.data is false.","title":"Period buckets"},"last":{"type":"number","description":"Value of the most recent returned bucket, even if later periods have no data.","title":"Latest bucket value","example":3},"value":{"type":"number","description":"Value across the full range: the sum of buckets for COUNT and AGGREGATE stats, or the denominator-weighted average for AVERAGE stats.","title":"Range value","example":5},"denominator":{"type":["number","null"],"description":"Total denominator across the range, or null for COUNT stats.","title":"Range denominator","example":null}},"required":["employeeId","stat","statMetadataId","type","last","value","denominator"],"description":"One employee's series for one stat over the requested range.","title":"Employee stat series"},"StatData":{"oneOf":[{"type":"object","properties":{"date":{"type":"string","description":"Bucket start as YYYY-MM-DD. Calendar buckets can start before the requested range; only stored values inside the requested range contribute.","title":"Period start date","example":"2026-01-05"},"value":{"type":"number","description":"Period sum for COUNT and AGGREGATE stats, or denominator-weighted average for AVERAGE stats. An AVERAGE bucket with a zero denominator returns 0.","title":"Period value","example":3},"type":{"type":"string","enum":["COUNT"],"description":"COUNT sums values in the bucket.","title":"Value type"},"denominator":{"type":"null","description":"Always null for COUNT stats.","title":"Denominator","example":null}},"required":["date","value","type","denominator"]},{"type":"object","properties":{"date":{"type":"string","description":"Bucket start as YYYY-MM-DD. Calendar buckets can start before the requested range; only stored values inside the requested range contribute.","title":"Period start date","example":"2026-01-05"},"value":{"type":"number","description":"Period sum for COUNT and AGGREGATE stats, or denominator-weighted average for AVERAGE stats. An AVERAGE bucket with a zero denominator returns 0.","title":"Period value","example":3},"type":{"type":"string","enum":["AGGREGATE"],"description":"AGGREGATE sums measured values and their denominators separately.","title":"Value type"},"denominator":{"type":"number","description":"Summed denominator for the period, such as the number of meetings.","title":"Denominator","example":2}},"required":["date","value","type","denominator"]},{"type":"object","properties":{"date":{"type":"string","description":"Bucket start as YYYY-MM-DD. Calendar buckets can start before the requested range; only stored values inside the requested range contribute.","title":"Period start date","example":"2026-01-05"},"value":{"type":"number","description":"Period sum for COUNT and AGGREGATE stats, or denominator-weighted average for AVERAGE stats. An AVERAGE bucket with a zero denominator returns 0.","title":"Period value","example":3},"type":{"type":"string","enum":["AVERAGE"],"description":"AVERAGE divides the summed numerator by the summed denominator.","title":"Value type"},"denominator":{"type":"number","description":"Weight used for the period average, such as the number of pull requests.","title":"Denominator","example":2}},"required":["date","value","type","denominator"]}],"description":"One aggregated period bucket of a stat series.","title":"Stat period bucket"},"SearchStatsRequest":{"type":"object","properties":{"dateRange":{"anyOf":[{"type":"object","properties":{"range":{"type":"string"}},"required":["range"]},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}]},"timezone":{"type":"string","description":"IANA timezone used to resolve the date range (e.g. \"America/New_York\"). Defaults to UTC.","title":"Timezone","example":"America/New_York"},"statMetadataIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Stat definition UUIDs to load. An omitted or empty array adds no ID restriction. When statTypes is also supplied, definitions must match both selections. Unknown IDs match no data.","title":"Stat definition IDs","example":["11111111-1111-4111-8111-111111111111"]},"statTypes":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Stat identifiers to load, global or workspace custom. Omit to add no identifier restriction. When statMetadataIds is also supplied, definitions must match both selections. Unknown identifiers match no data.","title":"Stat identifiers","example":["code-prs-merged"]},"employee":{"type":"object","properties":{"hasDirectReports":{"type":["boolean","null"]},"hasManager":{"type":["boolean","null"]},"employeeGroupId":{"type":["string","null"]},"employeeGroupIds":{"type":["array","null"],"items":{"type":"string"}},"employeeGroupIdSets":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"},"minItems":1}},"jobTitle":{"type":["string","null"]},"jobTitles":{"type":["array","null"],"items":{"type":"string"}},"countries":{"type":["array","null"],"items":{"type":"string"}},"emails":{"type":["array","null"],"items":{"type":"string"}},"emailDomains":{"type":["array","null"],"items":{"type":"string"}},"employeeId":{"type":["string","null"]},"employeeIds":{"type":["array","null"],"items":{"type":"string"}},"excludedEmployeeId":{"type":["string","null"]},"excludedEmployeeIds":{"type":["array","null"],"items":{"type":"string"}},"managerId":{"type":["string","null"]},"managerIds":{"type":["array","null"],"items":{"type":"string"}},"ancestorManagerId":{"type":["string","null"]},"ancestorManagerIds":{"type":["array","null"],"items":{"type":"string"}},"indirectManagerId":{"type":["string","null"]},"indirectManagerIds":{"type":["array","null"],"items":{"type":"string"}},"isMember":{"type":["boolean","null"]},"memberRole":{"type":["string","null"],"enum":["admin","hr-admin","integration-manager","data-analyst","team-member",null]},"query":{"type":["string","null"]},"includeArchived":{"type":["boolean","null"]},"onlyArchived":{"type":["boolean","null"]},"includeExternalOrgs":{"type":["boolean","null"]},"platformAccess":{"type":["string","null"],"enum":["HAS_ACCESS","INVITE_PENDING","NO_ACCESS",null]},"startDate":{"anyOf":[{"type":"object","properties":{"range":{"type":"string"}},"required":["range"]},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},{"type":"null"}]},"isAccountAdmin":{"type":["boolean","null"]},"hasIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"lacksIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"and":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}}},"description":"Limits which employees are loaded within the set the caller can access. This filter never grants access to more employees.","title":"Employee filter","example":{"query":"Avery"}},"periodLength":{"type":["string","null"],"enum":["day","week","month","year",null],"description":"Aggregation period for the data points. Null aggregates the entire date range into one bucket; omit to derive a period from the date range.","title":"Period length","example":"week"},"include":{"type":"object","properties":{"data":{"type":"boolean","default":true,"description":"True to return the period buckets of each series. False returns only the range totals, which makes the response much smaller. Defaults to true.","title":"Include period buckets","example":true}},"description":"Optional parts of the JSON response. Does not affect CSV exports.","title":"Additional response details","example":{"data":false}}},"required":["dateRange"],"title":"Employee stat series request","description":"Date range, stat selection, and employee filter for series or CSV output.","example":{"dateRange":{"from":"2026-01-01","to":"2026-01-31"},"timezone":"UTC","statTypes":["code-prs-merged"],"periodLength":"week","include":{"data":true}}},"SearchEmployeeStatTotalsResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeStatTotalsRow"},"description":"One row per employee, including employees with no data in the range. Only employees whose analytics the caller can read are included.","title":"Employee results"},"pagination":{"$ref":"#/components/schemas/SearchPaginationResponse"},"aggregates":{"type":"array","items":{"$ref":"#/components/schemas/StatTotalsAggregate"},"description":"Present when include.aggregates is true. In the order of statTypes.","title":"Aggregate totals"},"rank":{"type":["object","null"],"properties":{"position":{"type":"integer","description":"1-based position in the sorted results across all pages.","title":"Position","example":1}},"required":["position"],"description":"Present when include.rankOf is set. Null when that employee does not match the filter or the caller cannot access them.","title":"Employee rank","example":{"position":1}}},"required":["results","pagination"],"additionalProperties":false,"title":"Employee stat totals search response"},"EmployeeStatTotalsRow":{"type":"object","properties":{"employee":{"allOf":[{"$ref":"#/components/schemas/EmployeeMinView"},{"title":"Employee","description":"Basic employee profile."}]},"stats":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeStatTotal"},"description":"Totals in the order of statTypes.","title":"Stat totals"}},"required":["employee","stats"],"title":"Employee stat totals row"},"EmployeeStatTotal":{"type":"object","properties":{"stat":{"type":"string","description":"Stat identifier.","title":"Stat identifier","example":"code-prs-merged"},"value":{"type":"number","description":"Value across the range: the sum for COUNT and AGGREGATE stats, or the denominator-weighted average for AVERAGE stats. 0 when the employee has no data.","title":"Range value","example":5},"denominator":{"type":["number","null"],"description":"Total denominator across the range, or null for COUNT stats and missing data.","title":"Range denominator","example":null}},"required":["stat","value","denominator"],"description":"One employee's total for one stat over the requested range.","title":"Employee stat total"},"StatTotalsAggregate":{"type":"object","properties":{"stat":{"type":"string","description":"Stat identifier.","title":"Stat identifier","example":"code-prs-merged"},"sum":{"type":["number","null"],"description":"Sum across matching employees. Null for AVERAGE stats.","title":"Sum","example":10},"average":{"type":["number","null"],"description":"Average per matching employee, or the denominator-weighted average for AVERAGE stats. Null when no employee contributes to it.","title":"Average","example":5}},"required":["stat","sum","average"],"description":"One stat across every employee that matches the filter, on all pages.","title":"Stat totals across employees"},"SearchEmployeeStatTotalsRequest":{"type":"object","properties":{"dateRange":{"anyOf":[{"type":"object","properties":{"range":{"type":"string"}},"required":["range"]},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}]},"timezone":{"type":"string","description":"IANA timezone used to resolve the date range (e.g. \"America/New_York\"). Defaults to UTC.","title":"Timezone","example":"America/New_York"},"statTypes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Kebab-case identifier of a global Windmill stat or a workspace custom stat. Discover identifiers with POST /c/{companyId}/stats/metadata/search.","title":"Stat identifier","example":"code-prs-merged"},"minItems":1,"maxItems":50,"description":"Stat identifiers to total, global or workspace custom. Each row returns its stats in this order. Unknown identifiers total 0.","title":"Stat identifiers","example":["code-prs-merged"]},"employee":{"type":"object","properties":{"hasDirectReports":{"type":["boolean","null"]},"hasManager":{"type":["boolean","null"]},"employeeGroupId":{"type":["string","null"]},"employeeGroupIds":{"type":["array","null"],"items":{"type":"string"}},"employeeGroupIdSets":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"},"minItems":1}},"jobTitle":{"type":["string","null"]},"jobTitles":{"type":["array","null"],"items":{"type":"string"}},"countries":{"type":["array","null"],"items":{"type":"string"}},"emails":{"type":["array","null"],"items":{"type":"string"}},"emailDomains":{"type":["array","null"],"items":{"type":"string"}},"employeeId":{"type":["string","null"]},"employeeIds":{"type":["array","null"],"items":{"type":"string"}},"excludedEmployeeId":{"type":["string","null"]},"excludedEmployeeIds":{"type":["array","null"],"items":{"type":"string"}},"managerId":{"type":["string","null"]},"managerIds":{"type":["array","null"],"items":{"type":"string"}},"ancestorManagerId":{"type":["string","null"]},"ancestorManagerIds":{"type":["array","null"],"items":{"type":"string"}},"indirectManagerId":{"type":["string","null"]},"indirectManagerIds":{"type":["array","null"],"items":{"type":"string"}},"isMember":{"type":["boolean","null"]},"memberRole":{"type":["string","null"],"enum":["admin","hr-admin","integration-manager","data-analyst","team-member",null]},"query":{"type":["string","null"]},"includeArchived":{"type":["boolean","null"]},"onlyArchived":{"type":["boolean","null"]},"includeExternalOrgs":{"type":["boolean","null"]},"platformAccess":{"type":["string","null"],"enum":["HAS_ACCESS","INVITE_PENDING","NO_ACCESS",null]},"startDate":{"anyOf":[{"type":"object","properties":{"range":{"type":"string"}},"required":["range"]},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},{"type":"null"}]},"isAccountAdmin":{"type":["boolean","null"]},"hasIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"lacksIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"and":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}}},"description":"Limits which employees are returned within the set the caller can access. This filter never grants access to more employees.","title":"Employee filter","example":{"query":"Avery"}},"search":{"type":"string","maxLength":200,"description":"Text that matches the employee name, preferred name, or email username.","title":"Employee search text","example":"Avery"},"where":{"type":"array","items":{"type":"object","properties":{"stat":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Stat to compare. It must be one of statTypes.","title":"Stat identifier","example":"code-prs-merged"},"operator":{"type":"string","enum":["lt","lte","eq","gt","gte"],"description":"Numeric comparison to apply to the range value.","title":"Comparison operator","example":"gte"},"value":{"type":"number","description":"Value to compare the stat total with.","title":"Comparison value","example":1}},"required":["stat","operator","value"]},"maxItems":10,"description":"Conditions on stat totals. An employee matches only when every condition is true. Each condition compares the value that a row returns: the weighted average for AVERAGE stats, and 0 for an employee with no data.","title":"Stat total conditions","example":[{"stat":"code-prs-merged","operator":"gte","value":1}]},"sort":{"type":"object","properties":{"stat":{"type":["string","null"],"minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Stat to sort by. It must be one of statTypes. Null sorts by employee name.","title":"Sort stat identifier","example":"code-prs-merged"},"direction":{"type":"string","enum":["asc","desc"],"description":"Ascending or descending order.","title":"Sort direction","example":"desc"}},"default":{"stat":null,"direction":"asc"},"required":["stat","direction"],"description":"Sort order. Employees with equal values stay in name order. Defaults to name ascending.","title":"Sort order","example":{"stat":"code-prs-merged","direction":"desc"}},"page":{"type":"integer","minimum":1,"default":1,"description":"1-indexed page number","title":"Page number","example":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size","title":"Page size","example":20},"include":{"type":"object","properties":{"total":{"type":"boolean","description":"Set true to count all matching items and include pagination.total. False or omission skips the count.","title":"Include total count","example":true},"aggregates":{"type":"boolean","description":"Include aggregate values across every matching employee, before pagination. For AVERAGE stats, sum is null and average uses denominator weights.","title":"Include aggregates","example":true},"rankOf":{"type":"string","description":"Employee ID to rank. The response rank gives the position of that employee in the same filter and sort.","title":"Employee ID to rank","example":"employee-avery"}},"description":"Additional results to calculate alongside the page. Omit to skip this work.","title":"Additional response details","example":{"total":true,"aggregates":true}}},"required":["dateRange","statTypes"],"additionalProperties":false,"title":"Employee stat totals search request","example":{"dateRange":{"from":"2026-01-01","to":"2026-01-31"},"statTypes":["code-prs-merged"],"sort":{"stat":"code-prs-merged","direction":"desc"},"page":1,"pageSize":20,"include":{"total":true,"aggregates":true,"rankOf":"employee-avery"}}},"CountEmployeeStatTotalsRequest":{"type":"object","properties":{"dateRange":{"anyOf":[{"type":"object","properties":{"range":{"type":"string"}},"required":["range"]},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}]},"timezone":{"type":"string","description":"IANA timezone used to resolve the date range (e.g. \"America/New_York\"). Defaults to UTC.","title":"Timezone","example":"America/New_York"},"statTypes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Kebab-case identifier of a global Windmill stat or a workspace custom stat. Discover identifiers with POST /c/{companyId}/stats/metadata/search.","title":"Stat identifier","example":"code-prs-merged"},"minItems":1,"maxItems":50,"description":"Stat identifiers to total, global or workspace custom. Each row returns its stats in this order. Unknown identifiers total 0.","title":"Stat identifiers","example":["code-prs-merged"]},"employee":{"type":"object","properties":{"hasDirectReports":{"type":["boolean","null"]},"hasManager":{"type":["boolean","null"]},"employeeGroupId":{"type":["string","null"]},"employeeGroupIds":{"type":["array","null"],"items":{"type":"string"}},"employeeGroupIdSets":{"type":["array","null"],"items":{"type":"array","items":{"type":"string"},"minItems":1}},"jobTitle":{"type":["string","null"]},"jobTitles":{"type":["array","null"],"items":{"type":"string"}},"countries":{"type":["array","null"],"items":{"type":"string"}},"emails":{"type":["array","null"],"items":{"type":"string"}},"emailDomains":{"type":["array","null"],"items":{"type":"string"}},"employeeId":{"type":["string","null"]},"employeeIds":{"type":["array","null"],"items":{"type":"string"}},"excludedEmployeeId":{"type":["string","null"]},"excludedEmployeeIds":{"type":["array","null"],"items":{"type":"string"}},"managerId":{"type":["string","null"]},"managerIds":{"type":["array","null"],"items":{"type":"string"}},"ancestorManagerId":{"type":["string","null"]},"ancestorManagerIds":{"type":["array","null"],"items":{"type":"string"}},"indirectManagerId":{"type":["string","null"]},"indirectManagerIds":{"type":["array","null"],"items":{"type":"string"}},"isMember":{"type":["boolean","null"]},"memberRole":{"type":["string","null"],"enum":["admin","hr-admin","integration-manager","data-analyst","team-member",null]},"query":{"type":["string","null"]},"includeArchived":{"type":["boolean","null"]},"onlyArchived":{"type":["boolean","null"]},"includeExternalOrgs":{"type":["boolean","null"]},"platformAccess":{"type":["string","null"],"enum":["HAS_ACCESS","INVITE_PENDING","NO_ACCESS",null]},"startDate":{"anyOf":[{"type":"object","properties":{"range":{"type":"string"}},"required":["range"]},{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},{"type":"null"}]},"isAccountAdmin":{"type":["boolean","null"]},"hasIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"lacksIntegrationIds":{"type":["array","null"],"items":{"type":"string"}},"and":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/CoreEmployeeFilter"}}},"description":"Limits which employees are returned within the set the caller can access. This filter never grants access to more employees.","title":"Employee filter","example":{"query":"Avery"}},"search":{"type":"string","maxLength":200,"description":"Text that matches the employee name, preferred name, or email username.","title":"Employee search text","example":"Avery"},"where":{"type":"array","items":{"type":"object","properties":{"stat":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","description":"Stat to compare. It must be one of statTypes.","title":"Stat identifier","example":"code-prs-merged"},"operator":{"type":"string","enum":["lt","lte","eq","gt","gte"],"description":"Numeric comparison to apply to the range value.","title":"Comparison operator","example":"gte"},"value":{"type":"number","description":"Value to compare the stat total with.","title":"Comparison value","example":1}},"required":["stat","operator","value"]},"maxItems":10,"description":"Conditions on stat totals. An employee matches only when every condition is true. Each condition compares the value that a row returns: the weighted average for AVERAGE stats, and 0 for an employee with no data.","title":"Stat total conditions","example":[{"stat":"code-prs-merged","operator":"gte","value":1}]}},"required":["dateRange","statTypes"],"additionalProperties":false,"title":"Employee stat totals count request","example":{"dateRange":{"from":"2026-01-01","to":"2026-01-31"},"statTypes":["code-prs-merged"],"where":[{"stat":"code-prs-merged","operator":"gte","value":1}]}},"ExportStatsCsvResponse":{"type":"string","description":"CSV file with one row per employee, stat, and period. Periods without a stored value for an employee are exported as 0.","title":"Employee stats CSV","format":"binary","example":"ID,Name,Job Title,Stat,Date,Value\nemployee-avery,Avery Chen,Engineer,Pull requests merged,2026-01-05,2\n"},"QueryStatViewsResponse":{"type":"object","properties":{"views":{"type":"array","items":{"$ref":"#/components/schemas/StatViewSummary"},"description":"Readable active views ordered by case-insensitive name, then view ID.","title":"Stat views"},"nextCursor":{"type":["string","null"],"description":"Opaque cursor for the next page, or null when there are no more views.","title":"Next page cursor"},"total":{"type":"integer","minimum":0,"description":"Total readable views matching search, on all pages. Present only for include.total.","title":"Total matching views","example":1}},"required":["views","nextCursor"],"title":"Stat views listing response"},"StatViewSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Saved stat view UUID.","title":"Stat view ID","example":"22222222-2222-4222-8222-222222222222"},"name":{"type":"string","description":"Display name of the saved view.","title":"View name","example":"Engineering activity"},"createdAt":{"type":"string","description":"Creation time as an ISO 8601 timestamp.","title":"Created at","example":"2026-01-01T10:00:00.000Z"},"updatedAt":{"type":"string","description":"Last change time as an ISO 8601 timestamp.","title":"Updated at","example":"2026-01-01T10:00:00.000Z"},"version":{"type":"integer","exclusiveMinimum":0,"description":"Current version. Send this as expectedVersion when updating or changing sharing.","title":"Version","example":1},"creator":{"$ref":"#/components/schemas/StatViewCreator"},"sharingAccess":{"$ref":"#/components/schemas/StatViewSharingAccess"},"isOwner":{"type":"boolean","description":"Whether the authenticated workspace member created this view.","title":"Is owner","example":true},"canWrite":{"type":"boolean","description":"Whether the caller can modify, share, or archive the view. Only its owner can.","title":"Can edit","example":true}},"required":["id","name","createdAt","updatedAt","version","creator","sharingAccess","isOwner","canWrite"],"title":"Stat view summary","description":"Saved view identity, creator, version, sharing, and caller-specific permissions."},"StatViewCreator":{"type":"object","properties":{"id":{"type":"string","description":"Employee ID of the view's creator.","title":"Creator employee ID","example":"employee-morgan"},"firstName":{"type":["string","null"],"description":"Creator's first name, or null when unavailable.","title":"First name","example":"Morgan"},"lastName":{"type":["string","null"],"description":"Creator's last name, or null when unavailable.","title":"Last name","example":"Lee"},"avatarUrl":{"type":["string","null"],"description":"Creator's avatar URL, or null when unset.","title":"Avatar URL","example":null},"archivedAt":{"type":["string","null"],"description":"Creator employee's archive time as an ISO 8601 timestamp, or null when active.","title":"Archived at","example":null}},"required":["id","firstName","lastName","avatarUrl","archivedAt"],"title":"Creator","description":"Employee profile of the view's creator."},"StatViewSharingAccess":{"type":"object","properties":{"companyAccess":{"type":"string","enum":["none","read","write"],"description":"Workspace-wide sharing level.","title":"Workspace access","example":"read"},"employeeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this workspace. For a subtree grant, identifies its root employee.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"Sharing level: none, read, or write. Only the owner can write a stat view.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"description":"Direct employee sharing grants, including the owner's access.","title":"Employee access"},"groupAccess":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","minLength":1,"description":"ID of an employee group in this workspace that the caller can read.","title":"Group ID","example":"group-engineering"},"access":{"type":"string","enum":["none","read","write"],"description":"Sharing level: none, read, or write. Only the owner can write a stat view.","title":"Access level","example":"read"}},"required":["groupId","access"]},"description":"Sharing grants for members of employee groups.","title":"Group access"},"automationAccess":{"type":"array","items":{"type":"object","properties":{"companyAutomationId":{"type":"string","minLength":1,"description":"Workspace automation ID. Automation sharing is not supported for stat views.","title":"Automation ID"},"access":{"type":"string","enum":["none","read","write"],"description":"Sharing level: none, read, or write. Only the owner can write a stat view.","title":"Access level","example":"read"}},"required":["companyAutomationId","access"]},"description":"Automation grants. New stat view sharing requests do not support this audience.","title":"Automation access","example":[]},"subtreeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this workspace. For a subtree grant, identifies its root employee.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"Sharing level: none, read, or write. Only the owner can write a stat view.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"description":"Reporting-team grants rooted at the named employee.","title":"Reporting team access"},"allManagersAccess":{"type":"string","enum":["none","read","write"],"description":"Sharing level for all managers.","title":"All managers access","example":"read"},"capabilitiesAccess":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","minLength":1,"description":"Capability name. Capability-based sharing is not supported for stat views.","title":"Capability"},"access":{"type":"string","enum":["none","read","write"],"description":"Sharing level: none, read, or write. Only the owner can write a stat view.","title":"Access level","example":"read"}},"required":["capability","access"]},"description":"Capability grants. New stat view sharing requests do not support this audience.","title":"Capability access","example":[]}},"required":["companyAccess","employeeAccess","groupAccess","automationAccess","subtreeAccess","allManagersAccess","capabilitiesAccess"],"title":"Stat view sharing access","description":"Structured sharing grants for the saved configuration. Sharing a view does not grant access to the employees' stat data."},"StatViewDetailResponse":{"type":"object","properties":{"view":{"$ref":"#/components/schemas/StatViewDetail"}},"required":["view"],"title":"Stat view details response"},"StatViewDetail":{"allOf":[{"$ref":"#/components/schemas/StatViewSummary"},{"type":"object","properties":{"statMetadataIds":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Saved stat definition UUIDs in display order.","title":"Stat definition IDs","example":["11111111-1111-4111-8111-111111111111"]},"employeeFilter":{"$ref":"#/components/schemas/ComplexEmployeeFilter"},"visibility":{"type":"string","enum":["full","partial","noneAccessible","noMatches"],"description":"Employee coverage for this caller: full means every matching employee is accessible; partial means some are accessible; noneAccessible means employees match but none are accessible; noMatches means the saved filter matches no employees. This describes employee access, not whether stat data exists.","title":"Employee visibility","example":"full"}},"required":["statMetadataIds","employeeFilter","visibility"]}],"title":"Stat view","description":"Readable saved configuration and employee coverage."},"ComplexEmployeeFilter":{"type":"object","properties":{"hasDirectReports":{"type":["boolean","null"],"description":"True selects managers with a direct report; false selects employees without direct reports.","title":"Has direct reports","example":true},"hasManager":{"type":["boolean","null"],"description":"True selects employees with an assigned manager; false selects employees without a manager.","title":"Has a manager","example":true},"employeeGroupId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select employees belonging to this employee group.","title":"Employee group ID","example":"group-engineering"},"employeeGroupIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select members of any listed employee group. Up to 1000 IDs.","title":"Employee group IDs","example":["group-engineering"]},"jobTitle":{"type":["string","null"],"maxLength":256,"description":"Select employees whose job title exactly matches this value.","title":"Exact job title","example":"Engineer"},"jobTitles":{"type":["array","null"],"items":{"type":"string","maxLength":256},"maxItems":1000,"description":"Select employees whose job title exactly matches any listed value. Up to 1000 titles.","title":"Exact job titles","example":["Engineer","Designer"]},"countries":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees whose HRIS work country matches any listed country code. Up to 1000 values.","title":"Work countries","example":["US"]},"emails":{"type":["array","null"],"items":{"type":"string","maxLength":320,"format":"email"},"maxItems":1000,"description":"Select employees associated with any listed email address. Up to 1000 valid addresses.","title":"Employee email addresses","example":["avery@example.test"]},"emailDomains":{"type":["array","null"],"items":{"type":"string","maxLength":254},"maxItems":1000,"description":"Select employees with an email address on any listed domain. A domain matches exactly, so subdomains are listed separately. Up to 1000 values.","title":"Employee email domains","example":["example.test"]},"employeeId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select a single employee by ID.","title":"Employee ID","example":"employee-avery"},"employeeIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees with any listed ID. Up to 1000 IDs.","title":"Employee IDs","example":["employee-avery"]},"excludedEmployeeId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Exclude this employee from the results.","title":"Excluded employee ID","example":"employee-excluded"},"excludedEmployeeIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Exclude employees with any listed ID. Use this field for exclusions in API bulk mutations. Up to 1000 IDs.","title":"Excluded employee IDs","example":["employee-excluded"]},"managerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select direct reports of this manager; exclude deeper reports.","title":"Direct manager ID","example":"employee-morgan"},"managerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select direct reports of any listed manager, at depth 1. Up to 1000 manager IDs.","title":"Direct manager IDs","example":["employee-morgan"]},"ancestorManagerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select direct and indirect reports below this manager at any depth.","title":"Ancestor manager ID","example":"employee-morgan"},"ancestorManagerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select anyone below any listed manager, at depth 1 or greater. Up to 1000 manager IDs.","title":"Ancestor manager IDs","example":["employee-morgan"]},"indirectManagerId":{"type":["string","null"],"minLength":1,"maxLength":128,"description":"Select reports at depth 2 or greater below this manager; exclude direct reports.","title":"Indirect manager ID","example":"employee-morgan"},"indirectManagerIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select reports at depth 2 or greater below any listed manager. Up to 1000 manager IDs.","title":"Indirect manager IDs","example":["employee-morgan"]},"isMember":{"type":["boolean","null"],"description":"True selects employees with active workspace membership; false selects employees without a member link or with inactive membership.","title":"Has active workspace membership","example":true},"memberRole":{"type":["string","null"],"enum":["admin","hr-admin","integration-manager","data-analyst","team-member",null],"description":"Select employees associated with this workspace member role.","title":"Workspace role","example":"team-member"},"query":{"type":["string","null"],"maxLength":256,"description":"Search employee name, email, and job title. A top-level query controls the default relevance ordering.","title":"Employee search text","example":"Avery"},"platformAccess":{"type":["string","null"],"enum":["HAS_ACCESS","INVITE_PENDING","NO_ACCESS",null],"description":"HAS_ACCESS selects active access; INVITE_PENDING selects pending invitations; NO_ACCESS selects employees without access.","title":"Workspace access status","example":"HAS_ACCESS"},"startDate":{"anyOf":[{"type":"object","properties":{"range":{"type":"string","minLength":1,"maxLength":128}},"required":["range"],"additionalProperties":false},{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}],"description":"ISO 8601 date or datetime. Inclusive lower bound."},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}],"description":"ISO 8601 date or datetime. Inclusive upper bound."}},"additionalProperties":false},{"type":"null"}],"description":"Select start dates within inclusive date bounds or a supported named date range.","title":"Start-date range","example":{"from":"2025-01-01","to":"2025-12-31"}},"isAccountAdmin":{"type":["boolean","null"],"description":"True selects account administrators; false selects employees who are not account administrators.","title":"Account administrator","example":false},"hasIntegrationIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees linked to every listed integration identifier. Up to 1000 IDs.","title":"Linked integrations","example":["slack"]},"lacksIntegrationIds":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":128},"maxItems":1000,"description":"Select employees without links to the listed integration identifiers. Up to 1000 IDs.","title":"Unlinked integrations","example":["slack"]},"includeArchived":{"type":["boolean","null"],"description":"Include archived employees in addition to current employees.","title":"Include former employees","example":false},"onlyArchived":{"type":["boolean","null"],"description":"Select only archived employees.","title":"Former employees only","example":false},"includeExternalOrgs":{"type":["boolean","null"],"description":"Include employees outside the primary organization.","title":"Include other organizations","example":false},"and":{"type":"array","items":{"$ref":"#/components/schemas/ComplexEmployeeFilter"},"maxItems":49,"description":"All child filters must match, in addition to the other predicates in this filter. Up to 49 children.","title":"All conditions"},"or":{"type":"array","items":{"$ref":"#/components/schemas/ComplexEmployeeFilter"},"maxItems":49,"description":"At least one child filter must match, in addition to the other predicates in this filter. Up to 49 children.","title":"Any condition"}},"additionalProperties":false,"description":"Employee selection saved in this view.","title":"Saved employee filter","example":{}},"StatViewMutationResponse":{"type":"object","properties":{"view":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"UUID of the created or modified view.","title":"Stat view ID","example":"22222222-2222-4222-8222-222222222222"},"version":{"type":"integer","exclusiveMinimum":0,"description":"Version to use on the next update. Creation starts at 1.","title":"Version","example":1}},"required":["id","version"],"description":"Saved view identity and current version. Fetch the view for its full configuration.","title":"Stat view"}},"required":["view"],"title":"Stat view mutation response","example":{"view":{"id":"22222222-2222-4222-8222-222222222222","version":1}}},"CreateStatViewRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name of the saved view, from 1 to 120 characters after trimming whitespace.","title":"View name","example":"Engineering activity"},"statMetadataIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":50,"description":"Ordered selection of 1 to 50 unique stat definition UUIDs from POST /c/{companyId}/stats/metadata/search. Definitions must be global or belong to this workspace and must not be archived.","title":"Stat definition IDs","example":["11111111-1111-4111-8111-111111111111"]},"employeeFilter":{"allOf":[{"$ref":"#/components/schemas/ComplexEmployeeFilter"},{"description":"Employee selection to save. An empty object selects all employees allowed by the filter defaults. Each viewer's analytics access still limits the data they can read. Filters support at most 5 nesting levels, including the root, 50 filter objects, and 500 values per filter array.","example":{"query":"Engineering"}}]}},"required":["name","statMetadataIds","employeeFilter"],"additionalProperties":false,"title":"Create stat view request","description":"Saved stat and employee selection. The request must fit within 32 KiB of JSON.","example":{"name":"Engineering activity","statMetadataIds":["11111111-1111-4111-8111-111111111111"],"employeeFilter":{}}},"UpdateStatViewRequest":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version from the latest view response. A conflicting change returns 409; reload the view and retry with its current version.","title":"Expected version","example":1},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Name of the saved view, from 1 to 120 characters after trimming whitespace.","title":"View name","example":"Engineering activity"},"statMetadataIds":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":50,"description":"Ordered selection of 1 to 50 unique stat definition UUIDs from POST /c/{companyId}/stats/metadata/search. Definitions must be global or belong to this workspace and must not be archived.","title":"Stat definition IDs","example":["11111111-1111-4111-8111-111111111111"]},"employeeFilter":{"allOf":[{"$ref":"#/components/schemas/ComplexEmployeeFilter"},{"description":"Replacement employee filter. Omit to preserve the saved selection. Supports at most 5 nesting levels, including the root, 50 filter objects, and 500 values per filter array."}]}},"required":["expectedVersion"],"additionalProperties":false,"title":"Update stat view request","description":"Supply expectedVersion and at least one saved view field. Omitted fields are preserved. Supplied arrays and filters replace their previous values. Maximum JSON size is 32 KiB.","example":{"expectedVersion":1,"name":"Weekly engineering activity"}},"SetStatViewAccessRequest":{"type":"object","properties":{"expectedVersion":{"type":"integer","exclusiveMinimum":0,"description":"Version from the latest view response. A conflicting change returns 409; reload the view and retry with its current version.","title":"Expected version","example":1},"employeeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this workspace. For a subtree grant, identifies its root employee.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"Use read to grant access or none for no grant. Write is rejected for recipients.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"maxItems":250,"default":[],"description":"Direct employee grants, at most 250. Omitted or empty clears existing grants.","title":"Employee access","example":[{"employeeId":"employee-avery","access":"read"}]},"groupAccess":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string","minLength":1,"description":"ID of an employee group in this workspace that the caller can read.","title":"Group ID","example":"group-engineering"},"access":{"type":"string","enum":["none","read","write"],"description":"Use read to grant access or none for no grant. Write is rejected for recipients.","title":"Access level","example":"read"}},"required":["groupId","access"]},"maxItems":250,"default":[],"description":"Group grants, at most 250. Omitted or empty clears existing grants.","title":"Group access","example":[]},"subtreeAccess":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1,"description":"Employee ID in this workspace. For a subtree grant, identifies its root employee.","title":"Employee ID","example":"employee-avery"},"access":{"type":"string","enum":["none","read","write"],"description":"Use read to grant access or none for no grant. Write is rejected for recipients.","title":"Access level","example":"read"}},"required":["employeeId","access"]},"maxItems":1,"default":[],"description":"At most one read grant for the owner's reporting team, rooted at the owner's employee ID. The owner must have a direct report. Omit to clear the team grant.","title":"Owner's reporting team access","example":[]},"allManagersAccess":{"type":"string","enum":["none","read","write"],"default":"none","description":"Read access for all managers. Defaults to none. Changing or removing this access requires permission to share analytics views workspace-wide.","title":"All managers access","example":"none"},"companyAccess":{"type":"string","enum":["none","read","write"],"default":"none","description":"Read access for the whole workspace. Defaults to none. Changing or removing this access requires permission to share analytics views workspace-wide.","title":"Workspace access","example":"none"},"automationAccess":{"type":"array","items":{"type":"object","properties":{"companyAutomationId":{"type":"string","minLength":1,"description":"Workspace automation ID. Automation sharing is not supported for stat views.","title":"Automation ID"},"access":{"type":"string","enum":["none","read","write"],"description":"Sharing level: none, read, or write. Only the owner can write a stat view.","title":"Access level","example":"read"}},"required":["companyAutomationId","access"]},"maxItems":0,"default":[],"description":"Unsupported audience. Omit or supply an empty array.","title":"Automation access","example":[]},"capabilitiesAccess":{"type":"array","items":{"type":"object","properties":{"capability":{"type":"string","minLength":1,"description":"Capability name. Capability-based sharing is not supported for stat views.","title":"Capability"},"access":{"type":"string","enum":["none","read","write"],"description":"Sharing level: none, read, or write. Only the owner can write a stat view.","title":"Access level","example":"read"}},"required":["capability","access"]},"maxItems":0,"default":[],"description":"Unsupported audience. Omit or supply an empty array.","title":"Capability access","example":[]}},"required":["expectedVersion"],"additionalProperties":false,"title":"Replace stat view sharing request","description":"Complete replacement of recipient grants, up to 32 KiB of JSON. Omitted audiences reset to no access. The owner's write access is always preserved.","example":{"expectedVersion":1,"employeeAccess":[{"employeeId":"employee-avery","access":"read"}]}}},"parameters":{}},"webhooks":{}}