{"openapi":"3.1.0","info":{"title":"Ravenna API","description":"OpenAPI compliant REST API","version":"1.0.0"},"servers":[{"url":"https://core.ravenna.ai/api"}],"externalDocs":{"url":"https://docs.ravenna.ai/getting-started/introduction"},"paths":{"/access-entitlements":{"get":{"operationId":"accessEntitlement-list","summary":"List access entitlements","tags":["Access Entitlement"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"accessRequestIds","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filterGroups","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accessRequestId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"userGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisionedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"parentEntitlementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","properties":{"errorReason":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"revokedByUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false},{"type":"null"}]},"accessRequest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"status":{"type":"string"},"ticket":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["prefix","workspace"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"accessLevel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]}},"required":["id","name","provisioningMethod"],"additionalProperties":false},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","ticketId","status","ticket","accessLevel"],"additionalProperties":false},{"type":"null"}]},"application":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false},{"type":"null"}]},"userGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"accessLevel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]}},"required":["id","name","provisioningMethod"],"additionalProperties":false},{"type":"null"}]},"lineage":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accessRequestId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"userGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisionedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"parentEntitlementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","properties":{"errorReason":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"revokedByUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false},{"type":"null"}]},"accessRequest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"status":{"type":"string"},"ticket":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["prefix","workspace"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"accessLevel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]}},"required":["id","name","provisioningMethod"],"additionalProperties":false},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","ticketId","status","ticket","accessLevel"],"additionalProperties":false},{"type":"null"}]},"application":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false},{"type":"null"}]},"userGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"accessLevel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]}},"required":["id","name","provisioningMethod"],"additionalProperties":false},{"type":"null"}]}},"required":["id","userId","status","createdAt"],"additionalProperties":false}}},"required":["id","userId","status","createdAt","lineage"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-entitlements/revoke":{"post":{"operationId":"accessEntitlement-revoke","summary":"Revoke access entitlements","tags":["Access Entitlement"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"revokeNote":{"type":"string"}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-entitlements/extend":{"post":{"operationId":"accessEntitlement-extend","summary":"Extend access entitlements","tags":["Access Entitlement"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"duration":{"type":"number","exclusiveMinimum":0}},"required":["ids","duration"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-entitlements/user-access-overview":{"get":{"operationId":"accessEntitlement-getUserAccessOverview","summary":"Get user access overview","tags":["Access Entitlement"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"userId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"durationMode":{"type":"string"},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"requiresApproval":{"type":"boolean"},"requiresBusinessJustification":{"type":"boolean"},"externalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","name","durationMode","defaultDuration","durationOptions","requiresApproval","requiresBusinessJustification","externalFields"],"additionalProperties":false},{"type":"null"}]},"isUserEligible":{"type":"boolean"},"isAtSeatLimit":{"type":"boolean"},"currentAccess":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["active","processing"]},"firstGrantedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"daysUntilExpiry":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","isUserEligible","isAtSeatLimit"],"additionalProperties":false}}},"required":["id","accessLevels"],"additionalProperties":false}},"summary":{"type":"object","properties":{"totalEligibleApplications":{"type":"number"},"applicationsWithCurrentAccess":{"type":"number"},"accessExpiringWithin7Days":{"type":"number"}},"required":["totalEligibleApplications","applicationsWithCurrentAccess","accessExpiringWithin7Days"],"additionalProperties":false}},"required":["applications","summary"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-entitlements/manual-provision":{"post":{"operationId":"accessEntitlement-manualProvision","summary":"Manually provision entitlements","tags":["Access Entitlement"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"entitlements":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accessRequestId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"userGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokedByUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revokeNote":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisionedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"parentEntitlementId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","properties":{"errorReason":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"revokedByUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false},{"type":"null"}]},"accessRequest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"status":{"type":"string"},"ticket":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["prefix","workspace"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"accessLevel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]}},"required":["id","name","provisioningMethod"],"additionalProperties":false},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejectedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","ticketId","status","ticket","accessLevel"],"additionalProperties":false},{"type":"null"}]},"application":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false},{"type":"null"}]},"userGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"accessLevel":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]}},"required":["id","name","provisioningMethod"],"additionalProperties":false},{"type":"null"}]}},"required":["id","userId","status","createdAt"],"additionalProperties":false}}},"required":["entitlements"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-entitlements/ticket-provisioning-actions":{"get":{"operationId":"accessEntitlement-ticketProvisioningActions","summary":"List manual provisioning actions for a ticket","tags":["Access Entitlement"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ticketId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"actions":{"type":"array","items":{"type":"object","properties":{"accessRequestId":{"type":"string"},"accessLevelName":{"type":"string"},"entitlementIds":{"type":"array","items":{"type":"string"}}},"required":["accessRequestId","accessLevelName","entitlementIds"],"additionalProperties":false}}},"required":["actions"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-levels":{"get":{"operationId":"accessLevel-list","summary":"List access levels","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"applicationId","schema":{"type":"string"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filterGroups","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"},"applicationName":{"type":"string"},"applicationImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatsUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt","applicationName","applicationImageUrl","applicationDomain"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"accessLevel-create","summary":"Create an access level for an application","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentStrategy":{"default":"AutoApprove","type":"string","enum":["All","AutoApprove","RoundRobin"]},"approvalPolicy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"owners":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customAccessPolicy":{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"approverPolicy":{"anyOf":[{"type":"string","enum":["ALL","ANY","MAJORITY"]},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","durationMode"]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["applicationId","name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"accessLevel-delete","summary":"Delete an access level","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"applicationId","schema":{"type":"string"},"required":true},{"in":"query","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-levels/bulk-archive":{"post":{"operationId":"accessLevel-bulkArchive","summary":"Bulk archive access levels by id","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-levels/bulk-unarchive":{"post":{"operationId":"accessLevel-bulkUnarchive","summary":"Bulk unarchive access levels by id","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-levels/bulk-delete":{"post":{"operationId":"accessLevel-bulkDelete","summary":"Bulk delete access levels by id","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-levels/bulk-update":{"post":{"operationId":"accessLevel-bulkUpdate","summary":"Bulk update access levels (provisioning method or access policy)","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-levels/orders":{"put":{"operationId":"accessLevel-updateOrders","summary":"Update orders of access levels","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"applicationId":{"type":"string"},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"}},"required":["id","order"]}}},"required":["applicationId","accessLevels"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies":{"get":{"operationId":"accessPolicy-list","summary":"List access policies","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filterGroups","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["standard","custom","external"]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"maximumDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string"},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"approverMode":{"type":"string","enum":["template","explicit"]},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"organizationId":{"type":"string"},"eligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"ineligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"applicationId":{"type":"string"},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationUserGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"application":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false}},"required":["id","name","description","order","applicationId","owners","ownerGroups","accessPolicyId","postProvisioningMessage","seatLimit","assignmentStrategy","provisioningMethod","integrationUserGroups","application"],"additionalProperties":false}},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","icon","color","isDefault","type","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","maximumDuration","ownerId","approvalTemplateId","approvalTemplate","approverMode","approverPolicy","roleBasedApprovers","approvers","approverGroups","organizationId","eligibleGroups","ineligibleGroups","accessLevels","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"accessPolicy-create","summary":"Create an access policy","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approverMode":{"type":"string","enum":["template","explicit"]},"approvers":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"approverPolicy":{"anyOf":[{"type":"string","enum":["ALL","ANY","MAJORITY"]},{"type":"null"}]},"requiresBusinessJustification":{"default":false,"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"default":[],"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"default":[],"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"default":[],"type":"array","items":{"type":"string"}},"accessLevelIds":{"default":[],"type":"array","items":{"type":"string"}}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["standard","custom","external"]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"maximumDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string"},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"approverMode":{"type":"string","enum":["template","explicit"]},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"organizationId":{"type":"string"},"eligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"ineligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"applicationId":{"type":"string"},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationUserGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"application":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false}},"required":["id","name","description","order","applicationId","owners","ownerGroups","accessPolicyId","postProvisioningMessage","seatLimit","assignmentStrategy","provisioningMethod","integrationUserGroups","application"],"additionalProperties":false}},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","icon","color","isDefault","type","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","maximumDuration","ownerId","approvalTemplateId","approvalTemplate","approverMode","approverPolicy","roleBasedApprovers","approvers","approverGroups","organizationId","eligibleGroups","ineligibleGroups","accessLevels","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies/bulk":{"delete":{"operationId":"accessPolicy-bulkDelete","summary":"Bulk delete access policies","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies/bulk-archive":{"post":{"operationId":"accessPolicy-bulkArchive","summary":"Bulk archive access policies","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies/bulk-unarchive":{"post":{"operationId":"accessPolicy-bulkUnarchive","summary":"Bulk unarchive access policies","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies/validate":{"post":{"operationId":"accessPolicy-validateAccessLevelEligibility","summary":"Validate user eligibility for an access level","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"accessPolicyId":{"type":"string"},"accessLevelId":{"type":"string"}},"required":["userId","accessPolicyId","accessLevelId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"eligible":{"type":"boolean"}},"required":["eligible"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies/eligible-access-levels":{"get":{"operationId":"accessPolicy-listEligibleAccessLevels","summary":"List eligible access levels for a user","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"userId","schema":{"type":"string"},"required":true},{"in":"query","name":"workspaceId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationId":{"type":"string"}},"required":["id","name","description","applicationId"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies/eligible-applications":{"get":{"operationId":"accessPolicy-listEligibleApplications","summary":"List eligible applications for a user","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"userId","schema":{"type":"string"},"required":true},{"in":"query","name":"workspaceId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationId":{"type":"string"}},"required":["id","name","description","applicationId"],"additionalProperties":false}}},"required":["id","name","displayName","imageUrl","organizationId","accessLevels"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-request":{"post":{"operationId":"accessRequest-create","summary":"Create an access request","tags":["access-request"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"description":"The workspace that the user is requesting access to","type":"string"},"application":{"description":"The application that the user is requesting access to, id or name is required","type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}]}}},"accessLevel":{"description":"The access level that the user is requesting access to, id or name is required","type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}]}}},"formId":{"description":"The form id to use for the access request.","type":"string"},"requester":{"description":"The requester of the access request, id or name is required","type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"object","properties":{"first":{"anyOf":[{"type":"string","minLength":3},{"type":"null"}]},"last":{"anyOf":[{"type":"string"},{"type":"null"}]}}},{"type":"null"}]}}},"duration":{"description":"The duration of the access request, e.g. 1d, 1w, 1m, 1y. The duration should be supported by the access level","default":"1d","anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"description":"The reason for the access request","type":"string"}},"required":["workspaceId","application","accessLevel","requester"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"shortId":{"type":"string"},"queueId":{"type":"string"}},"required":["id","status","requester","shortId","queueId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents":{"get":{"operationId":"agentModel-list","summary":"List agents","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"type":"string"}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filterGroups","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"personalityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"version":{"type":"number"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string"},"threadedMessageBehavior":{"type":"string"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"number"},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"number"},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"anyOf":[{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"tools":{"type":"array","items":{"type":"string"}},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false},"personality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","emoji","color","description","icon"],"additionalProperties":false}}},"required":["id","name","prefix","emoji","system","requestTypes"],"additionalProperties":false}},"kBs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"system":{"type":"boolean"},"lastSyncTS":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"global":{"type":"boolean"},"_count":{"type":"object","properties":{"kBDocuments":{"type":"number"}},"required":["kBDocuments"],"additionalProperties":false}},"required":["id","name","system","lastSyncTS","global","_count"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"system":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{},"options":{"type":"array","items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","system","type","config","options","createdAt","updatedAt","_count"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","private","required","ticketField","requestTypeId","customFieldId","customField","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","name","emoji","color","description","icon","aiExamples","customFields"],"additionalProperties":false}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"}},"required":["id","name","description","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","customPrompt","escalationInstructions","imageUrl","workspaceId","personalityId","enabled","version","respondOnMessage","respondOnMention","onlyRespondToRequests","channelMessageBehavior","threadedMessageBehavior","autoClassify","autoTag","negativeFeedbackAutoCreate","autoEscalate","respondOnPublishedTickets","aiAutoRespondEmail","aiAutoRespondIntegration","aiAutoRespondDelay","autoSubmitForm","conversationalFormFilling","conversationalFormFillingThreshold","showSlackSource","showSlackFeedback","showSlackCreateTicketButton","settings","tools","botUserId","botUser","workspace","personality","queues","kBs","requestTypes","workflows","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"agentModel-create","summary":"Create a new Agent","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"customPrompt":{"type":"string"},"escalationInstructions":{"type":"string"},"imageUrl":{"type":"string","format":"uri"},"personalityId":{"type":"string"},"enabled":{"default":true,"type":"boolean"},"respondOnMessage":{"default":"all-messages","type":"string","enum":["all-messages","channel-messages","no-messages"]},"respondOnMention":{"default":false,"type":"boolean"},"onlyRespondToRequests":{"default":false,"type":"boolean"},"channelMessageBehavior":{"default":"all","type":"string","enum":["all","requests","mentions"]},"threadedMessageBehavior":{"type":"string","enum":["all","mentions","smart"]},"autoClassify":{"default":false,"type":"boolean"},"autoTag":{"default":false,"type":"boolean"},"negativeFeedbackAutoCreate":{"default":true,"type":"boolean"},"autoEscalate":{"default":false,"type":"boolean"},"respondOnPublishedTickets":{"default":false,"type":"boolean"},"aiAutoRespondEmail":{"default":false,"type":"boolean"},"aiAutoRespondIntegration":{"default":false,"type":"boolean"},"aiAutoRespondDelay":{"default":0,"type":"integer","minimum":0,"maximum":300},"autoSubmitForm":{"default":true,"type":"boolean"},"conversationalFormFilling":{"default":false,"type":"boolean"},"conversationalFormFillingThreshold":{"default":10,"type":"integer","minimum":1,"maximum":20},"tools":{"type":"array","items":{"type":"string"}},"queueIds":{"type":"array","items":{"type":"string"}},"kbIds":{"type":"array","items":{"type":"string"}},"requestTypeIds":{"type":"array","items":{"type":"string"}}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"personalityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"version":{"type":"number"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string"},"threadedMessageBehavior":{"type":"string"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"number"},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"number"},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"anyOf":[{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"tools":{"type":"array","items":{"type":"string"}},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false},"personality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","emoji","color","description","icon"],"additionalProperties":false}}},"required":["id","name","prefix","emoji","system","requestTypes"],"additionalProperties":false}},"kBs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"system":{"type":"boolean"},"lastSyncTS":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"global":{"type":"boolean"},"_count":{"type":"object","properties":{"kBDocuments":{"type":"number"}},"required":["kBDocuments"],"additionalProperties":false}},"required":["id","name","system","lastSyncTS","global","_count"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"system":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{},"options":{"type":"array","items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","system","type","config","options","createdAt","updatedAt","_count"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","private","required","ticketField","requestTypeId","customFieldId","customField","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","name","emoji","color","description","icon","aiExamples","customFields"],"additionalProperties":false}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"}},"required":["id","name","description","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","customPrompt","escalationInstructions","imageUrl","workspaceId","personalityId","enabled","version","respondOnMessage","respondOnMention","onlyRespondToRequests","channelMessageBehavior","threadedMessageBehavior","autoClassify","autoTag","negativeFeedbackAutoCreate","autoEscalate","respondOnPublishedTickets","aiAutoRespondEmail","aiAutoRespondIntegration","aiAutoRespondDelay","autoSubmitForm","conversationalFormFilling","conversationalFormFillingThreshold","showSlackSource","showSlackFeedback","showSlackCreateTicketButton","settings","tools","botUserId","botUser","workspace","personality","queues","kBs","requestTypes","workflows","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/bulk":{"delete":{"operationId":"agentModel-bulkDelete","summary":"Bulk delete agents","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"personalityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"version":{"type":"number"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string"},"threadedMessageBehavior":{"type":"string"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"number"},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"number"},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"anyOf":[{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"tools":{"type":"array","items":{"type":"string"}},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false},"personality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","emoji","color","description","icon"],"additionalProperties":false}}},"required":["id","name","prefix","emoji","system","requestTypes"],"additionalProperties":false}},"kBs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"system":{"type":"boolean"},"lastSyncTS":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"global":{"type":"boolean"},"_count":{"type":"object","properties":{"kBDocuments":{"type":"number"}},"required":["kBDocuments"],"additionalProperties":false}},"required":["id","name","system","lastSyncTS","global","_count"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"system":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{},"options":{"type":"array","items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","system","type","config","options","createdAt","updatedAt","_count"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","private","required","ticketField","requestTypeId","customFieldId","customField","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","name","emoji","color","description","icon","aiExamples","customFields"],"additionalProperties":false}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"}},"required":["id","name","description","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","customPrompt","escalationInstructions","imageUrl","workspaceId","personalityId","enabled","version","respondOnMessage","respondOnMention","onlyRespondToRequests","channelMessageBehavior","threadedMessageBehavior","autoClassify","autoTag","negativeFeedbackAutoCreate","autoEscalate","respondOnPublishedTickets","aiAutoRespondEmail","aiAutoRespondIntegration","aiAutoRespondDelay","autoSubmitForm","conversationalFormFilling","conversationalFormFillingThreshold","showSlackSource","showSlackFeedback","showSlackCreateTicketButton","settings","tools","botUserId","botUser","workspace","personality","queues","kBs","requestTypes","workflows","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/latest-version":{"get":{"operationId":"agentModel-latestVersion","summary":"Get the latest agent version available to the caller","tags":["Agents"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"latestVersion":{"type":"number"}},"required":["latestVersion"],"additionalProperties":false}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/rules":{"get":{"operationId":"agentModel-listWorkspaceRules","summary":"List all rules in a workspace","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"agentId","schema":{"type":"string"}},{"in":"query","name":"workspaceId","schema":{"type":"string"}},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["title","description","agentsCount","createdAt","updatedAt"]}},{"in":"query","name":"sortDirection","schema":{"type":"string","enum":["asc","desc"]}},{"in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"agentRelations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"enabled":{"type":"boolean"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","agentId","enabled","agent"],"additionalProperties":false}},"_count":{"type":"object","properties":{"agentRelations":{"type":"number"}},"required":["agentRelations"],"additionalProperties":false}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt","agentRelations"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"agentModel-createRule","summary":"Create a new rule","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"content":{"default":"","type":"string"},"version":{"default":1,"type":"number"},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroupIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["title","description"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/rules/bulk":{"delete":{"operationId":"agentModel-bulkDetachAndDeleteRules","summary":"Bulk detach and delete rules","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedCount":{"type":"number"}},"required":["deletedCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/admin-audit-events/export":{"post":{"operationId":"adminAuditEvent-export","summary":"Export admin audit events to CSV","tags":["Admin Audit Events"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"default":"admin-audit-event-export","type":"string"},"search":{"type":"string"},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"csvContent":{"type":"string"},"filename":{"type":"string"},"recordCount":{"type":"number"}},"required":["csvContent","filename","recordCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ai-brief-schedules":{"get":{"operationId":"aiBriefSchedule-list","summary":"List AI brief schedules","tags":["AI Brief Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"dashboardId","schema":{"type":"string"}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"organizationId","schema":{"type":"string"}},{"in":"query","name":"isActive","schema":{"type":"boolean"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"dashboardId":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"slackChannelIds":{"type":"array","items":{"type":"string"}},"time":{"type":"string"},"day":{"anyOf":[{"type":"number"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextScheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","dashboardId","workspaceId","organizationId","userId","cadence","slackChannelIds","time","day","prompt","scheduleId","isActive","lastRunAt","nextScheduledAt","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"type":"string"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"aiBriefSchedule-create","summary":"Create AI brief schedule","tags":["AI Brief Schedule"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dashboardId":{"type":"string"},"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"slackChannelIds":{"minItems":1,"type":"array","items":{"type":"string"}},"time":{"type":"string","pattern":"^([0-1][0-9]|2[0-3]):[0-5][0-9]$"},"day":{"type":"integer","minimum":0,"maximum":31},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"}},"required":["dashboardId","cadence","slackChannelIds","time"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"dashboardId":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"slackChannelIds":{"type":"array","items":{"type":"string"}},"time":{"type":"string"},"day":{"anyOf":[{"type":"number"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextScheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","dashboardId","workspaceId","organizationId","userId","cadence","slackChannelIds","time","day","prompt","scheduleId","isActive","lastRunAt","nextScheduledAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ai-brief-schedules/send-now":{"post":{"operationId":"aiBriefSchedule-sendNow","summary":"Send AI brief immediately","tags":["AI Brief Schedule"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dashboardId":{"type":"string"},"slackChannelIds":{"minItems":1,"type":"array","items":{"type":"string"}},"cadence":{"default":"daily","type":"string","enum":["daily","weekly","monthly"]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"}},"required":["dashboardId","slackChannelIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"workflowId":{"type":"string"},"sentToChannels":{"type":"array","items":{"type":"string"}},"errors":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"error":{"type":"string"}},"required":["channelId","error"],"additionalProperties":false}}},"required":["success","workflowId","sentToChannels","errors"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/approval-templates":{"get":{"operationId":"approvalTemplate-list","summary":"List approval templates","tags":["Approval Templates"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filterGroups","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"approvalTemplate-create","summary":"Create an approval template","tags":["Approval Templates"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"rounds":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"policy":{"default":"ANY","type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]}},"required":["name","stageIndex","approvers"]}},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["name","rounds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/approval-templates/bulk":{"delete":{"operationId":"approvalTemplate-bulkDelete","summary":"Bulk delete approval templates","tags":["Approval Templates"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"},"ids":{"type":"array","items":{"type":"string"}},"userIds":{"type":"array","items":{"type":"string"}}},"required":["count","ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/approval-templates/bulk-update":{"post":{"operationId":"approvalTemplate-bulkUpdate","summary":"Bulk update approval templates to add workspaces","tags":["Approval Templates"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"workspaceIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["ids","workspaceIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/applications":{"get":{"operationId":"application-list","summary":"List applications","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"includeArchived","schema":{"type":"boolean"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filterGroups","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","INACTIVE","DELETED"]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"entitlementCount":{"type":"number"},"accessLevels":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt"],"additionalProperties":false}},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationApplicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"externalGroupId":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"userGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","externalGroupId","metadata"],"additionalProperties":false}},"supportedAccessProvisioningMethods":{"type":"array","items":{"type":"string","enum":["group","application","workflow","manual","external"]}}},"required":["id","name","app","integrationGroups"],"additionalProperties":false}},"required":["id","name","displayName","domain","imageUrl","price","status","provisioningMethod","details","postProvisioningMessage","owners","ownerGroups","approvers","approverGroups","organizationId","createdAt","updatedAt","archivedAt","accessLevels","workspaces","assignmentStrategy","integrationApplicationId"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"application-create","summary":"Create a new application","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{"type":"string"},{"type":"null"}]},"owners":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"approvers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["AutoApprove","RoundRobin","All"]},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","INACTIVE","DELETED"]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"entitlementCount":{"type":"number"},"accessLevels":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt"],"additionalProperties":false}},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationApplicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"externalGroupId":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"userGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","externalGroupId","metadata"],"additionalProperties":false}},"supportedAccessProvisioningMethods":{"type":"array","items":{"type":"string","enum":["group","application","workflow","manual","external"]}}},"required":["id","name","app","integrationGroups"],"additionalProperties":false}},"required":["id","name","displayName","domain","imageUrl","price","status","provisioningMethod","details","postProvisioningMessage","owners","ownerGroups","approvers","approverGroups","organizationId","createdAt","updatedAt","archivedAt","accessLevels","workspaces","assignmentStrategy","integrationApplicationId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/applications/export":{"post":{"operationId":"application-export","summary":"Export applications to CSV","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"includeArchived":{"type":"boolean"},"skip":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]},"offset":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]},"set":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"groupBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"search":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"anyOf":[{"type":"string"},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"string"},{"type":"null"}]},"filename":{"default":"applications-export","type":"string"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"csvContent":{"type":"string"},"filename":{"type":"string"},"recordCount":{"type":"number"}},"required":["csvContent","filename","recordCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/applications/bulk-delete":{"post":{"operationId":"application-bulkDelete","summary":"Bulk delete applications","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedCount":{"type":"number"}},"required":["deletedCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/applications/bulk-archive":{"post":{"operationId":"application-bulkArchive","summary":"Bulk archive applications by id","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/applications/bulk-unarchive":{"post":{"operationId":"application-bulkUnarchive","summary":"Bulk unarchive applications by id","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/applications/bulk-update":{"post":{"operationId":"application-bulkUpdate","summary":"Bulk update applications to add or remove workspaces","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"workspaceIds":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["add","remove"]},"addWorkspaceIds":{"type":"array","items":{"type":"string"}},"removeWorkspaceIds":{"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"updatedCount":{"type":"number"}},"required":["updatedCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets":{"get":{"operationId":"asset-list","summary":"List assets","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"assetTypeId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"assetTypeIds","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"assigneeId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"includeFields","schema":{"type":"boolean"}},{"in":"query","name":"includeArchived","schema":{"type":"boolean"}},{"in":"query","name":"filters","schema":{"type":"string"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"status":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"assigneeIds":{"type":"array","items":{"type":"string"}},"lastAssignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}},"required":["id","name","description","statusId","status","organizationId","createdAt","updatedAt","deletedAt","archivedAt","assetType","assigneeIds","lastAssignedAt","integrationSource"],"additionalProperties":false}},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"asset-create","summary":"Create an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"assetTypeId":{"type":"string","minLength":1},"sourceAssetIds":{"maxItems":1,"type":"array","items":{"type":"string"}},"targetAssetIds":{"type":"array","items":{"type":"string"}},"assigneeIds":{"type":"array","items":{"type":"string"}},"fields":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"fieldDefinitionId":{"type":"string","minLength":1},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["fieldDefinitionId","value"]}}},"required":["name","assetTypeId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"status":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"assigneeIds":{"type":"array","items":{"type":"string"}},"lastAssignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}},"required":["id","name","description","statusId","status","organizationId","createdAt","updatedAt","deletedAt","archivedAt","assetType","assigneeIds","lastAssignedAt","integrationSource"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/stats":{"get":{"operationId":"asset-stats","summary":"Asset totals and per-type counts","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"assigned":{"type":"number"},"free":{"type":"number"},"sourceApps":{"type":"array","items":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]}},"countsByStatusCategory":{"type":"object","propertyNames":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"additionalProperties":{"type":"number"}},"countsByStatusId":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"countsByAssetTypeId":{"type":"array","items":{"type":"object","properties":{"assetTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"number"},"assigned":{"type":"number"},"free":{"type":"number"}},"required":["assetTypeId","count","assigned","free"],"additionalProperties":false}}},"required":["total","assigned","free","sourceApps","countsByStatusCategory","countsByStatusId","countsByAssetTypeId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/activities/export":{"post":{"operationId":"asset-exportActivities","summary":"Export the activity of the given assets to CSV","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"filename":{"default":"asset-activity-export","type":"string"}},"required":["assetIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"csvContent":{"type":"string"},"filename":{"type":"string"},"recordCount":{"type":"number"}},"required":["csvContent","filename","recordCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/ticket-usage":{"get":{"operationId":"asset-ticketUsage","summary":"Which of the given assets are referenced by ticket custom fields","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"usedAssetIds":{"type":"array","items":{"type":"string"}}},"required":["usedAssetIds"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/bulk-assign":{"post":{"operationId":"asset-bulkAssign","summary":"Assign users to assets","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"assetIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["userId","assetIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/bulk-unassign":{"post":{"operationId":"asset-bulkUnassign","summary":"Unassign users from assets","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"assetIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["userId","assetIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-statuses":{"get":{"operationId":"assetStatus-list","summary":"List asset statuses","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"includeArchived","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"assetStatus-create","summary":"Create an asset status","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["label","category"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-statuses/reorder":{"post":{"operationId":"assetStatus-reorder","summary":"Reorder asset statuses","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-types":{"get":{"operationId":"assetType-list","summary":"List asset types","tags":["Asset Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"assigneeId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"name","schema":{"type":"string"}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"names","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"includeFieldDefinitions","schema":{"type":"boolean"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filterGroups","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"assetType-create","summary":"Create an asset type","tags":["Asset Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"hidden":{"type":"boolean"},"required":{"type":"boolean"},"singleSelect":{"type":"boolean"}},"required":["label","type"]}}},"required":["id","title","items"]}}},"required":["sections"]},{"type":"null"}]},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/field-definitions":{"get":{"operationId":"field-listDefinitions","summary":"List field definitions","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"field-createDefinition","summary":"Create a field definition","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"]}}},"required":["label","type"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/field-values":{"get":{"operationId":"field-listValues","summary":"List field values for an entity","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"entityType","schema":{"type":"string","enum":["ASSET"]},"required":true},{"in":"query","name":"entityId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"field-setValue","summary":"Set a field value","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fieldDefinitionId":{"type":"string","minLength":1},"entityType":{"type":"string","enum":["ASSET"]},"entityId":{"type":"string","minLength":1},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["fieldDefinitionId","entityType","entityId","value"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/field-values/batch":{"post":{"operationId":"field-setValueBatch","summary":"Set multiple field values","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["ASSET"]},"entityId":{"type":"string","minLength":1},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"fieldDefinitionId":{"type":"string","minLength":1},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["fieldDefinitionId","value"]}}},"required":["entityType","entityId","values"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/business-schedules":{"get":{"operationId":"businessSchedule-list","summary":"List business schedules","tags":["Business Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"includeArchived","schema":{"type":"boolean"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"weeklyHours":{},"holidays":{},"isDefault":{"type":"boolean"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"slas":{"type":"number"}},"required":["slas"],"additionalProperties":false}},"required":["id","name","timezone","weeklyHours","holidays","isDefault","icon","color","workspaceId","createdAt","updatedAt","archivedAt","_count"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"businessSchedule-create","summary":"Create business schedule","tags":["Business Schedule"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"timezone":{"type":"string"},"weeklyHours":{"type":"object","properties":{"mon":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"tue":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"wed":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"thu":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"fri":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"sat":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"sun":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}}}},"holidays":{"default":[],"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"isDefault":{"default":false,"type":"boolean"},"icon":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","timezone","weeklyHours"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"weeklyHours":{},"holidays":{},"isDefault":{"type":"boolean"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"slas":{"type":"number"}},"required":["slas"],"additionalProperties":false}},"required":["id","name","timezone","weeklyHours","holidays","isDefault","icon","color","workspaceId","createdAt","updatedAt","archivedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/categories":{"get":{"operationId":"category-list","summary":"List categories","tags":["Categories"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"templateSlug","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"category-create","summary":"Create a new category","tags":["Categories"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"icon":{"type":"string"},"color":{"type":"string"}},"required":["name","examples"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/categories/templates":{"get":{"operationId":"category-listTemplates","summary":"List category templates","tags":["Categories"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/categories/bulk":{"post":{"operationId":"category-bulkCreate","summary":"Bulk create categories","tags":["Categories"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}},"icon":{"type":"string"},"color":{"type":"string"}},"required":["name","examples"]}}},"required":["categories"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/notes":{"get":{"operationId":"note-list","summary":"List notes for an entity","tags":["Notes"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"entityType","schema":{"type":"string","enum":["ASSET"]},"required":true},{"in":"query","name":"entityId","schema":{"type":"string"},"required":true},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"editedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","entityType","entityId","content","authorId","editedAt","deletedAt","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"note-create","summary":"Create a note on an entity","tags":["Notes"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["ASSET"]},"entityId":{"type":"string"},"content":{"type":"string"}},"required":["entityType","entityId","content"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"editedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","entityType","entityId","content","authorId","editedAt","deletedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/code-actions":{"get":{"operationId":"codeAction-list","summary":"List code actions","tags":["CodeAction"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"type","schema":{"type":"string"}},{"in":"query","name":"isActive","schema":{"type":"boolean"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"language":{"type":"string"},"version":{"type":"string"},"isActive":{"type":"boolean"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"foundryActionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"analysis":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"error":{"type":"string"}},"required":["inputs","outputs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","code","language","version","isActive","organizationId","createdAt","updatedAt"],"additionalProperties":false}},"total":{"type":"number"}},"required":["data","total"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"codeAction-create","summary":"Create code action","tags":["CodeAction"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"code":{"type":"string"},"language":{"default":"typescript","type":"string"},"version":{"default":"1.0.0","type":"string"},"isActive":{"type":"boolean"}},"required":["name","description","type"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"language":{"type":"string"},"version":{"type":"string"},"isActive":{"type":"boolean"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"foundryActionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"analysis":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"error":{"type":"string"}},"required":["inputs","outputs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","code","language","version","isActive","organizationId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/code-actions/analyze":{"post":{"operationId":"codeAction-analyze","summary":"Analyze code action","tags":["CodeAction"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"error":{"type":"string"}},"required":["inputs","outputs"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/code-actions/activate":{"post":{"operationId":"codeAction-activate","summary":"Activate code action","tags":["CodeAction"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"language":{"type":"string"},"version":{"type":"string"},"isActive":{"type":"boolean"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"foundryActionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"analysis":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"error":{"type":"string"}},"required":["inputs","outputs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","code","language","version","isActive","organizationId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/credentials":{"get":{"operationId":"vault-list","summary":"List credentials","tags":["Credential"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"keyVersion":{"type":"number"},"hint":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","type","keyVersion","metadata","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"vault-create","summary":"Create credential","tags":["Credential"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["name","value"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"keyVersion":{"type":"number"},"hint":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","type","keyVersion","metadata","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/custom-fields":{"get":{"operationId":"customField-list","summary":"List custom fields","tags":["Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"system","schema":{"type":"boolean"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"customField-create","summary":"Create a new custom field","tags":["Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"config":{"anyOf":[{"type":"object","properties":{"fileTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"allowList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"blockList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"richText":{"type":"boolean"},"assetTypeIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"requesterAssetsOnly":{"type":"boolean"}}},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"order":{"type":"number"}},"required":["value"]}}},"required":["key","label","required","type"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboards":{"get":{"operationId":"dashboard-list","summary":"List dashboards with pagination","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","x","y","columns","rows"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"isSystemCreated":{"type":"boolean"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["legacy","v2","prepackaged"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"creatorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"widgets":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","slug","isSystemCreated","itemType","type","parentId","organizationId","organization","creatorId","creator","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"dashboard-create","summary":"Create a new dashboard","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}]},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","rows"]}}}},"itemType":{"default":"dashboard","type":"string","enum":["dashboard","collection"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"widgets":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["TREND","METRIC","TABLE"]},"dashboardId":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["timeInterval"]},{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["aggregations"]},{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}},"columns":{"type":"array","items":{"type":"string"}}}}]},"displayConfig":{"anyOf":[{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}}},{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}}},{"type":"object","properties":{"limit":{"type":"number"}}}]}},"required":["type","dashboardId","name","query"]}}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","x","y","columns","rows"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"isSystemCreated":{"type":"boolean"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["legacy","v2","prepackaged"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"creatorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"widgets":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","slug","isSystemCreated","itemType","type","parentId","organizationId","organization","creatorId","creator","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboard/widgets":{"post":{"operationId":"dashboard-createWidget","summary":"Create a new dashboard widget","tags":["Dashboard","Widgets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["TREND","METRIC","TABLE"]},"dashboardId":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["timeInterval"]},{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["aggregations"]},{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}},"columns":{"type":"array","items":{"type":"string"}}}}]},"displayConfig":{"anyOf":[{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}}},{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}}},{"type":"object","properties":{"limit":{"type":"number"}}}]}},"required":["type","dashboardId","name","query"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/analytics/preview-metric":{"post":{"operationId":"dashboard-previewMetricQuery","summary":"Preview metric query widget","tags":["Analytics"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["aggregations"]},"workspaceId":{"type":"string"},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"period":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"ravFilters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}},"featuredGroupIds":{"type":"array","items":{"type":"string"}}},"required":["query","workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"grouped"},"data":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string"},"groupName":{"type":"string"},"value":{"type":"number"},"populationCount":{"type":"number"}},"required":["groupId","groupName","value"],"additionalProperties":false}},"chartConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string"},"id":{"type":"string"},"seriesId":{"type":"string"},"color":{"type":"string"}},"required":["label","id","color"],"additionalProperties":false}},"featuredValue":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":"number"},"change":{"type":"number"},"changePercentage":{"type":"number"},"isEmptyPeriod":{"type":"boolean"},"populationCount":{"type":"number"}},"required":["value","previousValue","change","changePercentage"],"additionalProperties":false}},"required":["type","data","chartConfig"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"single"},"data":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":"number"},"change":{"type":"number"},"changePercentage":{"type":"number"},"isEmptyPeriod":{"type":"boolean"},"populationCount":{"type":"number"}},"required":["value","previousValue","change","changePercentage"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/analytics/preview-trend":{"post":{"operationId":"dashboard-previewTrendQuery","summary":"Preview trend query widget","tags":["Analytics"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["timeInterval"]},"workspaceId":{"type":"string"},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"period":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"ravFilters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"required":["query","workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"}},"required":["timestamp"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"not":{}}]}}},"chartConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string"},"id":{"type":"string"},"seriesId":{"type":"string"},"color":{"type":"string"}},"required":["label","id","color"],"additionalProperties":false}}},"required":["data","chartConfig"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/analytics/execute-single":{"post":{"operationId":"dashboard-executeSingleQuery","summary":"Execute single value widget query","tags":["Analytics"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"widgetId":{"type":"string"},"workspaceId":{"type":"string"},"filters":{"type":"object","properties":{"period":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}},"ravFilters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}},"widget":{"type":"object","properties":{"query":{},"type":{"type":"string","enum":["TREND","METRIC","TABLE"]}},"required":["query","type"]}},"required":["widgetId","workspaceId","filters","widget"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":"number"},"change":{"type":"number"},"changePercentage":{"type":"number"},"isEmptyPeriod":{"type":"boolean"},"populationCount":{"type":"number"}},"required":["value","previousValue","change","changePercentage"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/analytics/execute-grouped":{"post":{"operationId":"dashboard-executeGroupedQuery","summary":"Execute grouped value widget query","tags":["Analytics"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"filters":{"type":"object","properties":{"period":{"type":"string"},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}},"ravFilters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"required":["id","workspaceId","filters"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string"},"groupName":{"type":"string"},"value":{"type":"number"},"populationCount":{"type":"number"}},"required":["groupId","groupName","value"],"additionalProperties":false}},"chartConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string"},"id":{"type":"string"},"seriesId":{"type":"string"},"color":{"type":"string"}},"required":["label","id","color"],"additionalProperties":false}},"featuredValue":{"type":"object","properties":{"value":{"type":"number"},"previousValue":{"type":"number"},"change":{"type":"number"},"changePercentage":{"type":"number"},"isEmptyPeriod":{"type":"boolean"},"populationCount":{"type":"number"}},"required":["value","previousValue","change","changePercentage"],"additionalProperties":false}},"required":["data","chartConfig"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/analytics/execute-trend":{"post":{"operationId":"dashboard-executeTrendQuery","summary":"Execute trend/time series widget query","tags":["Analytics"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"filters":{"type":"object","properties":{"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"period":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]}}},"query":{},"ravFilters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"required":["id","workspaceId","filters","query"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"}},"required":["timestamp"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"not":{}}]}}},"chartConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string"},"id":{"type":"string"},"seriesId":{"type":"string"},"color":{"type":"string"}},"required":["label","id","color"],"additionalProperties":false}}},"required":["data","chartConfig"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboards/move":{"post":{"operationId":"dashboard-move","summary":"Move a dashboard or collection into another collection","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","x","y","columns","rows"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"isSystemCreated":{"type":"boolean"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["legacy","v2","prepackaged"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"creatorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"widgets":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","slug","isSystemCreated","itemType","type","parentId","organizationId","organization","creatorId","creator","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboards/bulk-move":{"post":{"operationId":"dashboard-bulkMove","summary":"Move multiple dashboards or collections into another collection","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ids","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","x","y","columns","rows"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"isSystemCreated":{"type":"boolean"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["legacy","v2","prepackaged"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"creatorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"widgets":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","slug","isSystemCreated","itemType","type","parentId","organizationId","organization","creatorId","creator","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboards/widgets/insights":{"post":{"operationId":"dashboard-getWidgetInsights","summary":"Get AI-generated insights for a dashboard widget","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"widgetId":{"type":"string"},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"ravFilters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}},"forceRefresh":{"type":"boolean"},"mode":{"type":"string","enum":["detailed","concise"]}},"required":["widgetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"insights":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"keyMetrics":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"insight":{"type":"string"}},"required":["label","value","insight"],"additionalProperties":false}},"trends":{"type":"array","items":{"type":"string"}},"dataDistribution":{"type":"string"}},"required":["summary","keyMetrics","trends","dataDistribution"],"additionalProperties":false},{"type":"object","properties":{"widgetName":{"type":"string"},"oneLineSummary":{"type":"string"},"topMetric":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false},"keyTrend":{"type":"string"}},"required":["widgetName","oneLineSummary"],"additionalProperties":false}]},"generatedAt":{"type":"string"},"cached":{"type":"boolean"},"mode":{"type":"string","enum":["detailed","concise"]}},"required":["insights","generatedAt","cached","mode"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/email-domains/verified":{"get":{"operationId":"emailDomain-listVerified","summary":"List verified email domain names","tags":["EmailDomain"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/email-domains":{"get":{"operationId":"emailDomain-list","summary":"List email domains","tags":["EmailDomain"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"dkimRecords":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","const":"CNAME"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","domain","status","dkimRecords","createdAt","updatedAt"],"additionalProperties":false}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"emailDomain-create","summary":"Add email domain","tags":["EmailDomain"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$"}},"required":["domain"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"dkimRecords":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","const":"CNAME"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","domain","status","dkimRecords","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/enabled-integration-ids":{"get":{"operationId":"foundry-listFoundryEnabledIds","summary":"List integration IDs that have Foundry enabled","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}}},"required":["ids"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/connected-integrations":{"get":{"operationId":"foundry-listConnectedIntegrations","summary":"List non-Foundry integrations that have Foundry enabled","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDraft":{"type":"boolean"}},"required":["id","name","app","imageURL","isDraft"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/curated-providers":{"get":{"operationId":"foundry-listCuratedProviders","summary":"List the curated integration providers available to connect","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"baseUrl":{"type":"string"},"docsUrl":{"type":"string"},"domain":{"type":"string"},"authMethods":{"type":"array","items":{"type":"string","enum":["api_key","oauth2","bearer","basic","advanced","none"]}},"libraryIds":{"type":"string"},"authTestEndpoint":{"type":"object","properties":{"path":{"type":"string"},"method":{"default":"GET","type":"string","enum":["GET","POST"]},"body":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]}},"required":["path","method"],"additionalProperties":false},"apiKey":{"type":"object","properties":{"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]}},"required":["keyName","keyLocation"],"additionalProperties":false},"keyAsUsername":{"type":"boolean"},"defaultHeaders":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"connectFields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"},"location":{"type":"string","enum":["path","header"]},"headerName":{"type":"string"}},"required":["key","label","required","location"],"additionalProperties":false}},"oauth":{"type":"object","properties":{"authUrl":{"type":"string"},"tokenUrl":{"type":"string"},"minimumScopes":{"type":"array","items":{"type":"string"}},"availableScopes":{"type":"array","items":{"type":"string"}},"setupNotes":{"type":"string"}},"additionalProperties":false}},"required":["name","slug","description","baseUrl","docsUrl","domain","authMethods","libraryIds"],"additionalProperties":false}}},"required":["providers"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/integrations":{"get":{"operationId":"foundry-listIntegrations","summary":"List Foundry integrations","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"includeActions","schema":{"type":"boolean"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"apiName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string"},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"maskedAuthConfig":{"type":"object","properties":{"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"hasCredentials":{"type":"boolean"},"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]},"username":{"type":"string"},"loginUrl":{"type":"string"},"loginMethod":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"location":{"default":"header","type":"string","enum":["header","body","query","form"]},"secret":{"default":false,"type":"boolean"},"sendOnEveryRequest":{"default":false,"type":"boolean"},"prefix":{"type":"string"},"value":{"type":"string"}},"required":["name","location","secret","sendOnEveryRequest"],"additionalProperties":false}},"tokenSource":{"type":"string","enum":["header","body"]},"tokenLocation":{"type":"string"},"tokenPrefix":{"type":"string"},"tokenTtlSeconds":{"type":"number"}},"required":["authType","hasCredentials"],"additionalProperties":false},"docsValidationStatus":{"type":"string","enum":["NOT_VALIDATED","VALIDATING","VALID","INVALID"]},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{"type":"object","properties":{"completedSteps":{"type":"array","items":{"type":"string"}},"totalSteps":{"type":"number"}},"required":["completedSteps","totalSteps"],"additionalProperties":false},{"type":"null"}]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"],"additionalProperties":false}]}},{"type":"null"}]},"isDraft":{"type":"boolean"},"connectionHealthStatus":{"type":"string","enum":["healthy","failing","unknown","needs_reverification"]},"lastVerification":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","endpointPath","reason","diagnostics"],"additionalProperties":false},{"type":"null"}]},"foundryOAuthProviderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"context7LibraryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"grantType":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"}},"required":["key","label","required"],"additionalProperties":false}},"connectFieldValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"oauthProvider":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"isOrgScoped":{"type":"boolean"},"grantType":{"type":"string"},"clientId":{"type":"string"},"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","isOrgScoped","grantType","clientId","authUrl","tokenUrl","scopes"],"additionalProperties":false},{"type":"null"}]},"organizationId":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","apiName","description","docsUrl","baseUrl","authType","maskedAuthConfig","docsValidationStatus","docsValidationResult","imageURL","workflowGroup","defaultHeaders","isDraft","connectFields","connectFieldValues","organizationId","workspaceId","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"foundry-createIntegration","summary":"Create a Foundry integration","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiName":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string","format":"uri"},"baseUrl":{"type":"string","format":"uri"},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"authConfig":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"workflowGroup":{"type":"string"},"defaultHeaders":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"]}]}},"context7LibraryId":{"type":"string"},"keyAsUsername":{"type":"boolean"}},"required":["apiName","docsUrl","authType"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"apiName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string"},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"maskedAuthConfig":{"type":"object","properties":{"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"hasCredentials":{"type":"boolean"},"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]},"username":{"type":"string"},"loginUrl":{"type":"string"},"loginMethod":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"location":{"default":"header","type":"string","enum":["header","body","query","form"]},"secret":{"default":false,"type":"boolean"},"sendOnEveryRequest":{"default":false,"type":"boolean"},"prefix":{"type":"string"},"value":{"type":"string"}},"required":["name","location","secret","sendOnEveryRequest"],"additionalProperties":false}},"tokenSource":{"type":"string","enum":["header","body"]},"tokenLocation":{"type":"string"},"tokenPrefix":{"type":"string"},"tokenTtlSeconds":{"type":"number"}},"required":["authType","hasCredentials"],"additionalProperties":false},"docsValidationStatus":{"type":"string","enum":["NOT_VALIDATED","VALIDATING","VALID","INVALID"]},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{"type":"object","properties":{"completedSteps":{"type":"array","items":{"type":"string"}},"totalSteps":{"type":"number"}},"required":["completedSteps","totalSteps"],"additionalProperties":false},{"type":"null"}]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"],"additionalProperties":false}]}},{"type":"null"}]},"isDraft":{"type":"boolean"},"connectionHealthStatus":{"type":"string","enum":["healthy","failing","unknown","needs_reverification"]},"lastVerification":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","endpointPath","reason","diagnostics"],"additionalProperties":false},{"type":"null"}]},"foundryOAuthProviderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"context7LibraryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"grantType":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"}},"required":["key","label","required"],"additionalProperties":false}},"connectFieldValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"oauthProvider":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"isOrgScoped":{"type":"boolean"},"grantType":{"type":"string"},"clientId":{"type":"string"},"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","isOrgScoped","grantType","clientId","authUrl","tokenUrl","scopes"],"additionalProperties":false},{"type":"null"}]},"organizationId":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","apiName","description","docsUrl","baseUrl","authType","maskedAuthConfig","docsValidationStatus","docsValidationResult","imageURL","workflowGroup","defaultHeaders","isDraft","connectFields","connectFieldValues","organizationId","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/integrations/from-provider":{"post":{"operationId":"foundry-createIntegrationFromProvider","summary":"Create a Foundry integration from an OAuth provider","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string"}},"required":["providerId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"apiName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string"},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"maskedAuthConfig":{"type":"object","properties":{"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"hasCredentials":{"type":"boolean"},"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]},"username":{"type":"string"},"loginUrl":{"type":"string"},"loginMethod":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"location":{"default":"header","type":"string","enum":["header","body","query","form"]},"secret":{"default":false,"type":"boolean"},"sendOnEveryRequest":{"default":false,"type":"boolean"},"prefix":{"type":"string"},"value":{"type":"string"}},"required":["name","location","secret","sendOnEveryRequest"],"additionalProperties":false}},"tokenSource":{"type":"string","enum":["header","body"]},"tokenLocation":{"type":"string"},"tokenPrefix":{"type":"string"},"tokenTtlSeconds":{"type":"number"}},"required":["authType","hasCredentials"],"additionalProperties":false},"docsValidationStatus":{"type":"string","enum":["NOT_VALIDATED","VALIDATING","VALID","INVALID"]},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{"type":"object","properties":{"completedSteps":{"type":"array","items":{"type":"string"}},"totalSteps":{"type":"number"}},"required":["completedSteps","totalSteps"],"additionalProperties":false},{"type":"null"}]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"],"additionalProperties":false}]}},{"type":"null"}]},"isDraft":{"type":"boolean"},"connectionHealthStatus":{"type":"string","enum":["healthy","failing","unknown","needs_reverification"]},"lastVerification":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","endpointPath","reason","diagnostics"],"additionalProperties":false},{"type":"null"}]},"foundryOAuthProviderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"context7LibraryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"grantType":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"}},"required":["key","label","required"],"additionalProperties":false}},"connectFieldValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"oauthProvider":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"isOrgScoped":{"type":"boolean"},"grantType":{"type":"string"},"clientId":{"type":"string"},"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","isOrgScoped","grantType","clientId","authUrl","tokenUrl","scopes"],"additionalProperties":false},{"type":"null"}]},"organizationId":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","apiName","description","docsUrl","baseUrl","authType","maskedAuthConfig","docsValidationStatus","docsValidationResult","imageURL","workflowGroup","defaultHeaders","isDraft","connectFields","connectFieldValues","organizationId","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/code-integration":{"get":{"operationId":"foundry-getOrCreateCodeIntegration","summary":"Get or create the org-scoped code integration for Build Code mode","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"apiName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string"},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"maskedAuthConfig":{"type":"object","properties":{"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"hasCredentials":{"type":"boolean"},"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]},"username":{"type":"string"},"loginUrl":{"type":"string"},"loginMethod":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"location":{"default":"header","type":"string","enum":["header","body","query","form"]},"secret":{"default":false,"type":"boolean"},"sendOnEveryRequest":{"default":false,"type":"boolean"},"prefix":{"type":"string"},"value":{"type":"string"}},"required":["name","location","secret","sendOnEveryRequest"],"additionalProperties":false}},"tokenSource":{"type":"string","enum":["header","body"]},"tokenLocation":{"type":"string"},"tokenPrefix":{"type":"string"},"tokenTtlSeconds":{"type":"number"}},"required":["authType","hasCredentials"],"additionalProperties":false},"docsValidationStatus":{"type":"string","enum":["NOT_VALIDATED","VALIDATING","VALID","INVALID"]},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{"type":"object","properties":{"completedSteps":{"type":"array","items":{"type":"string"}},"totalSteps":{"type":"number"}},"required":["completedSteps","totalSteps"],"additionalProperties":false},{"type":"null"}]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"],"additionalProperties":false}]}},{"type":"null"}]},"isDraft":{"type":"boolean"},"connectionHealthStatus":{"type":"string","enum":["healthy","failing","unknown","needs_reverification"]},"lastVerification":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","endpointPath","reason","diagnostics"],"additionalProperties":false},{"type":"null"}]},"foundryOAuthProviderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"context7LibraryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"grantType":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"}},"required":["key","label","required"],"additionalProperties":false}},"connectFieldValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"oauthProvider":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"isOrgScoped":{"type":"boolean"},"grantType":{"type":"string"},"clientId":{"type":"string"},"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","isOrgScoped","grantType","clientId","authUrl","tokenUrl","scopes"],"additionalProperties":false},{"type":"null"}]},"organizationId":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","apiName","description","docsUrl","baseUrl","authType","maskedAuthConfig","docsValidationStatus","docsValidationResult","imageURL","workflowGroup","defaultHeaders","isDraft","connectFields","connectFieldValues","organizationId","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/integrations/validate-docs":{"post":{"operationId":"foundry-validateDocs","summary":"Validate API documentation for an integration (async via Temporal)","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string"}},"required":["integrationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"}},"required":["started"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/integrations/verify-auth":{"post":{"operationId":"foundry-verifyIntegrationAuth","summary":"Verify authentication credentials against a known endpoint","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string"},"endpointPath":{"type":"string"},"waitForDocs":{"type":"boolean"},"overrides":{"type":"object","properties":{"baseUrl":{"type":"string","format":"uri"},"authType":{"type":"string"},"authConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string"}},"required":["credentialId"]}]}},{"type":"null"}]},"method":{"type":"string"},"body":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"connectFieldValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"copilot":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"maxLength":128},"action":{"type":"string","enum":["saved","connected","retried","configured"]}},"required":["sessionId","action"]}},"required":["integrationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"tested":{"type":"boolean"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]},"systemMessage":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","tested","endpointPath","reason"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions":{"get":{"operationId":"foundry-listActions","summary":"List Foundry actions","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"integrationId","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string","enum":["GENERATED","EDITED"]}},{"in":"query","name":"testStatus","schema":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"codeVersion":{"type":"number"},"revision":{"type":"number"},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","app","imageURL"],"additionalProperties":false}},"nativeApp":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"nativeIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","status","lastTestStatus","codeVersion","revision","isPublished","publishedAt","createdAt","updatedAt","integrations","nativeApp","nativeIntegrationId"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"foundry-createAction","summary":"Create a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string"},"name":{"type":"string","minLength":1},"userRequest":{"type":"string","minLength":1},"seed":{"type":"boolean"}},"required":["name","userRequest"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"codeVersion":{"type":"number"},"revision":{"type":"number"},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","app","imageURL"],"additionalProperties":false}},"nativeApp":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"nativeIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","status","lastTestStatus","codeVersion","revision","isPublished","publishedAt","createdAt","updatedAt","integrations","nativeApp","nativeIntegrationId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/with-native-bridge":{"post":{"operationId":"foundry-createActionWithNativeBridge","summary":"Create a Foundry action hosted on a native integration credential bridge","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"userRequest":{"type":"string","minLength":1},"seed":{"type":"boolean"},"nativeIntegrationId":{"type":"string"}},"required":["name","userRequest","nativeIntegrationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"codeVersion":{"type":"number"},"revision":{"type":"number"},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","app","imageURL"],"additionalProperties":false}},"nativeApp":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"nativeIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","status","lastTestStatus","codeVersion","revision","isPublished","publishedAt","createdAt","updatedAt","integrations","nativeApp","nativeIntegrationId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/generate":{"post":{"operationId":"foundry-generateAction","summary":"Generate code for a Foundry action (async via Temporal)","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"options":{"type":"object","properties":{"includeRetry":{"type":"boolean"},"includePagination":{"type":"boolean"},"includeRateLimit":{"type":"boolean"}}},"endpointDocsUrl":{"type":"string","format":"uri"}},"required":["actionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"}},"required":["started"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/iterate":{"post":{"operationId":"foundry-iterateAction","summary":"Iterate on Foundry action code with feedback","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"message":{"type":"string","minLength":1},"applyChanges":{"default":false,"type":"boolean"},"images":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"mimeType":{"type":"string"}},"required":["key","mimeType"]}}},"required":["actionId","message"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"}},"required":["started"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/native-bridge-integrations":{"get":{"operationId":"foundry-listNativeBridgeIntegrations","summary":"List native integrations that expose a Foundry credential bridge","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"integrationId":{"type":"string"},"app":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"credentialMode":{"type":"string","enum":["minted","staticToken"]}},"required":["integrationId","app","name","credentialMode"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/native-bridge":{"post":{"operationId":"foundry-setActionNativeBridge","summary":"Link a native integration as a Foundry action credential source","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"nativeIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["actionId","nativeIntegrationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"junctionIntegrationId":{"type":"string"},"nativeIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}}},"required":["actionId","junctionIntegrationId","nativeIntegrationId","requestedScopes"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/docs-url":{"put":{"operationId":"foundry-updateActionDocsUrl","summary":"Update the endpoint docs URL for a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"endpointDocsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["actionId","endpointDocsUrl"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/validate":{"post":{"operationId":"foundry-validateAction","summary":"Validate a Foundry action for publish (tsc + schema check)","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"tscErrors":{"type":"array","items":{"type":"object","properties":{"line":{"type":"number"},"column":{"type":"number"},"code":{"type":"string"},"message":{"type":"string"}},"required":["message"],"additionalProperties":false}},"schemaMismatches":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["input","output"]},"message":{"type":"string"}},"required":["type","message"],"additionalProperties":false}},"inputSchema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"outputSchema":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["success","tscErrors","schemaMismatches"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/publish":{"post":{"operationId":"foundry-publishAction","summary":"Publish a Foundry action for use in workflows","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"inputSchema":{},"outputSchema":{}},"required":["actionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/unpublish":{"post":{"operationId":"foundry-unpublishAction","summary":"Unpublish a Foundry action from workflows","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/regenerate-ai-prompt":{"post":{"operationId":"foundry-regenerateAiPrompt","summary":"Regenerate the agent-tool prompt for a Foundry action's target model","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"model":{"default":"gpt-5.2","type":"string","minLength":1}},"required":["actionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/regenerate-dry-run-code":{"post":{"operationId":"foundry-regenerateDryRunCode","summary":"Regenerate the dry-run (non-mutating) variant for a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"}},"required":["actionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/test-runs":{"post":{"operationId":"foundry-runTest","summary":"Run a test execution for a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"environment":{"default":"DEVELOPMENT","type":"string","enum":["DEVELOPMENT","STAGING","PRODUCTION"]},"inputs":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"verbose":{"default":false,"type":"boolean"},"dryRun":{"default":false,"type":"boolean"},"useDryRunVariant":{"default":false,"type":"boolean"}},"required":["actionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"environment":{"type":"string","enum":["DEVELOPMENT","STAGING","PRODUCTION"]},"inputs":{},"verbose":{"type":"boolean"},"dryRun":{"type":"boolean"},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string","enum":["RUNNING","SUCCESS","ERROR"]},"resultJson":{"anyOf":[{},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestLogEntries":{},"consoleLog":{"type":"string"},"createdAt":{"type":"string"},"revision":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","actionId","environment","inputs","verbose","dryRun","startedAt","endedAt","durationMs","status","resultJson","error","requestLogEntries","consoleLog","createdAt","revision"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"get":{"operationId":"foundry-listTestRuns","summary":"List test runs for a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"actionId","schema":{"type":"string"},"required":true},{"in":"query","name":"environment","schema":{"type":"string","enum":["DEVELOPMENT","STAGING","PRODUCTION"]}},{"in":"query","name":"status","schema":{"type":"string","enum":["RUNNING","SUCCESS","ERROR"]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"environment":{"type":"string","enum":["DEVELOPMENT","STAGING","PRODUCTION"]},"dryRun":{"type":"boolean"},"status":{"type":"string","enum":["RUNNING","SUCCESS","ERROR"]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"revision":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","actionId","environment","dryRun","status","durationMs","error","createdAt","revision"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/action-integrations":{"get":{"operationId":"foundryActionIntegration-list","summary":"List integrations attached to a Foundry action","tags":["Foundry Action Integrations"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"actionId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"integrationId":{"type":"string"},"isPrimary":{"type":"boolean"},"createdAt":{"type":"string"},"nativeIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"app":{"type":"string"},"isDraft":{"type":"boolean"},"isCarrier":{"type":"boolean"}},"required":["id","name","imageURL","app","isDraft","isCarrier"],"additionalProperties":false}},"required":["id","actionId","integrationId","isPrimary","createdAt","nativeIntegrationId","requestedScopes","integration"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"foundryActionIntegration-attach","summary":"Attach an integration to a Foundry action","tags":["Foundry Action Integrations"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"actionId":{"type":"string"},"integrationId":{"type":"string"}},"required":["actionId","integrationId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"integrationId":{"type":"string"},"isPrimary":{"type":"boolean"},"createdAt":{"type":"string"},"nativeIntegrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestedScopes":{"type":"array","items":{"type":"string"}},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"app":{"type":"string"},"isDraft":{"type":"boolean"},"isCarrier":{"type":"boolean"}},"required":["id","name","imageURL","app","isDraft","isCarrier"],"additionalProperties":false}},"required":["id","actionId","integrationId","isPrimary","createdAt","nativeIntegrationId","requestedScopes","integration"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"foundryActionIntegration-detach","summary":"Detach an integration from a Foundry action","tags":["Foundry Action Integrations"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"actionId","schema":{"type":"string"},"required":true},{"in":"query","name":"integrationId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/oauth-providers/validate-docs":{"post":{"operationId":"foundryOAuthProvider-validateDocs","summary":"Trigger docs validation for a Foundry OAuth provider","tags":["Foundry OAuth Providers"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string"}},"required":["providerId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"started":{"type":"boolean"}},"required":["started"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/oauth-providers/validation-status":{"get":{"operationId":"foundryOAuthProvider-getValidationStatus","summary":"Get docs validation status for a Foundry OAuth provider","tags":["Foundry OAuth Providers"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"docsValidationStatus":{"type":"string"},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{},{"type":"null"}]}},"required":["docsValidationStatus","docsValidationResult","docsValidationProgress"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/oauth-providers/connect-client-credentials":{"post":{"operationId":"foundryOAuthProvider-orgConnectClientCredentials","summary":"Connect a client_credentials OAuth provider and create an integration","tags":["Foundry OAuth Providers"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"providerId":{"type":"string"},"connectFieldValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["providerId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string"}},"required":["integrationId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integration-user/profile-fields":{"get":{"operationId":"integrationUser-getProfileFields","summary":"Get profile field definitions for an integration","tags":["integration-user"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"integrationApp","schema":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"required":true},{"in":"query","name":"forAgent","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"description":"Field key in metadata object","type":"string"},"label":{"description":"Display label for the field","type":"string"},"path":{"description":"JSON path to extract value (supports nested paths)","type":"string"},"type":{"description":"Field type for rendering (string, image, datetime, etc.)","type":"string"},"order":{"description":"Display order (lower numbers first)","type":"number"}},"required":["key","label","path","type","order"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integration-user/ai-profile-field-options":{"get":{"operationId":"integrationUser-getAiProfileFieldOptions","summary":"List the profile fields an org admin can show the AI for an integration","tags":["integration-user"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"integrationId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"key":{"description":"Field key in metadata object","type":"string"},"label":{"description":"Display label for the field","type":"string"},"visibleByDefault":{"description":"AI sees the field when nothing is saved","type":"boolean"},"everyWorkspaceByDefault":{"description":"By default the field also reaches workspaces that cannot use the integration","type":"boolean"},"custom":{"description":"A vendor custom attribute rather than a registered field","type":"boolean"}},"required":["key","label","visibleByDefault","everyWorkspaceByDefault","custom"],"additionalProperties":false}},"selected":{"description":"Saved settings, or null when the integration uses the defaults","anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"everyWorkspace":{"type":"boolean"}},"required":["key","everyWorkspace"],"additionalProperties":false}},{"type":"null"}]}},"required":["options","selected"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integration-user/ai-profile-fields":{"post":{"operationId":"integrationUser-setAiProfileFields","summary":"Choose which profile fields the AI sees for an integration","tags":["integration-user"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationId":{"type":"string"},"aiProfileFields":{"anyOf":[{"maxItems":200,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":100,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"everyWorkspace":{"type":"boolean"}},"required":["key","everyWorkspace"]}},{"type":"null"}]}},"required":["integrationId","aiProfileFields"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integration-user/for-user":{"get":{"operationId":"integrationUser-getForUser","summary":"Get integration users for a user with filtered metadata","tags":["integration-user"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"userId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Integration user ID","type":"string"},"integrationId":{"description":"Integration ID","type":"string"},"externalUserId":{"description":"External user ID from integration system","type":"string"},"userId":{"description":"Ravenna user ID","type":"string"},"status":{"description":"Integration user status","type":"string"},"metadata":{"description":"Filtered metadata based on context","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"description":"Creation timestamp (ISO string)","type":"string"},"updatedAt":{"description":"Last update timestamp (ISO string)","type":"string"},"integration":{"description":"Integration details","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string"}},"required":["id","name","app"],"additionalProperties":false},"_fields":{"description":"Field definitions for dynamic rendering","type":"array","items":{"type":"object","properties":{"key":{"description":"Field key in metadata object","type":"string"},"label":{"description":"Display label for the field","type":"string"},"path":{"description":"JSON path to extract value (supports nested paths)","type":"string"},"type":{"description":"Field type for rendering (string, image, datetime, etc.)","type":"string"},"order":{"description":"Display order (lower numbers first)","type":"number"}},"required":["key","label","path","type","order"],"additionalProperties":false}}},"required":["id","integrationId","externalUserId","userId","status","metadata","createdAt","updatedAt","integration","_fields"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/integration-user/list-for-integration":{"get":{"operationId":"integrationUser-listForIntegration","summary":"List integration users for an integration","tags":["integration-user"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"integrationId","schema":{"type":"string"}},{"in":"query","name":"integrationApp","schema":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]}},{"in":"query","name":"integrationType","schema":{"type":"string","enum":["TICKET","CHAT","KNOWLEDGE_BASE","ACCESS_PROVIDER","INCIDENT_MANAGEMENT","DEVICE_MANAGEMENT","HRIS","CRM","COMPLIANCE_MANAGEMENT","FOUNDRY","STORAGE"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"integrationId":{"type":"string"},"externalUserId":{"type":"string"},"userId":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","STAGED","PROVISIONED","RECOVERY","LOCKED_OUT","PASSWORD_EXPIRED","SUSPENDED","DEPROVISIONED"]},"metadata":{},"parentIntegrationUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","integrationId","externalUserId","userId","status","metadata","parentIntegrationUserId","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters":{"get":{"operationId":"knowledgeGapCluster-list","summary":"List knowledge gap clusters","description":"List cluster summaries for a workspace whose active date range (firstSeenAt/lastSeenAt) overlaps the requested window","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"startDate","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true},{"in":"query","name":"endDate","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"required":true},{"in":"query","name":"lifecycleStates","schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","DORMANT","ARCHIVED"]}}},{"in":"query","name":"severities","schema":{"type":"array","items":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]}}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"pageSize","schema":{"default":25,"type":"number"}},{"in":"query","name":"pageIndex","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"clusters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"representativeQuery":{"type":"string"},"gapType":{"type":"string","enum":["NO_CONTENT","WEAK_CONTENT","NOT_A_KNOWLEDGE_GAP"]},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"severityScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"coverageState":{"type":"string","enum":["NO_COVERAGE","DOC_NOT_CONNECTED","ANSWER_DRAFTED","PARTIALLY_COVERED","PUBLISHED"]},"trendPercent":{"anyOf":[{"type":"number"},{"type":"null"}]},"draftability":{"type":"string","enum":["HIGH","LOW"]},"lifecycleState":{"type":"string","enum":["ACTIVE","DORMANT","ARCHIVED"]},"ticketCount":{"type":"number"},"firstSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","label","description","representativeQuery","gapType","severity","severityScore","coverageState","trendPercent","draftability","lifecycleState","ticketCount","firstSeenAt","lastSeenAt","createdAt"],"additionalProperties":false}},"total":{"type":"number"}},"required":["clusters","total"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"knowledgeGapCluster-create","summary":"Create knowledge gap cluster","description":"Create a new topic that will be used to classify messages in the next detection run","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":500},"representativeQuery":{"type":"string","maxLength":500}},"required":["label"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"representativeQuery":{"type":"string"},"gapType":{"type":"string","enum":["NO_CONTENT","WEAK_CONTENT","NOT_A_KNOWLEDGE_GAP"]},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"severityScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"coverageState":{"type":"string","enum":["NO_COVERAGE","DOC_NOT_CONNECTED","ANSWER_DRAFTED","PARTIALLY_COVERED","PUBLISHED"]},"trendPercent":{"anyOf":[{"type":"number"},{"type":"null"}]},"draftability":{"type":"string","enum":["HIGH","LOW"]},"lifecycleState":{"type":"string","enum":["ACTIVE","DORMANT","ARCHIVED"]},"ticketCount":{"type":"number"},"firstSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","label","description","representativeQuery","gapType","severity","severityScore","coverageState","trendPercent","draftability","lifecycleState","ticketCount","firstSeenAt","lastSeenAt","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/emerging":{"get":{"operationId":"knowledgeGapCluster-listEmerging","summary":"List emerging (pooled) strays","description":"List tickets pooled below the cluster floor, awaiting similar tickets to form a gap","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"ticketId":{"type":"string"},"shortId":{"type":"string"},"queuePrefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempts":{"type":"number"},"firstPooledAt":{"type":"string"}},"required":["ticketId","shortId","queuePrefix","number","title","published","statusLabel","attempts","firstPooledAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/remove-messages":{"post":{"operationId":"knowledgeGapCluster-removeMessages","summary":"Remove messages from a cluster","description":"Disconnect messages from a cluster without deleting the underlying ticket messages","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageIds":{"minItems":1,"type":"array","items":{"type":"string"}},"clusterId":{"type":"string","minLength":1}},"required":["messageIds","clusterId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"remainingMessageCount":{"type":"number"}},"required":["success","remainingMessageCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/move-messages":{"post":{"operationId":"knowledgeGapCluster-moveMessages","summary":"Move messages between clusters","description":"Move messages from source clusters to target cluster and regenerate labels using LLM","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageIds":{"minItems":1,"type":"array","items":{"type":"string"}},"targetClusterId":{"type":"string","minLength":1},"sourceClusterIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["messageIds","targetClusterId","sourceClusterIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"updatedClusters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","label","description"],"additionalProperties":false}}},"required":["success","updatedClusters"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/all":{"delete":{"operationId":"knowledgeGapCluster-deleteAllForWorkspace","summary":"Delete all knowledge gap clusters (internal)","description":"Ravenna-internal only. Hard-deletes all clusters and the pending pool for the workspace.","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedClusters":{"type":"number"},"deletedPendingQueries":{"type":"number"},"watermarkReset":{"type":"boolean"}},"required":["deletedClusters","deletedPendingQueries","watermarkReset"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gaps-schedules":{"post":{"operationId":"knowledgeGapsSchedule-create","summary":"Create knowledge gaps schedule","tags":["Knowledge Gaps Schedule"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"},"isActive":{"default":true,"type":"boolean"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastSuccessfulRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessfulRunEndDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","organizationId","scheduleId","isActive","lastSuccessfulRunAt","lastSuccessfulRunEndDate","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gaps-schedules/trigger-now":{"post":{"operationId":"knowledgeGapsSchedule-triggerNow","summary":"Trigger knowledge gaps detection immediately","tags":["Knowledge Gaps Schedule"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string"}},"required":["workflowId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gaps-schedules/delete-and-regenerate":{"post":{"operationId":"knowledgeGapsSchedule-deleteAndRegenerate","summary":"Delete all clusters and regenerate with fresh 90-day lookback","tags":["Knowledge Gaps Schedule"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"deletedClusterCount":{"type":"number"},"workflowId":{"type":"string"}},"required":["deletedClusterCount","workflowId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/organizations/portal-header-image":{"post":{"operationId":"organization-uploadPortalHeaderImage","summary":"Upload a portal header image for the organization","tags":["Organizations"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"object","properties":{"base64":{"type":"string","minLength":1},"fileName":{"type":"string","minLength":1}},"required":["base64","fileName"]}},"required":["image"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/queues":{"get":{"operationId":"queue-list","summary":"List channels","tags":["Channels"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"nextCursor":{"type":"string"},"totalCount":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"queue-create","summary":"Create a new Channel.","tags":["Channels"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"prefix":{"type":"string","minLength":1,"maxLength":10,"pattern":"^[A-Z][A-Z0-9]{0,9}$"},"emoji":{"type":"string"},"requestChannelId":{"type":"string"},"triageChannelId":{"type":"string"},"workspaceId":{"type":"string"}},"required":["name","emoji"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/reminder-policies":{"get":{"operationId":"reminderPolicy-list","summary":"List reminder policies for the workspace","tags":["Reminder Policy"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["APPROVAL","ASSIGNMENT","SLA"]},"enabled":{"type":"boolean"},"intervalHours":{"type":"number","exclusiveMinimum":0},"maxReminders":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"useRecipientSchedule":{"type":"boolean"},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]}},"required":["id","type","enabled","intervalHours","maxReminders","scheduleId","useRecipientSchedule"],"additionalProperties":false}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"reminderPolicy-upsert","summary":"Create or update a reminder policy for the workspace","tags":["Reminder Policy"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["APPROVAL","ASSIGNMENT","SLA"]},"enabled":{"type":"boolean"},"intervalHours":{"type":"number","exclusiveMinimum":0},"maxReminders":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"useRecipientSchedule":{"default":false,"type":"boolean"},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]}},"required":["type","enabled","intervalHours","maxReminders","scheduleId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["APPROVAL","ASSIGNMENT","SLA"]},"enabled":{"type":"boolean"},"intervalHours":{"type":"number","exclusiveMinimum":0},"maxReminders":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"useRecipientSchedule":{"type":"boolean"},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]}},"required":["id","type","enabled","intervalHours","maxReminders","scheduleId","useRecipientSchedule"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-type-custom-fields":{"get":{"operationId":"requestTypeCustomFields-list","summary":"List request type custom fields","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"requestTypeId","schema":{"type":"string"},"required":true},{"in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"requestTypeCustomFields-create","summary":"Create a new request type custom field","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"system":{"type":"boolean"},"requestTypeId":{"type":"string"},"customFieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customField":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"config":{"anyOf":[{"type":"object","properties":{"fileTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"allowList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"blockList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"richText":{"type":"boolean"},"assetTypeIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"requesterAssetsOnly":{"type":"boolean"}}},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"order":{"type":"number"}},"required":["value"]}}},"required":["key","label","required","type"]},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["requestTypeId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-type-custom-fields/with-auto-chain":{"post":{"operationId":"requestTypeCustomFields-createWithAutoChain","summary":"Create a request type custom field and auto-create its dependent fields atomically","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"system":{"type":"boolean"},"requestTypeId":{"type":"string"},"customFieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customField":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"config":{"anyOf":[{"type":"object","properties":{"fileTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"allowList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"blockList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"richText":{"type":"boolean"},"assetTypeIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"requesterAssetsOnly":{"type":"boolean"}}},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"order":{"type":"number"}},"required":["value"]}}},"required":["key","label","required","type"]},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["requestTypeId"]}},"required":["root"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"root":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false},"chained":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}}},"required":["root","chained"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-type-custom-fields/orders":{"put":{"operationId":"requestTypeCustomFields-updateOrders","summary":"Update orders of request type custom fields","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"}},"required":["id","order"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"required":{"type":"boolean"},"private":{"type":"boolean"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]}},"required":["id","order","requestTypeId","customFieldId","required","private","parentId","dependsOnValue","createdAt","updatedAt","ticketField"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-type-custom-fields/dependent":{"post":{"operationId":"requestTypeCustomFields-createDependentFields","summary":"Create dependent request type custom fields","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentId":{"type":"string"},"childFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"system":{"type":"boolean"},"requestTypeId":{"type":"string"},"customFieldId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customField":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"config":{"anyOf":[{"type":"object","properties":{"fileTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"allowList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"blockList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"richText":{"type":"boolean"},"assetTypeIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"requesterAssetsOnly":{"type":"boolean"}}},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"order":{"type":"number"}},"required":["value"]}}},"required":["key","label","required","type"]},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["requestTypeId"]}}},"required":["parentId","childFields"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-type-custom-fields/validate-relationship":{"get":{"operationId":"requestTypeCustomFields-validateRelationship","summary":"Validate relationship between request type custom fields","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"fieldId","schema":{"type":"string"},"required":true},{"in":"query","name":"requestTypeId","schema":{"type":"string"},"required":true},{"in":"query","name":"parentId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"}},"required":["valid"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-type-custom-fields/relationships":{"put":{"operationId":"requestTypeCustomFields-bulkUpdateRelationships","summary":"Bulk update relationships of request type custom fields","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","parentId"]}}},"required":["updates"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types":{"get":{"operationId":"requestTypes-list","summary":"List request types","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"status","schema":{"type":"string","enum":["Draft","Published","Archived"]}},{"in":"query","name":"isPrivate","schema":{"type":"boolean"}},{"in":"query","name":"jobId","schema":{"type":"string"}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["request-type","collection"]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","parentId","parent","systemGenerated","tags","formEnabled","submitAnonymous","createdAt","updatedAt"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"requestTypes-create","summary":"Create a new request type","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"color":{"type":"string"},"emoji":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"systemGenerated":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"default":"request-type","type":"string","enum":["request-type","collection"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"submitAnonymous":{"type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/bulk":{"delete":{"operationId":"requestTypes-bulkDelete","summary":"Bulk delete request types","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true},{"in":"query","name":"deleteContents","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"requestTypes-bulkUpdate","summary":"Bulk update request types","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"featuredInPortal":{"type":"boolean"},"status":{"type":"string","enum":["Draft","Published","Archived"]}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/move":{"post":{"operationId":"requestTypes-move","summary":"Move a request type or collection into another collection","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/bulk-move":{"post":{"operationId":"requestTypes-bulkMove","summary":"Bulk move request types or collections into another collection","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ids","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/bulk-archive":{"post":{"operationId":"requestTypes-bulkArchive","summary":"Archive request types with reparenting in a single transaction","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"type":"array","items":{"type":"string"}},"includeContents":{"type":"boolean"}},"required":["ids","includeContents"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/duplicate":{"post":{"operationId":"requestTypes-duplicate","summary":"Duplicate a request type to another workspace within the same organization","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"targetWorkspaceId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentIds":{"type":"array","items":{"type":"string"}}},"required":["id","targetWorkspaceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/upload-icon-image":{"post":{"operationId":"requestTypes-uploadIconImage","summary":"Upload an icon image for a request type","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestTypeId":{"type":"string"},"image":{"type":"object","properties":{"base64":{"type":"string"},"fileName":{"type":"string"}}}},"required":["requestTypeId","image"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/snippets":{"get":{"operationId":"snippet-list","summary":"List snippets with optional filters","tags":["Snippets"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"workspaceId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","workspaceId","authorId","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"snippet-create","summary":"Create a new snippet","tags":["Snippets"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"content":{"type":"string","minLength":1}},"required":["name","content"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"workspaceId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","workspaceId","authorId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/slack/apps":{"get":{"operationId":"slack-getApps","summary":"Get all Slack apps for organization","tags":["Slack"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"appId":{"type":"string"},"botUserId":{"type":"string"},"authedUserId":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"teamDomain":{"type":"string"},"teamUrl":{"type":"string"},"organizationId":{"type":"string"},"isEnterpriseInstall":{"type":"boolean"},"enterpriseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enterpriseName":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowsAppId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowsAppSigningSecret":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"configSettings":{"type":"object","properties":{"syncGuestUsers":{"default":false,"type":"boolean"}},"required":["syncGuestUsers"],"additionalProperties":false},"metadata":{"anyOf":[{"type":"object","properties":{"isOutdated":{"type":"boolean"},"featureIssues":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["WORK_OBJECTS","FILE_ATTACHMENTS","GROUP_DMS","USER_GROUPS"]},"label":{"type":"string"},"errorMessage":{"type":"string"},"missingScopes":{"type":"array","items":{"type":"string"}}},"required":["key","label","errorMessage"],"additionalProperties":false}}},"additionalProperties":false},{"type":"null"}]}},"required":["id","appId","botUserId","authedUserId","teamId","teamName","teamDomain","teamUrl","organizationId","isEnterpriseInstall","enterpriseId","enterpriseName","workflowsAppId","workflowsAppSigningSecret","agentWorkspaceId","error","createdAt","updatedAt","deletedAt","configSettings"],"additionalProperties":false}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/slack/channels":{"get":{"operationId":"slack-getChannels","summary":"Get Slack channels for an app","tags":["Slack"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"appId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"is_channel":{"type":"boolean"},"is_group":{"type":"boolean"},"associatedChannel":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},"appId":{"type":"string"},"app":{},"private":{"type":"boolean"},"channelId":{"type":"string"},"channelName":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspace":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","name","emoji","workspaceId"],"additionalProperties":false},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextTeamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","appId","app","private","channelId","channelName","mirrorTs","workspaceId","workspace","queueId","queue","agentId","slackUserId","userId","ticketId","contextTeamId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"isAssociated":{"type":"boolean"}},"required":["isAssociated"],"additionalProperties":{}}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/slack/sync-my-status":{"post":{"operationId":"slack-syncMySlackStatus","summary":"Immediately sync the current user Slack status","tags":["Slack"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"activityStatus":{"type":"string"},"statusText":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusEmoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["activityStatus","statusText","statusEmoji","error"],"additionalProperties":false}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/slack-channels":{"get":{"operationId":"slackChannel-list","summary":"List slack channels","tags":["Slack Channel"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"appId","schema":{"type":"string"},"required":true},{"in":"query","name":"type","schema":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},"appId":{"type":"string"},"app":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"teamUrl":{"type":"string"},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["teamId","teamName","teamUrl","channelName"],"additionalProperties":false},"private":{"type":"boolean"},"channelId":{"type":"string"},"channelName":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"}},"required":["id","name","emoji","workspaceId"],"additionalProperties":false},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextTeamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","appId","app","private","channelId","channelName","mirrorTs","workspaceId","workspace","queueId","queue","agentId","slackUserId","userId","ticketId","contextTeamId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/slack-threads/by-thread-ts":{"get":{"operationId":"slackThread-get","summary":"Get Slack thread message and channel info by thread_ts","tags":["Slack Thread"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"threadTs","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["content","messageId","createdAt","author","channelName","channelId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/teams-conversations/by-message":{"get":{"operationId":"teamsConversation-get","summary":"Get Teams message and channel info by channel id + message id","tags":["Teams Conversation"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"channelId","schema":{"type":"string"},"required":true},{"in":"query","name":"messageId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"type":"string"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]},"channelId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["content","messageId","createdAt","author","channelName","channelId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/chatlog":{"get":{"operationId":"ticket-chatlogList","summary":"List tickets for chatlog with computed fields","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"assigneeId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"createdAt","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"openFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"priority","schema":{"anyOf":[{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},{"type":"null"}]}},{"in":"query","name":"queueId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"searchFields","schema":{"type":"array","items":{"type":"string","enum":["title","description","ticketNumber","queueName","authorName","tags","messages"]}}},{"in":"query","name":"slackMessageTs","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"starredBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"starredFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"statusId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"textFilter","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"unassignedFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"excludeTicketIds","schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},{"in":"query","name":"agentParticipated","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"includeUnpublished","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"agentId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"type":"string"}},{"in":"query","name":"ravFilters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"viewMode","schema":{"anyOf":[{"type":"string","enum":["list","table","kanban","inbox"]},{"type":"null"}]}},{"in":"query","name":"responseType","schema":{"default":"default","type":"string","enum":["default","thin","full","list"]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"focusTicketId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"upvoteCount":{"type":"number"},"downvoteCount":{"type":"number"},"firstMessageAuthor":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"firstMessageContent":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseType":{"type":"string","const":"default"},"focusPageIndex":{"default":-1,"type":"number"}},"required":["items","totalCount","responseType","focusPageIndex"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/scheduled-runs":{"get":{"operationId":"ticket-scheduledRunsList","summary":"List an agent's scheduled rule runs","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"agentId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"ruleId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"ruleId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets":{"get":{"operationId":"ticket-list","summary":"List tickets","description":"List and search tickets with filtering, sorting, and pagination. By default, tickets in Done or Closed status groups are excluded. Set openFilter=false to include all tickets regardless of status group.","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"assigneeId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"createdAt","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"openFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"priority","schema":{"anyOf":[{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},{"type":"null"}]}},{"in":"query","name":"queueId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"searchFields","schema":{"type":"array","items":{"type":"string","enum":["title","description","ticketNumber","queueName","authorName","tags","messages"]}}},{"in":"query","name":"slackMessageTs","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"starredBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"starredFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"statusId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"textFilter","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"unassignedFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"excludeTicketIds","schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},{"in":"query","name":"agentParticipated","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"includeUnpublished","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"agentId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"type":"string"}},{"in":"query","name":"ravFilters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"viewMode","schema":{"anyOf":[{"type":"string","enum":["list","table","kanban","inbox"]},{"type":"null"}]}},{"in":"query","name":"responseType","schema":{"default":"default","type":"string","enum":["default","thin","full","list"]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"anyOf":[{},{"type":"null"}]},"attributeFields":{"anyOf":[{},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"published":{"type":"boolean"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"workspaceId":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","emoji","type","workspaceId","name","workspace"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"csat":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["score","feedback"],"additionalProperties":false}},"parent":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["prefix","workspaceId"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}},"required":["id","title","number","statusId","queue"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["publishedAt","customFields","attributeFields","assignedAt","assigneeId","agentAssigneeId","authorId","shortId","code","description","dueAt","id","number","priority","published","queue","status","queueId","requesterId","requestType","source","type","statusId","title","requestTypeId","disableAIResponse","parentId","createdAt","updatedAt","snoozeUntil","approvedAt","private","declinedAt","startAt","followers","respondedAt","resolvedAt","closedAt","archivedAt","slackChannelId","approvers","slackThreads","csat","parent","children","tags","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","stars","shares","agentParticipated","lastAgentResponse","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseType":{"type":"string","const":"thin"}},"required":["items","totalCount","responseType"],"additionalProperties":false},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseType":{"type":"string","const":"default"}},"required":["items","totalCount","responseType"],"additionalProperties":false},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"shortId":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"private":{"type":"boolean"},"published":{"type":"boolean"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"queueId":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"anyOf":[{},{"type":"null"}]},"attributeFields":{"anyOf":[{},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}},"required":["id","title","number","statusId","queue"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"workspaceId":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","emoji","type","workspaceId","name","workspace"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"parent":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["prefix","workspaceId"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["score","feedback"],"additionalProperties":false}},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","number","shortId","code","title","description","priority","statusId","source","type","csatScore","private","published","archivedAt","queueId","parentId","requestTypeId","categoryId","assigneeId","agentAssigneeId","requesterId","authorId","approvalStatus","customFields","attributeFields","disableAIResponse","agentParticipated","lastAgentResponse","slackChannelId","followers","stars","children","createdAt","updatedAt","dueAt","startAt","approvedAt","declinedAt","approvalCompletedAt","snoozeUntil","publishedAt","assignedAt","respondedAt","resolvedAt","closedAt","queue","status","tags","parent","requestType","category","csat","metricValues","approvers","shares"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseType":{"type":"string","const":"list"}},"required":["items","totalCount","responseType"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticket-create","summary":"Create a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"publishedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assignedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{},"attributeFields":{},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"dueAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"id":{"type":"string"},"number":{"type":"number"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"private":{"type":"boolean"},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"snoozeUntil":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"source":{"anyOf":[{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"attachments":{"type":"array","items":{}},"title":{"default":"","type":"string"},"metadata":{},"requesterEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"createdAt":{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},"noDispatch":{"type":"boolean"}},"required":["priority"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/count":{"get":{"operationId":"ticket-count","summary":"Count tickets","description":"Count tickets matching the given filters. By default, tickets in Done or Closed status groups are excluded. Set openFilter=false to count all tickets regardless of status group.","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"assigneeId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"createdAt","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"openFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"priority","schema":{"anyOf":[{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},{"type":"null"}]}},{"in":"query","name":"queueId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"searchFields","schema":{"type":"array","items":{"type":"string","enum":["title","description","ticketNumber","queueName","authorName","tags","messages"]}}},{"in":"query","name":"slackMessageTs","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"starredBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"starredFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"statusId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"textFilter","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"unassignedFilter","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"excludeTicketIds","schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},{"in":"query","name":"agentParticipated","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"includeUnpublished","schema":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},{"in":"query","name":"agentId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"filters","schema":{"type":"string"}},{"in":"query","name":"ravFilters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"viewMode","schema":{"anyOf":[{"type":"string","enum":["list","table","kanban","inbox"]},{"type":"null"}]}},{"in":"query","name":"responseType","schema":{"default":"default","type":"string","enum":["default","thin","full","list"]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"totalCount":{"type":"number"}},"required":["totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/export":{"post":{"operationId":"ticket-export","summary":"Export tickets to CSV","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tableViewId":{"type":"string"},"filename":{"type":"string","minLength":1}},"required":["tableViewId","filename"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"csvContent":{"type":"string"},"filename":{"type":"string"},"recordCount":{"type":"number"}},"required":["csvContent","filename","recordCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/unreadCounts":{"get":{"operationId":"ticket-getUnreadCounts","summary":"Ticket unread message counts","tags":["Tickets"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"tableViewIds","schema":{"type":"array","items":{"description":"TableView ID","type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"unreadTicketsByTableViewId":{"type":"object","propertyNames":{"description":"Ticket ID. Object for faster lookup","type":"string"},"additionalProperties":{"type":"array","items":{"description":"Ticket ID. Object for faster lookup","type":"string"}}},"openTicketCountByTableViewId":{"description":"Tickets per view that are not Done or Closed, when the sidebar flag is on","type":"object","propertyNames":{"description":"Table view ID","type":"string"},"additionalProperties":{"description":"Ticket count for the view","type":"number"}}},"required":["unreadTicketsByTableViewId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/submit-form":{"post":{"operationId":"ticket-submitForm","summary":"Submit a form to create or update a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"requestTypeId":{"type":"string"},"formState":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterId":{"type":"string"},"queueId":{"type":"string"}},"required":["requestTypeId","formState"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/bulk":{"post":{"operationId":"ticket-bulkCreate","summary":"Create multiple tickets in bulk","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"publishedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assignedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{},"attributeFields":{},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"dueAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"id":{"type":"string"},"number":{"type":"number"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"private":{"type":"boolean"},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"snoozeUntil":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"source":{"anyOf":[{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"attachments":{"type":"array","items":{}},"title":{"default":"","type":"string"},"metadata":{},"requesterEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"createdAt":{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},"noDispatch":{"type":"boolean"}},"required":["priority"]}}},"required":["tickets"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}},"required":["tickets"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/import":{"post":{"operationId":"ticket-import","summary":"Import historical tickets","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"publishedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assignedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{},"attributeFields":{},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"dueAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"id":{"type":"string"},"number":{"type":"number"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"private":{"type":"boolean"},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"snoozeUntil":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"source":{"anyOf":[{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"attachments":{"type":"array","items":{}},"title":{"default":"","type":"string"},"metadata":{},"requesterEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"createdAt":{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},"noDispatch":{"type":"boolean"}},"required":["priority"]}}},"required":["tickets"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}},"required":["tickets"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/move":{"post":{"operationId":"ticket-move","summary":"Move a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"data":{"type":"object","properties":{"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"queueId":{"type":"string"},"parentId":{"type":"null"}},"required":["queueId"]}},"required":["id","data"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/bulk-move":{"post":{"operationId":"ticket-bulkMove","summary":"Bulk move tickets","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"maxItems":100,"type":"array","items":{"type":"string"}},"data":{"type":"object","properties":{"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"queueId":{"type":"string"},"parentId":{"type":"null"}},"required":["queueId"]}},"required":["ids","data"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/bulk-share":{"post":{"operationId":"ticket-bulkShare","summary":"Bulk share tickets","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"data":{"type":"object","properties":{"queueId":{"type":"string"}},"required":["queueId"]}},"required":["ids","data"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ticketIds":{"type":"array","items":{"type":"string"}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["ticketIds","shares"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/merge":{"post":{"operationId":"ticket-merge","summary":"Merge one or more source tickets into a primary ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"primaryId":{"type":"string","minLength":1},"sourceIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"forceInternal":{"type":"boolean"}},"required":["primaryId","sourceIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","mergedIntoId","mergedAt","mergedById"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/unmerge":{"post":{"operationId":"ticket-unmerge","summary":"Reverse a ticket merge","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","minLength":1}},"required":["sourceId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","mergedIntoId","mergedAt","mergedById"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/incidents":{"post":{"operationId":"ticket-createIncident","summary":"Create an incident tracker and link tickets to it","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"publishedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assignedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"attributeFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"dueAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"id":{"type":"string"},"number":{"type":"number"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"private":{"type":"boolean"},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"snoozeUntil":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"source":{"anyOf":[{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"attachments":{"type":"array","items":{}},"title":{"type":"string","minLength":1},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"requesterEmail":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"createdAt":{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},"noDispatch":{"type":"boolean"},"linkedTicketIds":{"default":[],"type":"array","items":{"type":"string","minLength":1}}},"required":["title"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/incidents/link":{"post":{"operationId":"ticket-linkToIncident","summary":"Link tickets to an incident tracker","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trackerId":{"type":"string","minLength":1},"ticketIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"move":{"type":"boolean"}},"required":["trackerId","ticketIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"trackerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketIds":{"type":"array","items":{"type":"string"}}},"required":["trackerId","ticketIds"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/incidents/unlink":{"post":{"operationId":"ticket-unlinkFromIncident","summary":"Unlink tickets from their incident tracker","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ticketIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"trackerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketIds":{"type":"array","items":{"type":"string"}}},"required":["trackerId","ticketIds"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/incidents/broadcast":{"post":{"operationId":"ticket-broadcastIncidentMessage","summary":"Broadcast a tracker message to every open linked ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trackerId":{"type":"string","minLength":1},"messageId":{"type":"string","minLength":1}},"required":["trackerId","messageId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"enqueued":{"type":"boolean"},"linkedCount":{"type":"number"}},"required":["enqueued","linkedCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/attachments":{"get":{"operationId":"ticket-listAttachments","summary":"List attachments for a ticket","tags":["Ticket Attachments"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ticketId","schema":{"type":"string"},"required":true},{"in":"query","name":"authorId","schema":{"type":"string"}},{"in":"query","name":"isDownloadable","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"downloadUrl":{"type":"string"},"previewUrl":{"type":"string"},"id":{"type":"string"},"filename":{"type":"string"},"location":{"type":"string"},"status":{"type":"string","enum":["processing","completed","failed","pending"]},"source":{"type":"string"},"ticketId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mimeType":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"anyOf":[{},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"placement":{"type":"string","enum":["TICKET","MESSAGE","CUSTOM_FIELD"]}},"required":["id","filename","location","status","source","ticketId","ticketMessageId","mimeType","createdAt","updatedAt","metadata","authorId","placement"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticket-createAttachment","summary":"Create a ticket attachment with upload URL","tags":["Ticket Attachments"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"mimeType":{"type":"string"},"metadata":{},"ticketMessageId":{"type":"string"},"filename":{"type":"string"},"placement":{"type":"string","enum":["TICKET","MESSAGE","CUSTOM_FIELD"]}},"required":["ticketId","mimeType","filename"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"mimeType":{"type":"string"},"location":{"type":"string"},"status":{"type":"string","enum":["processing","completed","failed","pending"]},"source":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"type":"string"},"uploadUrl":{"type":"string"},"previewUrl":{"type":"string"},"downloadUrl":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"placement":{"type":"string","enum":["TICKET","MESSAGE","CUSTOM_FIELD"]}},"required":["id","filename","mimeType","location","status","source","ticketMessageId","ticketId","uploadUrl","downloadUrl","authorId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/attachments/connect":{"post":{"operationId":"ticket-connectAttachments","summary":"Connect uploaded attachments to a ticket or message","tags":["Ticket Attachments"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"ticketMessageId":{"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}},"customFieldLinks":{"type":"array","items":{"type":"object","properties":{"customFieldId":{"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}}},"required":["customFieldId","attachmentIds"]}},"isFormSubmission":{"type":"boolean"}},"required":["ticketId","attachmentIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/attachments/archive":{"post":{"operationId":"ticket-archiveAttachments","summary":"Archive attachments from a ticket","tags":["Ticket Attachments"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}}},"required":["ticketId","attachmentIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/semantic-search":{"get":{"operationId":"ticket-semanticSearch","summary":"Search for semantically similar tickets","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"query","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"default":5,"type":"number","minimum":1,"maximum":20}},{"in":"query","name":"excludeTicketId","schema":{"type":"string"}},{"in":"query","name":"provider","schema":{"default":"openai","type":"string","enum":["openai"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"anyOf":[{},{"type":"null"}]},"attributeFields":{"anyOf":[{},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"published":{"type":"boolean"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"workspaceId":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","emoji","type","workspaceId","name","workspace"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"csat":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["score","feedback"],"additionalProperties":false}},"parent":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["prefix","workspaceId"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}},"required":["id","title","number","statusId","queue"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["publishedAt","customFields","attributeFields","assignedAt","assigneeId","agentAssigneeId","authorId","shortId","code","description","dueAt","id","number","priority","published","queue","status","queueId","requesterId","requestType","source","type","statusId","title","requestTypeId","disableAIResponse","parentId","createdAt","updatedAt","snoozeUntil","approvedAt","private","declinedAt","startAt","followers","respondedAt","resolvedAt","closedAt","archivedAt","slackChannelId","approvers","slackThreads","csat","parent","children","tags","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","stars","shares","agentParticipated","lastAgentResponse","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseType":{"type":"string","const":"thin"}},"required":["items","totalCount","responseType"],"additionalProperties":false},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseType":{"type":"string","const":"default"}},"required":["items","totalCount","responseType"],"additionalProperties":false},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"shortId":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"private":{"type":"boolean"},"published":{"type":"boolean"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"queueId":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"anyOf":[{},{"type":"null"}]},"attributeFields":{"anyOf":[{},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}},"required":["id","title","number","statusId","queue"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"workspaceId":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","emoji","type","workspaceId","name","workspace"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"parent":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["prefix","workspaceId"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["score","feedback"],"additionalProperties":false}},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","number","shortId","code","title","description","priority","statusId","source","type","csatScore","private","published","archivedAt","queueId","parentId","requestTypeId","categoryId","assigneeId","agentAssigneeId","requesterId","authorId","approvalStatus","customFields","attributeFields","disableAIResponse","agentParticipated","lastAgentResponse","slackChannelId","followers","stars","children","createdAt","updatedAt","dueAt","startAt","approvedAt","declinedAt","approvalCompletedAt","snoozeUntil","publishedAt","assignedAt","respondedAt","resolvedAt","closedAt","queue","status","tags","parent","requestType","category","csat","metricValues","approvers","shares"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseType":{"type":"string","const":"list"}},"required":["items","totalCount","responseType"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/find-duplicates":{"get":{"operationId":"ticket-findDuplicates","summary":"Find potential duplicate tickets based on semantic similarity and filters","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ticketId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"minSimilarityPercent","schema":{"default":60,"type":"number","minimum":0,"maximum":100}},{"in":"query","name":"limit","schema":{"default":10,"type":"number","minimum":1,"maximum":50}},{"in":"query","name":"provider","schema":{"default":"openai","type":"string","enum":["openai"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ticket":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"requesterId":{"type":"string"}},"required":["id","title","queueId","requesterId"],"additionalProperties":false},"duplicates":{"type":"array","items":{"type":"object","properties":{"ticket":{"type":"object","properties":{"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"anyOf":[{},{"type":"null"}]},"attributeFields":{"anyOf":[{},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"published":{"type":"boolean"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"workspaceId":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","emoji","type","workspaceId","name","workspace"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"csat":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["score","feedback"],"additionalProperties":false}},"parent":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["prefix","workspaceId"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}},"required":["id","title","number","statusId","queue"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["publishedAt","customFields","attributeFields","assignedAt","assigneeId","agentAssigneeId","authorId","shortId","code","description","dueAt","id","number","priority","published","queue","status","queueId","requesterId","requestType","source","type","statusId","title","requestTypeId","disableAIResponse","parentId","createdAt","updatedAt","snoozeUntil","approvedAt","private","declinedAt","startAt","followers","respondedAt","resolvedAt","closedAt","archivedAt","slackChannelId","approvers","slackThreads","csat","parent","children","tags","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","stars","shares","agentParticipated","lastAgentResponse","approvalRounds","assignee","requester","author"],"additionalProperties":false},"similarityPercent":{"type":"number","minimum":0,"maximum":100},"distance":{"type":"number","minimum":0,"maximum":2}},"required":["ticket","similarityPercent","distance"],"additionalProperties":false}},"total":{"type":"number"}},"required":["ticket","duplicates","total"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/descendent-tickets":{"post":{"operationId":"ticket-getDescendentTickets","summary":"Get all descendent tickets recursively for given ticket IDs","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"anyOf":[{},{"type":"null"}]},"attributeFields":{"anyOf":[{},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"published":{"type":"boolean"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"workspaceId":{"type":"string"},"name":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","emoji","type","workspaceId","name","workspace"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"csat":{"type":"array","items":{"type":"object","properties":{"score":{"type":"number"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["score","feedback"],"additionalProperties":false}},"parent":{"anyOf":[{"type":"object","properties":{"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["prefix","workspaceId"],"additionalProperties":false}},"required":["number","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}},"required":["id","title","number","statusId","queue"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string"}},"required":["id","name","color"],"additionalProperties":false}},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["publishedAt","customFields","attributeFields","assignedAt","assigneeId","agentAssigneeId","authorId","shortId","code","description","dueAt","id","number","priority","published","queue","status","queueId","requesterId","requestType","source","type","statusId","title","requestTypeId","disableAIResponse","parentId","createdAt","updatedAt","snoozeUntil","approvedAt","private","declinedAt","startAt","followers","respondedAt","resolvedAt","closedAt","archivedAt","slackChannelId","approvers","slackThreads","csat","parent","children","tags","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","stars","shares","agentParticipated","lastAgentResponse","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"count":{"type":"number"}},"required":["tickets","count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/generate-kb-article":{"post":{"operationId":"ticket-generateKBArticle","summary":"Generate a KB article from a ticket conversation","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string","minLength":1},"regenerate":{"default":false,"type":"boolean"}},"required":["ticketId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/kb-article-status":{"get":{"operationId":"ticket-getKBArticleStatus","summary":"Get unified KB article status including existing articles and job progress","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"no_article_or_job"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"article_exists"},"article":{"type":"object","properties":{"id":{"type":"string"},"kBId":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ticketEventId":{"type":"string"}},"required":["id","kBId","name","content","ticketEventId"],"additionalProperties":false}},"required":["status","article"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"generation_queued"},"jobId":{"type":"string"},"hasExistingArticle":{"type":"boolean"},"article":{"type":"object","properties":{"id":{"type":"string"},"kBId":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ticketEventId":{"type":"string"}},"required":["id","kBId","name","content","ticketEventId"],"additionalProperties":false}},"required":["status","jobId","hasExistingArticle"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"generation_active"},"jobId":{"type":"string"},"progress":{"type":"number"},"hasExistingArticle":{"type":"boolean"},"article":{"type":"object","properties":{"id":{"type":"string"},"kBId":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ticketEventId":{"type":"string"}},"required":["id","kBId","name","content","ticketEventId"],"additionalProperties":false}},"required":["status","jobId","hasExistingArticle"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"generation_completed"},"article":{"type":"object","properties":{"id":{"type":"string"},"kBId":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"ticketEventId":{"type":"string"}},"required":["id","kBId","name","content","ticketEventId"],"additionalProperties":false},"jobId":{"type":"string"}},"required":["status","article","jobId"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"generation_failed"},"error":{"type":"string"},"jobId":{"type":"string"}},"required":["status","error","jobId"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds":{"get":{"operationId":"ticketApprovalRound-list","summary":"Get ticket approval rounds","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ticketId","schema":{"type":"string"},"required":true},{"in":"query","name":"status","schema":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticketApprovalRound-create","summary":"Create ticket approval rounds","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"rounds":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"default":"PENDING","type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["name","policy","stageIndex","approvers"]}}},"required":["ticketId","rounds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"ticketApprovalRound-update","summary":"Update ticket approval rounds","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"rounds":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["id","name","policy","approvers"]}}},"required":["ticketId","rounds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds/sync":{"post":{"operationId":"ticketApprovalRound-sync","summary":"Sync (create/update/delete) all rounds for a ticket in bulk","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"required":["name","policy","stageIndex","approvers"]}}},"required":["ticketId","rounds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds/kickoff":{"post":{"operationId":"ticketApprovalRound-kickoff","summary":"Kickoff the approval process for a ticket","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"}},"required":["ticketId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds/force-approve":{"post":{"operationId":"ticketApprovalRound-forceApprove","summary":"Force approve all approval rounds for a ticket (workspace admin only)","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"}},"required":["ticketId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"approvedRoundsCount":{"type":"number"}},"required":["approvedRoundsCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds/force-reject":{"post":{"operationId":"ticketApprovalRound-forceReject","summary":"Force reject all approval rounds for a ticket (workspace admin only)","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"}},"required":["ticketId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"declinedRoundsCount":{"type":"number"}},"required":["declinedRoundsCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds/reset-approval":{"post":{"operationId":"ticketApprovalRound-reset","summary":"Reset the approval process for a ticket (workspace admin only)","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"}},"required":["ticketId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds/reset-round":{"post":{"operationId":"ticketApprovalRound-resetRound","summary":"Reset a single approval round (e.g. policy change mid-flight)","security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"roundId":{"type":"string"}},"required":["ticketId","approvers","roundId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-round-approvers":{"get":{"operationId":"ticketApprovalRoundApprover-list","summary":"List approvers for a round","tags":["Ticket Approval Round Approver"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"roundId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticketApprovalRoundApprover-create","summary":"Add an approver to a round","tags":["Ticket Approval Round Approver"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roundId":{"type":"string"},"userId":{"type":"string"},"status":{"default":"PENDING","type":"string","enum":["PENDING","APPROVED","DECLINED"]}},"required":["roundId","userId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-clustering/clusters/generate":{"post":{"operationId":"ticketClustering-generateTicketClusters","summary":"Generate or retrieve ticket clusters based on filter conditions","description":"Generates ticket clusters from filter conditions or returns cached results if available within 24 hours","tags":["Ticket Clustering"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"object","properties":{"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"openFilter":{"description":"When false, includes tickets in Done/Closed status groups. Defaults to true (excludes Done/Closed).","anyOf":[{"type":"boolean"},{"type":"null"}]},"priority":{"anyOf":[{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"search":{"anyOf":[{"type":"string"},{"type":"null"}]},"searchFields":{"type":"array","items":{"type":"string","enum":["title","description","ticketNumber","queueName","authorName","tags","messages"]}},"slackMessageTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"starredBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"starredFilter":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"textFilter":{"anyOf":[{"type":"string"},{"type":"null"}]},"unassignedFilter":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"excludeTicketIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"includeUnpublished":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"type":"string"},"ravFilters":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewMode":{"anyOf":[{"type":"string","enum":["list","table","kanban","inbox"]},{"type":"null"}]},"responseType":{"default":"default","type":"string","enum":["default","thin","full","list"]},"skip":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]},"offset":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]},"set":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"groupBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}}},"clusteringConfig":{"type":"object","properties":{"llmModel":{"type":"string"},"temperature":{"type":"number"},"minL1ClusterSizePct":{"type":"number"},"minL0ClusterSizePct":{"type":"number"},"outlierThreshold":{"type":"number"},"noiseBatchSize":{"type":"number"},"rebalanceThresholdPct":{"type":"number"},"embeddingModel":{"type":"string"},"predefined_l0_path":{"type":"string"}}}},"required":["filters"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"processing"},"workflowId":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","workflowId","createdAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"completed"},"l0_clusters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"cluster_id":{"type":"number"},"title":{"type":"string"},"ticket_count":{"type":"number"},"l1_cluster_count":{"type":"number"},"source_l1_cluster_ids":{"type":"array","items":{"type":"number"}}},"required":["cluster_id","title","ticket_count","l1_cluster_count","source_l1_cluster_ids"],"additionalProperties":false}},"l1_clusters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"cluster_id":{"type":"number"},"title":{"type":"string"},"ticket_count":{"type":"number"}},"required":["cluster_id","title","ticket_count"],"additionalProperties":false}},"workflowId":{"type":"string"},"createdAt":{"type":"string"},"completedAt":{"type":"string"},"totalTickets":{"type":"number"},"totalClusters":{"type":"number"}},"required":["status","l0_clusters","l1_clusters","workflowId","createdAt","completedAt","totalTickets","totalClusters"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"failed"},"workflowId":{"type":"string"},"error":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","workflowId","createdAt"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-clustering/clusters/check":{"post":{"operationId":"ticketClustering-checkExistingClusters","summary":"Check for existing ticket clusters","description":"Checks if clusters exist for the given filters without triggering generation","tags":["Ticket Clustering"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filters":{"type":"object","properties":{"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"openFilter":{"description":"When false, includes tickets in Done/Closed status groups. Defaults to true (excludes Done/Closed).","anyOf":[{"type":"boolean"},{"type":"null"}]},"priority":{"anyOf":[{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"search":{"anyOf":[{"type":"string"},{"type":"null"}]},"searchFields":{"type":"array","items":{"type":"string","enum":["title","description","ticketNumber","queueName","authorName","tags","messages"]}},"slackMessageTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"starredBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"starredFilter":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"textFilter":{"anyOf":[{"type":"string"},{"type":"null"}]},"unassignedFilter":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"excludeTicketIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"includeUnpublished":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"type":"string"},"ravFilters":{"anyOf":[{"type":"string"},{"type":"null"}]},"viewMode":{"anyOf":[{"type":"string","enum":["list","table","kanban","inbox"]},{"type":"null"}]},"responseType":{"default":"default","type":"string","enum":["default","thin","full","list"]},"skip":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]},"offset":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]},"set":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"groupBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}}}},"required":["filters"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"processing"},"workflowId":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","workflowId","createdAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"completed"},"l0_clusters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"cluster_id":{"type":"number"},"title":{"type":"string"},"ticket_count":{"type":"number"},"l1_cluster_count":{"type":"number"},"source_l1_cluster_ids":{"type":"array","items":{"type":"number"}}},"required":["cluster_id","title","ticket_count","l1_cluster_count","source_l1_cluster_ids"],"additionalProperties":false}},"l1_clusters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"cluster_id":{"type":"number"},"title":{"type":"string"},"ticket_count":{"type":"number"}},"required":["cluster_id","title","ticket_count"],"additionalProperties":false}},"workflowId":{"type":"string"},"createdAt":{"type":"string"},"completedAt":{"type":"string"},"totalTickets":{"type":"number"},"totalClusters":{"type":"number"}},"required":["status","l0_clusters","l1_clusters","workflowId","createdAt","completedAt","totalTickets","totalClusters"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"failed"},"workflowId":{"type":"string"},"error":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","workflowId","createdAt"],"additionalProperties":false}],"type":"object"},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-inactivity-policy":{"get":{"operationId":"ticketInactivity-get","summary":"Get the workspace's ticket inactivity policy","tags":["Ticket Inactivity"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inactivityHours":{"type":"number"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","enabled","inactivityHours","scheduleId"],"additionalProperties":false},{"type":"null"}]}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"ticketInactivity-upsert","summary":"Create or update the workspace's ticket inactivity policy","tags":["Ticket Inactivity"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"inactivityHours":{"type":"number","minimum":0.008333333333333333,"maximum":8760},"scheduleId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["enabled","inactivityHours"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"inactivityHours":{"type":"number"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","enabled","inactivityHours","scheduleId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-links/url-metadata":{"post":{"operationId":"ticketLink-fetchUrlMetadata","summary":"Fetch URL metadata (title) from a given URL","tags":["Ticket Link"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["title"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-links":{"get":{"operationId":"ticketLink-list","summary":"Get ticket links","tags":["Ticket Link"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ticketId","schema":{"type":"string"},"required":true},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"userId":{"type":"string"},"ticketId":{"type":"string"},"remoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationReplication":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","url","userId","ticketId","remoteId","createdAt","updatedAt","integrationReplication"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticketLink-create","summary":"Create a ticket link","tags":["Ticket Link"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"ticketId":{"type":"string"}},"required":["name","url","ticketId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"userId":{"type":"string"},"ticketId":{"type":"string"},"remoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationReplication":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","url","userId","ticketId","remoteId","createdAt","updatedAt","integrationReplication"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-messages":{"get":{"operationId":"ticketMessage-list","summary":"Get ticket messages","tags":["Ticket Message"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ticketId","schema":{"type":"string"},"required":true},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"author":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["firstName","lastName","email","image"],"additionalProperties":false},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackMessages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ts":{"type":"string"},"channelId":{"type":"string"},"teamId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"thread":{"anyOf":[{"type":"object","properties":{"messageTs":{"type":"string"}},"required":["messageTs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ts","channelId","teamId","ticketMessageId","threadId","thread","createdAt","updatedAt"],"additionalProperties":false}},"deleted":{"type":"boolean"},"reactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"type":"string"},"authorId":{"type":"string"},"ticketMessageId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","image"],"additionalProperties":false}},"required":["id","emoji","authorId","ticketMessageId","author"],"additionalProperties":false}},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailInReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"broadcastFromMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{},{"type":"null"}]},"aiGenerated":{"type":"boolean"},"agentResponseType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","content","authorId","author","ticketId","source","status","slackChannelId","slackMessages","deleted","reactions","emailMessageId","emailInReplyTo","private","aiGenerated","agentResponseType","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticketMessage-create","summary":"Create a ticket message","tags":["Ticket Message"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"slackTimestamp":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"broadcastToIncident":{"type":"boolean"},"noDispatch":{"type":"boolean"}},"required":["content","ticketId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"author":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["firstName","lastName","email","image"],"additionalProperties":false},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackMessages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ts":{"type":"string"},"channelId":{"type":"string"},"teamId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"thread":{"anyOf":[{"type":"object","properties":{"messageTs":{"type":"string"}},"required":["messageTs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ts","channelId","teamId","ticketMessageId","threadId","thread","createdAt","updatedAt"],"additionalProperties":false}},"deleted":{"type":"boolean"},"reactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"type":"string"},"authorId":{"type":"string"},"ticketMessageId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","image"],"additionalProperties":false}},"required":["id","emoji","authorId","ticketMessageId","author"],"additionalProperties":false}},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailInReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"broadcastFromMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{},{"type":"null"}]},"aiGenerated":{"type":"boolean"},"agentResponseType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","content","authorId","author","ticketId","source","status","slackChannelId","slackMessages","deleted","reactions","emailMessageId","emailInReplyTo","private","aiGenerated","agentResponseType","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-messages/import":{"post":{"operationId":"ticketMessage-import","summary":"Import historical ticket messages","tags":["Ticket Message"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"ticketId":{"type":"string"},"authorId":{"type":"string"},"private":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["content","ticketId"]}}},"required":["messages"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"author":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["firstName","lastName","email","image"],"additionalProperties":false},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackMessages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ts":{"type":"string"},"channelId":{"type":"string"},"teamId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"thread":{"anyOf":[{"type":"object","properties":{"messageTs":{"type":"string"}},"required":["messageTs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ts","channelId","teamId","ticketMessageId","threadId","thread","createdAt","updatedAt"],"additionalProperties":false}},"deleted":{"type":"boolean"},"reactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"type":"string"},"authorId":{"type":"string"},"ticketMessageId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","image"],"additionalProperties":false}},"required":["id","emoji","authorId","ticketMessageId","author"],"additionalProperties":false}},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailInReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"broadcastFromMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{},{"type":"null"}]},"aiGenerated":{"type":"boolean"},"agentResponseType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","content","authorId","author","ticketId","source","status","slackChannelId","slackMessages","deleted","reactions","emailMessageId","emailInReplyTo","private","aiGenerated","agentResponseType","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}},"required":["messages"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/statuses":{"get":{"operationId":"ticketStatus-list","summary":"List statuses","tags":["Status"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"statusGroupId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","requestTypes","statusGroup","statusGroupId","createdAt","updatedAt"],"additionalProperties":false}},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"color":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","color","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["statuses","groups"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticketStatus-create","summary":"Create a status","tags":["Status"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1},"statusGroupId":{"type":"string"},"requestTypeId":{"type":"string"}},"required":["label","statusGroupId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"statusGroupId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","requestTypes","statusGroup","statusGroupId","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"ticketStatus-update","summary":"Update a status","tags":["Status"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"label":{"type":"string","minLength":1}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"statusGroupId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","requestTypes","statusGroup","statusGroupId","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"ticketStatus-delete","summary":"Delete a status","tags":["Status"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"targetStatusId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"statusGroupId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","requestTypes","statusGroup","statusGroupId","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/statuses/ticket-counts":{"get":{"operationId":"ticketStatus-ticketCounts","summary":"Get ticket counts by status","tags":["Status"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string"}},{"in":"query","name":"requestTypeId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tags":{"get":{"operationId":"ticketTags-list","summary":"List ticket tags","tags":["Tags"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"workspaceId":{"type":"string"},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","color","workspaceId","aiGenerated","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"ticketTags-create","summary":"Create a tag","tags":["Tags"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"Tag name, e.g. \"vpn\" or \"c:acme-corp\". Must be unique in the workspace (case-insensitive).","type":"string","minLength":1},"description":{"description":"Optional one-line summary of what this tag marks. An empty string stores no description.","anyOf":[{"type":"string"},{"type":"null"}]},"color":{"description":"Tag color. Required.","type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["name","color"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"workspaceId":{"type":"string"},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","color","workspaceId","aiGenerated","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tags/bulk":{"delete":{"operationId":"ticketTags-bulkDelete","summary":"Delete multiple tags","tags":["Tags"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/users":{"get":{"operationId":"user-list","summary":"List users","tags":["User"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"email","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"excludeGuests","schema":{"type":"boolean"}},{"in":"query","name":"excludeBots","schema":{"type":"boolean"}},{"in":"query","name":"includeDeactivated","schema":{"type":"boolean"}},{"in":"query","name":"includedIds","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"user-create","summary":"Create a new user (admin only)","tags":["User"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"workspaceId":{"type":"string"},"workspaceRole":{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},"sendInvitation":{"default":true,"type":"boolean"}},"required":["email"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","email","firstName","lastName","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/user-groups":{"get":{"operationId":"userGroup-list","summary":"Get user groups with integration source metadata","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":10000,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"type":"string"}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"includeArchived","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"}},"required":["users"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"userIds":{"type":"array","items":{"type":"string"}},"workspaceIds":{"type":"array","items":{"type":"string"}},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"isImmutable":{"type":"boolean"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt","userIds","workspaceIds","integrationSource","isImmutable"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"userGroup-create","summary":"Create a user group","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"},"imageUrl":{"type":"string","format":"uri"},"userIds":{"type":"array","items":{"type":"string"}},"workspaceIds":{"type":"array","items":{"type":"string"}},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"}},"required":["users"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/user-groups/with-workspaces":{"get":{"operationId":"userGroup-listWithWorkspaces","summary":"Get user groups with workspace assignments (for organization-level management)","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":10000,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"type":"string"}},{"in":"query","name":"filters","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"includeArchived","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"},"workspaces":{"type":"number"}},"required":["users","workspaces"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","brandColor"],"additionalProperties":false}},"userIds":{"type":"array","items":{"type":"string"}},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"isImmutable":{"type":"boolean"}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt","workspaces","userIds","integrationSource","isImmutable"],"additionalProperties":false}},"nextCursor":{"type":"string"},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/user-groups/bulk":{"delete":{"operationId":"userGroup-bulkDelete","summary":"Delete multiple user groups","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webauthn/registration-options":{"post":{"operationId":"webAuthn-registrationOptions","summary":"Generate WebAuthn registration options","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webauthn/registration-verify":{"post":{"operationId":"webAuthn-registrationVerify","summary":"Verify WebAuthn registration response","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{},"name":{"type":"string"}},"required":["response"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"deviceType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","deviceType","createdAt","lastUsedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webauthn/authentication-options":{"post":{"operationId":"webAuthn-authenticationOptions","summary":"Generate WebAuthn authentication options","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webauthn/authentication-verify":{"post":{"operationId":"webAuthn-authenticationVerify","summary":"Verify WebAuthn authentication and get proof token","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{}},"required":["response"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"proofToken":{"type":"string"}},"required":["proofToken"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webauthn/credentials":{"get":{"operationId":"webAuthn-listCredentials","summary":"List registered WebAuthn credentials","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"deviceType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","deviceType","createdAt","lastUsedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webauthn/settings":{"get":{"operationId":"webAuthn-getSettings","summary":"Get workspace biometric approval settings","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"biometricApprovalEnabled":{"type":"boolean"}},"required":["biometricApprovalEnabled"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"webAuthn-updateSettings","summary":"Update workspace biometric approval settings","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"biometricApprovalEnabled":{"type":"boolean"}},"required":["biometricApprovalEnabled"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"biometricApprovalEnabled":{"type":"boolean"}},"required":["biometricApprovalEnabled"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webhooks":{"get":{"operationId":"webhook-list","summary":"List webhooks","tags":["webhooks"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"ids","schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"active","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string","enum":["Ticket","Message"]}},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","url","secret","active","eventTypes","workspaceId","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"webhook-create","summary":"Create a new webhook","tags":["webhooks"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"secret":{"type":"string"},"active":{"default":true,"type":"boolean"},"eventTypes":{"default":["Ticket","Message"],"type":"array","items":{"type":"string","enum":["Ticket","Message"]}}},"required":["url"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string","enum":["Ticket","Message"]}},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","url","secret","active","eventTypes","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows":{"post":{"operationId":"workflow-create","summary":"Create workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"collectionId":{"type":"string"},"authorId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"get":{"operationId":"workflow-list","summary":"List workflows","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrations":{"type":"array","items":{"type":"string"}},"countOfRuns":{"type":"number"},"lastRun":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","createdAt"],"additionalProperties":false}},"required":["id","name","isTemplate","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}},"total":{"type":"number"}},"required":["workflows","total"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/duplicate":{"post":{"operationId":"workflow-duplicate","summary":"Duplicate workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","collectionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/duplicate-to-workspace":{"post":{"operationId":"workflow-duplicateToWorkspace","summary":"Duplicate workflow to another workspace","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"targetWorkspaceId":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["id","targetWorkspaceId","name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/manual":{"get":{"operationId":"workflow-listManual","summary":"List agent trigger workflows","tags":["Workflow"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrations":{"type":"array","items":{"type":"string"}}},"required":["id","name","isTemplate","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/bulk":{"delete":{"operationId":"workflow-deleteBulk","summary":"Delete workflows","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/steps":{"post":{"operationId":"workflow-addStep","summary":"Add step","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}},"workflowId":{"type":"string"},"sourceId":{"type":"string"},"targetIds":{"type":"array","items":{"type":"string"}}},"required":["title","action","inputs","workflowId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"title":{"type":"string"}},"required":["name"],"additionalProperties":false},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"workflow-updateConnection","summary":"Update connection","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workflowId","sourceId","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{}},"required":["sourceId","targetId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"workflow-deleteSteps","summary":"Delete steps","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workflowId","schema":{"type":"string"},"required":true},{"in":"query","name":"stepIds","schema":{"type":"array","items":{"type":"string"}},"required":true},{"in":"query","name":"withChildren","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/attachments":{"post":{"operationId":"workflow-createAttachment","summary":"Create a workflow step attachment upload URL","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string","minLength":1},"stepId":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1},"mimeType":{"type":"string","minLength":1},"size":{"type":"integer","exclusiveMinimum":0,"maximum":7340032}},"required":["workflowId","stepId","filename","mimeType"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1},"mimeType":{"type":"string","minLength":1},"size":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"uploadUrl":{"type":"string"}},"required":["location","filename","mimeType","uploadUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/attachments/resolve":{"post":{"operationId":"workflow-resolveAttachments","summary":"Resolve workflow step attachments to download URLs","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attachments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"location":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1},"mimeType":{"type":"string","minLength":1},"size":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["location","filename","mimeType"]}}},"required":["attachments"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"location":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1},"mimeType":{"type":"string","minLength":1},"size":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"downloadUrl":{"type":"string"}},"required":["location","filename","mimeType","downloadUrl"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/steps/duplicate":{"post":{"operationId":"workflow-duplicateStep","summary":"Duplicate step","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string"},"stepId":{"type":"string"},"withChildren":{"default":false,"type":"boolean"},"destinationWorkflowId":{"description":"The ID of the workflow to duplicate the step into. Defaults to the workflowId.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["workflowId","stepId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/steps/reposition":{"post":{"operationId":"workflow-repositionStep","summary":"Reposition step","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workflowId":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"},"swapTargetId":{"type":"string"}},"required":["id","workflowId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/steps/connect":{"post":{"operationId":"workflow-connectSteps","summary":"Connect steps","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"},"label":{"type":"string"}},"required":["workflowId","sourceId","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/steps/disconnect":{"post":{"operationId":"workflow-disconnectSteps","summary":"Disconnect steps","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}},"required":["workflowId","sourceId","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/deactivate":{"post":{"operationId":"workflow-deactivate","summary":"Deactivate workflow(s)","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/pause":{"post":{"operationId":"workflow-pause","summary":"Pause workflow(s)","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["ids"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/revert":{"post":{"operationId":"workflow-revert","summary":"Revert workflow to version","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string"},"versionId":{"type":"string"}},"required":["workflowId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/runs":{"post":{"operationId":"workflow-getWorkflowRuns","summary":"Filter workflow runs","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skip":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]},"offset":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"limit":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]},"set":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"groupBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"groupDirection":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"search":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowIds":{"type":"array","items":{"type":"string"}},"collectionIds":{"type":"array","items":{"type":"string"}},"workflowDetails":{"type":"boolean"},"collectionDetails":{"type":"boolean"},"statuses":{"type":"array","items":{"type":"string","enum":["pending","running","completed","completed_with_errors","failed","cancelled","skipped"]}},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"since":{"type":"string"},"filters":{"anyOf":[{"type":"string"},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","completed_with_errors","failed","cancelled","skipped"]},"workflowId":{"type":"string"},"workflowVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"workflow":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"collection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","icon","color"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","description"],"additionalProperties":false},"workflowVersion":{"anyOf":[{"type":"object","properties":{"createdAt":{"type":"string"}},"required":["createdAt"],"additionalProperties":false},{"type":"null"}]},"ticket":{"anyOf":[{"type":"object","properties":{"shortId":{"type":"string"},"number":{"type":"number"},"queue":{"anyOf":[{"type":"object","properties":{"prefix":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["prefix","workspace"],"additionalProperties":false},{"type":"null"}]}},"required":["shortId","number","queue"],"additionalProperties":false},{"type":"null"}]}},"required":["id","status","workflowId","createdAt","updatedAt"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/templates/workspace-id":{"get":{"operationId":"workflow-template-getTemplateWorkspaceId","summary":"Get template workspace ID","tags":["Workflow"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/templates":{"get":{"operationId":"workflow-template-list","summary":"List template workflows","tags":["Workflow"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrations":{"type":"array","items":{"type":"string"}}},"required":["id","name","isTemplate","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/templates/save":{"post":{"operationId":"workflow-template-saveAsTemplate","summary":"Save workflow as template","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"default":true,"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/templates/duplicate":{"post":{"operationId":"workflow-template-duplicateFromTemplate","summary":"Duplicate workflow from template","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","collectionId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-collections":{"post":{"operationId":"workflowCollection-create","summary":"Create a new workflow collection","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentCollectionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string"},"parentCollectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowCount":{"type":"number"}},"required":["id","name","description","emoji","icon","color","createdAt","updatedAt","deletedAt","authorId","author","workspaceId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"get":{"operationId":"workflowCollection-list","summary":"List all workflow collections in the workspace","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"skip","schema":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},{"in":"query","name":"cursor","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"set","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"sortDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"groupBy","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"groupDirection","schema":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"workspaceId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"includeWorkflowCount","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string"},"parentCollectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowCount":{"type":"number"}},"required":["id","name","description","emoji","icon","color","createdAt","updatedAt","deletedAt","authorId","author","workspaceId"],"additionalProperties":false}},"totalCount":{"type":"number"},"nextCursor":{"type":"string"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-collections/bulk":{"delete":{"operationId":"workflowCollection-bulkDelete","summary":"Bulk delete workflow collections","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"ids","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"required":true},{"in":"query","name":"deleteContents","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-collections/list-all":{"get":{"operationId":"workflowCollection-listAll","summary":"List combined workflow collections and workflows","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"workspaceId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["collection","workflow"]},"isTemplate":{"type":"boolean"},"state":{"anyOf":[{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},{"type":"null"}]}},"required":["id","name","description","createdAt","updatedAt","authorId","parentId","type","isTemplate","state"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-collections/move":{"post":{"operationId":"workflowCollection-move","summary":"Move a workflow or workflow collection into another collection","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["collection","workflow"]},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-collections/move/bulk":{"post":{"operationId":"workflowCollection-bulkMove","summary":"Move multiple workflow resources into another collection","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["collection","workflow"]}},"required":["id","type"]}},"targetId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["resources","targetId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-config/apps":{"get":{"operationId":"workflowConfig-listApps","summary":"List apps with actions","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"group":{"type":"string"},"icon":{"type":"string"},"actions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Action","Activity","Conditional","Trigger"]},"group":{"type":"string"},"description":{"type":"string"},"title":{"type":"string"},"app":{"type":"string"},"inputs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}}},"outputs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}}},"hidden":{"type":"boolean"},"disabled":{"type":"boolean"},"disabledReason":{"type":"string"},"disabledType":{"type":"string","enum":["not_installed","restricted","config_gate"]},"version":{"type":"number"},"capabilities":{"type":"object","properties":{"canBranch":{"default":true,"type":"boolean"},"canHaveChildren":{"default":true,"type":"boolean"}},"required":["canBranch","canHaveChildren"],"additionalProperties":false}},"required":["name","type","inputs","outputs"],"additionalProperties":false}}},"required":["id","name","group","actions"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspaces":{"get":{"operationId":"workspace-list","summary":"List workspaces","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"query","name":"organizationId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"slackBotIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackEmojiActions":{},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackTriageChannels":{"type":"array","items":{"type":"object","properties":{"workspace":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"private":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},"channelId":{"type":"string"},"channelName":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","name","emoji","workspaceId"],"additionalProperties":false},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextTeamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"app":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"teamUrl":{"type":"string"},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["teamId","teamName","teamUrl","channelName"],"additionalProperties":false}},"required":["workspace","id","createdAt","updatedAt","private","deletedAt","type","channelId","channelName","mirrorTs","appId","workspaceId","queue","queueId","agentId","slackUserId","userId","ticketId","contextTeamId","app"],"additionalProperties":false}},"slugAliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","slug","workspaceId","organizationId","createdAt"],"additionalProperties":false}},"userGroupMemberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},"userGroupId":{"type":"string"}},"required":["id","role","userGroupId"],"additionalProperties":false}},"activePersonality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketAssigneeScope":{"type":"string"},"visibleInSlack":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"showInPortal":{"type":"boolean"},"showInDMs":{"type":"boolean"},"showSlackStatus":{"type":"boolean"},"showSlackPriority":{"type":"boolean"},"showSlackDescription":{"type":"boolean"},"showSlackAssignee":{"type":"boolean"},"showSlackRequester":{"type":"boolean"},"showSlackApprovers":{"type":"boolean"},"showSlackFollowers":{"type":"boolean"},"showSlackSource":{"type":"boolean"},"showSlackCustomFields":{"type":"boolean"},"slackFieldOrder":{},"enableBotUsers":{"type":"boolean"},"enableAdminApprovals":{"type":"boolean"},"allowRequesterAsApprover":{"type":"boolean"},"allowPostDecisionApprovalEdits":{"type":"boolean"},"enableReopenOnMessage":{"type":"boolean"},"closeTicketTaskPolicy":{"type":"string"},"customerPortalConfig":{},"biometricApprovalEnabled":{"type":"boolean"},"biometricWindowSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","ticketAssigneeScope","visibleInSlack","showInSlackAssistant","showInPortal","showInDMs","showSlackStatus","showSlackPriority","showSlackDescription","showSlackAssignee","showSlackRequester","showSlackApprovers","showSlackFollowers","showSlackSource","showSlackCustomFields","slackFieldOrder","enableBotUsers","enableAdminApprovals","allowRequesterAsApprover","allowPostDecisionApprovalEdits","enableReopenOnMessage","closeTicketTaskPolicy","customerPortalConfig","biometricApprovalEnabled","biometricWindowSeconds"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","description","organizationId","creatorId","ownerId","private","slackBotIconUrl","slackBotUsername","slackEmojiActions","brandIcon","brandColor","defaultQueueId","slackTriageChannels","slugAliases","userGroupMemberships","activePersonality","settings","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"workspace-create","summary":"Create a workspaces","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"slug":{"type":"string"},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"private":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","slug"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"slackBotIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackEmojiActions":{},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackTriageChannels":{"type":"array","items":{"type":"object","properties":{"workspace":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"private":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},"channelId":{"type":"string"},"channelName":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","name","emoji","workspaceId"],"additionalProperties":false},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextTeamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"app":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"teamUrl":{"type":"string"},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["teamId","teamName","teamUrl","channelName"],"additionalProperties":false}},"required":["workspace","id","createdAt","updatedAt","private","deletedAt","type","channelId","channelName","mirrorTs","appId","workspaceId","queue","queueId","agentId","slackUserId","userId","ticketId","contextTeamId","app"],"additionalProperties":false}},"slugAliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","slug","workspaceId","organizationId","createdAt"],"additionalProperties":false}},"userGroupMemberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},"userGroupId":{"type":"string"}},"required":["id","role","userGroupId"],"additionalProperties":false}},"activePersonality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketAssigneeScope":{"type":"string"},"visibleInSlack":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"showInPortal":{"type":"boolean"},"showInDMs":{"type":"boolean"},"showSlackStatus":{"type":"boolean"},"showSlackPriority":{"type":"boolean"},"showSlackDescription":{"type":"boolean"},"showSlackAssignee":{"type":"boolean"},"showSlackRequester":{"type":"boolean"},"showSlackApprovers":{"type":"boolean"},"showSlackFollowers":{"type":"boolean"},"showSlackSource":{"type":"boolean"},"showSlackCustomFields":{"type":"boolean"},"slackFieldOrder":{},"enableBotUsers":{"type":"boolean"},"enableAdminApprovals":{"type":"boolean"},"allowRequesterAsApprover":{"type":"boolean"},"allowPostDecisionApprovalEdits":{"type":"boolean"},"enableReopenOnMessage":{"type":"boolean"},"closeTicketTaskPolicy":{"type":"string"},"customerPortalConfig":{},"biometricApprovalEnabled":{"type":"boolean"},"biometricWindowSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","ticketAssigneeScope","visibleInSlack","showInSlackAssistant","showInPortal","showInDMs","showSlackStatus","showSlackPriority","showSlackDescription","showSlackAssignee","showSlackRequester","showSlackApprovers","showSlackFollowers","showSlackSource","showSlackCustomFields","slackFieldOrder","enableBotUsers","enableAdminApprovals","allowRequesterAsApprover","allowPostDecisionApprovalEdits","enableReopenOnMessage","closeTicketTaskPolicy","customerPortalConfig","biometricApprovalEnabled","biometricWindowSeconds"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","description","organizationId","creatorId","ownerId","private","slackBotIconUrl","slackBotUsername","slackEmojiActions","brandIcon","brandColor","defaultQueueId","slackTriageChannels","slugAliases","userGroupMemberships","activePersonality","settings","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspaces/people":{"get":{"operationId":"workspace-listPeople","summary":"Lists every workspace with its owner, admins and members","tags":["Workspace"],"security":[{"Authorization":[]}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"private":{"type":"boolean"},"creator":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false},"owner":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false},{"type":"null"}]},"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"required":["id","role","user"],"additionalProperties":false}}},"required":["id","name","slug","private","creator","owner","members"],"additionalProperties":false}}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace-custom-fields":{"get":{"operationId":"workspaceCustomFields-list","summary":"List ticket attributes for the workspace","tags":["Workspace Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","workspaceId","customField","customFieldId","createdAt","updatedAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"workspaceCustomFields-create","summary":"Mark a custom field as a ticket attribute","tags":["Workspace Custom Fields"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customFieldId":{"type":"string"},"order":{"type":"number"}},"required":["customFieldId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","workspaceId","customField","customFieldId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/customer-portal/submit-form":{"post":{"operationId":"customerPortal-submitForm","summary":"Submit a customer portal form","tags":["Customer Portal"],"security":[{"Authorization":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"requestTypeId":{"type":"string"},"customFields":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"categoryId":{"type":"string"}},"required":["ticketId","requestTypeId","customFields"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"ticketNumber":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queuePrefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusGroupLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ticketId","ticketNumber","title","shortId","queuePrefix","statusGroupLabel","workspaceSlug"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-levels/{id}":{"get":{"operationId":"accessLevel-get","summary":"Get an access level","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"},"applicationName":{"type":"string"},"applicationImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"applicationDomain":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatsUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt","applicationName","applicationImageUrl","applicationDomain"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"accessLevel-update","summary":"Update a single access level by id","tags":["Access Level"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignmentStrategy":{"default":"AutoApprove","type":"string","enum":["All","AutoApprove","RoundRobin"]},"approvalPolicy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"owners":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customAccessPolicy":{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"approverPolicy":{"anyOf":[{"type":"string","enum":["ALL","ANY","MAJORITY"]},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","durationMode"]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/access-policies/{id}":{"get":{"operationId":"accessPolicy-get","summary":"Get an access policy","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["standard","custom","external"]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"maximumDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string"},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"approverMode":{"type":"string","enum":["template","explicit"]},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"organizationId":{"type":"string"},"eligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"ineligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"applicationId":{"type":"string"},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationUserGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"application":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false}},"required":["id","name","description","order","applicationId","owners","ownerGroups","accessPolicyId","postProvisioningMessage","seatLimit","assignmentStrategy","provisioningMethod","integrationUserGroups","application"],"additionalProperties":false}},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","icon","color","isDefault","type","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","maximumDuration","ownerId","approvalTemplateId","approvalTemplate","approverMode","approverPolicy","roleBasedApprovers","approvers","approverGroups","organizationId","eligibleGroups","ineligibleGroups","accessLevels","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"accessPolicy-update","summary":"Update an access policy","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approverMode":{"type":"string","enum":["template","explicit"]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"approverPolicy":{"anyOf":[{"type":"string","enum":["ALL","ANY","MAJORITY"]},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}},"accessLevelIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["standard","custom","external"]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"maximumDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string"},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"approverMode":{"type":"string","enum":["template","explicit"]},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"organizationId":{"type":"string"},"eligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"ineligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"applicationId":{"type":"string"},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationUserGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"application":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false}},"required":["id","name","description","order","applicationId","owners","ownerGroups","accessPolicyId","postProvisioningMessage","seatLimit","assignmentStrategy","provisioningMethod","integrationUserGroups","application"],"additionalProperties":false}},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","icon","color","isDefault","type","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","maximumDuration","ownerId","approvalTemplateId","approvalTemplate","approverMode","approverPolicy","roleBasedApprovers","approvers","approverGroups","organizationId","eligibleGroups","ineligibleGroups","accessLevels","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"accessPolicy-delete","summary":"Delete an access policy","tags":["Access Policy"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"type":{"type":"string","enum":["standard","custom","external"]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"maximumDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalTemplate":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string"},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"approverMode":{"type":"string","enum":["template","explicit"]},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji"],"additionalProperties":false}},"organizationId":{"type":"string"},"eligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"ineligibleGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroup":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","imageUrl","icon","color","emoji","archivedAt","integrationGroup"],"additionalProperties":false}},"accessLevels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"applicationId":{"type":"string"},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationUserGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"application":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","domain","imageUrl"],"additionalProperties":false}},"required":["id","name","description","order","applicationId","owners","ownerGroups","accessPolicyId","postProvisioningMessage","seatLimit","assignmentStrategy","provisioningMethod","integrationUserGroups","application"],"additionalProperties":false}},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","icon","color","isDefault","type","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","maximumDuration","ownerId","approvalTemplateId","approvalTemplate","approverMode","approverPolicy","roleBasedApprovers","approvers","approverGroups","organizationId","eligibleGroups","ineligibleGroups","accessLevels","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{id}":{"get":{"operationId":"agentModel-get","summary":"Get Agent by ID","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"personalityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"version":{"type":"number"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string"},"threadedMessageBehavior":{"type":"string"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"number"},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"number"},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"anyOf":[{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"tools":{"type":"array","items":{"type":"string"}},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false},"personality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","emoji","color","description","icon"],"additionalProperties":false}}},"required":["id","name","prefix","emoji","system","requestTypes"],"additionalProperties":false}},"kBs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"system":{"type":"boolean"},"lastSyncTS":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"global":{"type":"boolean"},"_count":{"type":"object","properties":{"kBDocuments":{"type":"number"}},"required":["kBDocuments"],"additionalProperties":false}},"required":["id","name","system","lastSyncTS","global","_count"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"system":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{},"options":{"type":"array","items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","system","type","config","options","createdAt","updatedAt","_count"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","private","required","ticketField","requestTypeId","customFieldId","customField","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","name","emoji","color","description","icon","aiExamples","customFields"],"additionalProperties":false}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"}},"required":["id","name","description","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","customPrompt","escalationInstructions","imageUrl","workspaceId","personalityId","enabled","version","respondOnMessage","respondOnMention","onlyRespondToRequests","channelMessageBehavior","threadedMessageBehavior","autoClassify","autoTag","negativeFeedbackAutoCreate","autoEscalate","respondOnPublishedTickets","aiAutoRespondEmail","aiAutoRespondIntegration","aiAutoRespondDelay","autoSubmitForm","conversationalFormFilling","conversationalFormFillingThreshold","showSlackSource","showSlackFeedback","showSlackCreateTicketButton","settings","tools","botUserId","botUser","workspace","personality","queues","kBs","requestTypes","workflows","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"agentModel-update","summary":"Update an existing Agent","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"type":"string","format":"uri"},"image":{"type":"object","properties":{"base64":{"type":"string"},"fileName":{"type":"string"}}},"enabled":{"type":"boolean"},"respondOnMessage":{"type":"string","enum":["all-messages","channel-messages","no-messages"]},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string","enum":["all","requests","mentions"]},"threadedMessageBehavior":{"type":"string","enum":["all","mentions","smart"]},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"integer","minimum":0,"maximum":300},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}}},"tools":{"type":"array","items":{"type":"string"}},"queueIds":{"type":"array","items":{"type":"string"}},"kbIds":{"type":"array","items":{"type":"string"}},"requestTypeIds":{"type":"array","items":{"type":"string"}},"workflowIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"personalityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"version":{"type":"number"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string"},"threadedMessageBehavior":{"type":"string"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"number"},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"number"},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"anyOf":[{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"tools":{"type":"array","items":{"type":"string"}},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false},"personality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","emoji","color","description","icon"],"additionalProperties":false}}},"required":["id","name","prefix","emoji","system","requestTypes"],"additionalProperties":false}},"kBs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"system":{"type":"boolean"},"lastSyncTS":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"global":{"type":"boolean"},"_count":{"type":"object","properties":{"kBDocuments":{"type":"number"}},"required":["kBDocuments"],"additionalProperties":false}},"required":["id","name","system","lastSyncTS","global","_count"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"system":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{},"options":{"type":"array","items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","system","type","config","options","createdAt","updatedAt","_count"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","private","required","ticketField","requestTypeId","customFieldId","customField","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","name","emoji","color","description","icon","aiExamples","customFields"],"additionalProperties":false}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"}},"required":["id","name","description","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","customPrompt","escalationInstructions","imageUrl","workspaceId","personalityId","enabled","version","respondOnMessage","respondOnMention","onlyRespondToRequests","channelMessageBehavior","threadedMessageBehavior","autoClassify","autoTag","negativeFeedbackAutoCreate","autoEscalate","respondOnPublishedTickets","aiAutoRespondEmail","aiAutoRespondIntegration","aiAutoRespondDelay","autoSubmitForm","conversationalFormFilling","conversationalFormFillingThreshold","showSlackSource","showSlackFeedback","showSlackCreateTicketButton","settings","tools","botUserId","botUser","workspace","personality","queues","kBs","requestTypes","workflows","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"agentModel-delete","summary":"Delete an Agent","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"personalityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"version":{"type":"number"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string"},"threadedMessageBehavior":{"type":"string"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"number"},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"number"},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"anyOf":[{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"tools":{"type":"array","items":{"type":"string"}},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false},"personality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","emoji","color","description","icon"],"additionalProperties":false}}},"required":["id","name","prefix","emoji","system","requestTypes"],"additionalProperties":false}},"kBs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"system":{"type":"boolean"},"lastSyncTS":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"global":{"type":"boolean"},"_count":{"type":"object","properties":{"kBDocuments":{"type":"number"}},"required":["kBDocuments"],"additionalProperties":false}},"required":["id","name","system","lastSyncTS","global","_count"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"system":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{},"options":{"type":"array","items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","system","type","config","options","createdAt","updatedAt","_count"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","private","required","ticketField","requestTypeId","customFieldId","customField","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","name","emoji","color","description","icon","aiExamples","customFields"],"additionalProperties":false}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"}},"required":["id","name","description","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","customPrompt","escalationInstructions","imageUrl","workspaceId","personalityId","enabled","version","respondOnMessage","respondOnMention","onlyRespondToRequests","channelMessageBehavior","threadedMessageBehavior","autoClassify","autoTag","negativeFeedbackAutoCreate","autoEscalate","respondOnPublishedTickets","aiAutoRespondEmail","aiAutoRespondIntegration","aiAutoRespondDelay","autoSubmitForm","conversationalFormFilling","conversationalFormFillingThreshold","showSlackSource","showSlackFeedback","showSlackCreateTicketButton","settings","tools","botUserId","botUser","workspace","personality","queues","kBs","requestTypes","workflows","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{agentId}/upgrade/preview":{"post":{"operationId":"agentModel-previewUpgrade","summary":"Preview upgrading an agent to the latest version","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"agentId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"sourceAgentId":{"type":"string"},"targetVersion":{"type":"number"},"rulePlans":{"type":"array","items":{"type":"object","properties":{"sourceRuleId":{"type":"string"},"title":{"type":"string"},"action":{"type":"string","enum":["reattach","duplicate"]},"unavailableTools":{"type":"array","items":{"type":"object","properties":{"toolKey":{"type":"string"},"label":{"type":"string"}},"required":["toolKey","label"],"additionalProperties":false}}},"required":["sourceRuleId","title","action","unavailableTools"],"additionalProperties":false}},"agentLevelUnavailableTools":{"type":"array","items":{"type":"object","properties":{"toolKey":{"type":"string"},"label":{"type":"string"}},"required":["toolKey","label"],"additionalProperties":false}},"autoResolvedTools":{"type":"array","items":{"type":"object","properties":{"toolKey":{"type":"string"},"label":{"type":"string"},"replacementToolKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"replacementLabel":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["toolKey","label","replacementToolKey","replacementLabel"],"additionalProperties":false}},"availableTargetTools":{"type":"array","items":{"type":"object","properties":{"toolKey":{"type":"string"},"label":{"type":"string"}},"required":["toolKey","label"],"additionalProperties":false}},"suggestedName":{"type":"string"}},"required":["sourceAgentId","targetVersion","rulePlans","agentLevelUnavailableTools","autoResolvedTools","availableTargetTools","suggestedName"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{agentId}/upgrade":{"post":{"operationId":"agentModel-upgradeAgent","summary":"Upgrade an agent to the latest version (creates a disabled copy)","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"agentId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toolMappings":{"default":[],"type":"array","items":{"type":"object","properties":{"toolKey":{"type":"string"},"replacementToolKey":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["toolKey","replacementToolKey"]}},"name":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"newAgentId":{"type":"string"},"ruleResults":{"type":"array","items":{"type":"object","properties":{"sourceRuleId":{"type":"string"},"action":{"type":"string","enum":["reattached","duplicated"]},"newRuleId":{"type":"string"},"needsReview":{"type":"boolean"},"changes":{"type":"array","items":{"type":"string"}}},"required":["sourceRuleId","action","needsReview","changes"],"additionalProperties":false}},"remappedTools":{"type":"array","items":{"type":"object","properties":{"toolKey":{"type":"string"},"replacedWith":{"type":"string"}},"required":["toolKey","replacedWith"],"additionalProperties":false}},"droppedTools":{"type":"array","items":{"type":"string"}}},"required":["newAgentId","ruleResults","remappedTools","droppedTools"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{id}/personality":{"put":{"operationId":"agentModel-updatePersonality","summary":"Update an Agent's Personality (per-agent copy)","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"persona":{"anyOf":[{"type":"string","enum":["generalist","customer-support","technical-support","sales-assistant","hr-assistant","knowledge-expert"]},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"customPrompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationInstructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"personalityId":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"version":{"type":"number"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"channelMessageBehavior":{"type":"string"},"threadedMessageBehavior":{"type":"string"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"autoEscalate":{"type":"boolean"},"respondOnPublishedTickets":{"type":"boolean"},"aiAutoRespondEmail":{"type":"boolean"},"aiAutoRespondIntegration":{"type":"boolean"},"aiAutoRespondDelay":{"type":"number"},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"number"},"showSlackSource":{"type":"boolean"},"showSlackFeedback":{"type":"boolean"},"showSlackCreateTicketButton":{"type":"boolean"},"settings":{"anyOf":[{"type":"object","properties":{"maxIterations":{"type":"number","minimum":1,"maximum":50},"autoSubmitForm":{"type":"boolean"},"conversationalFormFilling":{"type":"boolean"},"conversationalFormFillingThreshold":{"type":"integer","minimum":1,"maximum":20},"conditionalFields":{"type":"boolean"},"softwareAccessRequestsEnabled":{"type":"boolean"},"respondToBotUsers":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"tools":{"type":"array","items":{"type":"string"}},"botUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"botUser":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false},{"type":"null"}]},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false},"personality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"queues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"emoji":{"type":"string"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","emoji","color","description","icon"],"additionalProperties":false}}},"required":["id","name","prefix","emoji","system","requestTypes"],"additionalProperties":false}},"kBs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"system":{"type":"boolean"},"lastSyncTS":{"anyOf":[{"type":"integer","format":"int64"},{"type":"null"}]},"global":{"type":"boolean"},"_count":{"type":"object","properties":{"kBDocuments":{"type":"number"}},"required":["kBDocuments"],"additionalProperties":false}},"required":["id","name","system","lastSyncTS","global","_count"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"requestTypeId":{"type":"string"},"customFieldId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"system":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{},"options":{"type":"array","items":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","system","type","config","options","createdAt","updatedAt","_count"],"additionalProperties":false},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","private","required","ticketField","requestTypeId","customFieldId","customField","parentId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","name","emoji","color","description","icon","aiExamples","customFields"],"additionalProperties":false}},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"}},"required":["id","name","description","state"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","customPrompt","escalationInstructions","imageUrl","workspaceId","personalityId","enabled","version","respondOnMessage","respondOnMention","onlyRespondToRequests","channelMessageBehavior","threadedMessageBehavior","autoClassify","autoTag","negativeFeedbackAutoCreate","autoEscalate","respondOnPublishedTickets","aiAutoRespondEmail","aiAutoRespondIntegration","aiAutoRespondDelay","autoSubmitForm","conversationalFormFilling","conversationalFormFillingThreshold","showSlackSource","showSlackFeedback","showSlackCreateTicketButton","settings","tools","botUserId","botUser","workspace","personality","queues","kBs","requestTypes","workflows","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{agentId}/tools/execute":{"post":{"operationId":"agentModel-executeTool","summary":"Execute a tool for an agent","tags":["Agents"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"agentId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"integrationApp":{"type":"string"},"toolName":{"type":"string"},"input":{},"ticketId":{"type":"string"},"traceId":{"type":"string"}},"required":["integrationApp","toolName","input"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string"}},"required":["result"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{agentId}/rules":{"get":{"operationId":"agentModel-listAgentRules","summary":"List rules attached to an agent","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"agentId","schema":{"type":"string"},"required":true},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["title","description","agentsCount","createdAt","updatedAt"]}},{"in":"query","name":"sortDirection","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"agentRelations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"enabled":{"type":"boolean"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","agentId","enabled","agent"],"additionalProperties":false}},"_count":{"type":"object","properties":{"agentRelations":{"type":"number"}},"required":["agentRelations"],"additionalProperties":false}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt","agentRelations"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/rules/{id}":{"get":{"operationId":"agentModel-getRule","summary":"Get a rule by ID","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"agentRelations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"enabled":{"type":"boolean"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["id","agentId","enabled","agent"],"additionalProperties":false}},"_count":{"type":"object","properties":{"agentRelations":{"type":"number"}},"required":["agentRelations"],"additionalProperties":false}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt","agentRelations"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"agentModel-updateRule","summary":"Update an existing rule","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"description":{"type":"string"},"content":{"type":"string","minLength":1},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroupIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"agentModel-deleteRule","summary":"Delete a rule","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/rules/{ruleId}/executions":{"get":{"operationId":"agentModel-listRuleExecutions","summary":"List the runs that executed a rule, with the version each ran","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"ruleId","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"anyOf":[{"default":100,"type":"number","minimum":1,"maximum":10000},{"type":"null"}]}},{"in":"query","name":"offset","schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ruleId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"traceId":{"type":"string"},"source":{"type":"string","enum":["MATCHED","CRON","WEBHOOK","MANUAL","EVENT","ACTIVATION_REPLY","APPROVAL_REPLAY"]},"createdAt":{"type":"string"},"ruleVersion":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","number","createdAt"],"additionalProperties":false},"isCurrentVersion":{"type":"boolean"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false},"requester":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"venue":{"anyOf":[{"type":"object","properties":{"source":{"type":"string"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","detail"],"additionalProperties":false},{"type":"null"}]},"triggerMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackReply":{"anyOf":[{"type":"object","properties":{"ts":{"type":"string"},"channelId":{"type":"string"},"teamId":{"type":"string"},"appId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadTs":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ts","channelId","teamId","appId","threadTs"],"additionalProperties":false},{"type":"null"}]},"availableTools":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationApp":{"type":"string"}},"required":["name","title","integrationApp"],"additionalProperties":false}},{"type":"null"}]},"ticket":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"shortId":{"type":"string"},"queue":{"type":"object","properties":{"prefix":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["prefix","workspace"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","number","shortId","queue","status"],"additionalProperties":false}},"required":["id","ruleId","ticketMessageId","traceId","source","createdAt","ruleVersion","isCurrentVersion","agent","requester","venue","triggerMessage","slackReply","availableTools","ticket"],"additionalProperties":false}},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/rules/{id}/detach-and-delete":{"delete":{"operationId":"agentModel-detachAndDeleteRule","summary":"Detach a rule from all agents and delete it","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/rules/{ruleId}/duplicate":{"post":{"operationId":"agentModel-duplicateRule","summary":"Duplicate an agent rule to another agent","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"ruleId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetAgentId":{"type":"string"},"title":{"type":"string"}},"required":["targetAgentId","title"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"needsReview":{"type":"boolean"},"reviewReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string","enum":["OrganizationMembers","Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"workspaceId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","firstName","lastName","image"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","title","description","content","version","definition","needsReview","reviewReason","audienceType","allowedGroups","workspaceId","userId","user","authorId","author","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agent-tool-audit-events/by-message/{messageId}":{"get":{"operationId":"agentToolAuditEvent-getByMessage","summary":"Get audit events for a specific message","tags":["Agent Tool Audit Event"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"messageId","schema":{"type":"string","format":"cuid","pattern":"^[cC][^\\s-]{8,}$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"traceId":{"type":"string"},"toolRunId":{"type":"string"},"integrationApp":{"type":"string"},"toolName":{"type":"string"},"toolTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolIntegrationLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"string"},"status":{"type":"string"},"level":{"type":"string"},"message":{"type":"string"},"data":{"anyOf":[{},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","traceId","toolRunId","integrationApp","toolName","toolTitle","toolIntegrationLabel","event","status","level","message","data","durationMs","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agent-tool-audit-events/by-trace/{traceId}":{"get":{"operationId":"agentToolAuditEvent-getByTrace","summary":"Get audit events for a specific trace","tags":["Agent Tool Audit Event"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"traceId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"traceId":{"type":"string"},"toolRunId":{"type":"string"},"integrationApp":{"type":"string"},"toolName":{"type":"string"},"toolTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolIntegrationLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"string"},"status":{"type":"string"},"level":{"type":"string"},"message":{"type":"string"},"data":{"anyOf":[{},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","traceId","toolRunId","integrationApp","toolName","toolTitle","toolIntegrationLabel","event","status","level","message","data","durationMs","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agent-tool-audit-events/by-ticket/{ticketId}":{"get":{"operationId":"agentToolAuditEvent-getByTicket","summary":"Get audit events for a specific ticket","tags":["Agent Tool Audit Event"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"ticketId","schema":{"type":"string","format":"cuid","pattern":"^[cC][^\\s-]{8,}$"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"traceId":{"type":"string"},"toolRunId":{"type":"string"},"integrationApp":{"type":"string"},"toolName":{"type":"string"},"toolTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"toolIntegrationLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"event":{"type":"string"},"status":{"type":"string"},"level":{"type":"string"},"message":{"type":"string"},"data":{"anyOf":[{},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","traceId","toolRunId","integrationApp","toolName","toolTitle","toolIntegrationLabel","event","status","level","message","data","durationMs","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/admin-audit-events/{id}":{"get":{"operationId":"adminAuditEvent-get","summary":"Get a single admin audit event by ID","tags":["Admin Audit Events"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"default":false,"type":"boolean"}},"required":["id","firstName","lastName","email","image","isBot"],"additionalProperties":false},"organizationId":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resourceType":{"type":"string"},"resourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"resource":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"},"imageUrl":{"type":"string"},"integrationApp":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}]},"eventName":{"type":"string"},"trpcPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"path":{"anyOf":[{"type":"string"},{"type":"null"}]},"method":{"anyOf":[{"type":"string"},{"type":"null"}]},"ipAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"errorMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"anyOf":[{"type":"string","enum":["integration"]},{"type":"null"}]},"actorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"},"imageUrl":{"type":"string"},"integrationApp":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}]},"inputData":{"anyOf":[{},{"type":"null"}]},"outputData":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","userId","user","organizationId","workspaceId","resourceType","resourceId","resource","eventName","ipAddress","userAgent","status","errorMessage","actorType","actorId","actor","inputData","outputData","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ai-brief-schedules/{id}":{"get":{"operationId":"aiBriefSchedule-byId","summary":"Get AI brief schedule by ID","tags":["AI Brief Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"dashboardId":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"slackChannelIds":{"type":"array","items":{"type":"string"}},"time":{"type":"string"},"day":{"anyOf":[{"type":"number"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextScheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","dashboardId","workspaceId","organizationId","userId","cadence","slackChannelIds","time","day","prompt","scheduleId","isActive","lastRunAt","nextScheduledAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"aiBriefSchedule-update","summary":"Update AI brief schedule","tags":["AI Brief Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"slackChannelIds":{"minItems":1,"type":"array","items":{"type":"string"}},"time":{"type":"string","pattern":"^([0-1][0-9]|2[0-3]):[0-5][0-9]$"},"day":{"type":"integer","minimum":0,"maximum":31},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"dashboardId":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"slackChannelIds":{"type":"array","items":{"type":"string"}},"time":{"type":"string"},"day":{"anyOf":[{"type":"number"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextScheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","dashboardId","workspaceId","organizationId","userId","cadence","slackChannelIds","time","day","prompt","scheduleId","isActive","lastRunAt","nextScheduledAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"aiBriefSchedule-delete","summary":"Delete AI brief schedule","tags":["AI Brief Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ai-brief-schedules/dashboard/{dashboardId}":{"get":{"operationId":"aiBriefSchedule-byDashboardId","summary":"Get AI brief schedule by dashboard ID","tags":["AI Brief Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"dashboardId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"dashboardId":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"cadence":{"type":"string","enum":["daily","weekly","monthly"]},"slackChannelIds":{"type":"array","items":{"type":"string"}},"time":{"type":"string"},"day":{"anyOf":[{"type":"number"},{"type":"null"}]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"nextScheduledAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","dashboardId","workspaceId","organizationId","userId","cadence","slackChannelIds","time","day","prompt","scheduleId","isActive","lastRunAt","nextScheduledAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/approval-templates/{id}":{"get":{"operationId":"approvalTemplate-get","summary":"Get an approval template","tags":["Approval Templates"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"approvalTemplate-update","summary":"Update an approval template","tags":["Approval Templates"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"rounds":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"policy":{"default":"ANY","type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"id":{"type":"string"}},"required":["name","stageIndex","approvers"]}},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"approvalTemplate-delete","summary":"Delete an approval template","tags":["Approval Templates"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"rounds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"roleBasedApprovers":{"type":"array","items":{"type":"string"}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","templateId","name","policy","stageIndex","roleBasedApprovers","approvers","approverGroups","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","organizationId","workspaces","rounds","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/applications/{id}":{"get":{"operationId":"application-byId","summary":"Get application by ID","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","INACTIVE","DELETED"]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"entitlementCount":{"type":"number"},"accessLevels":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt"],"additionalProperties":false}},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationApplicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"externalGroupId":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"userGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","externalGroupId","metadata"],"additionalProperties":false}},"supportedAccessProvisioningMethods":{"type":"array","items":{"type":"string","enum":["group","application","workflow","manual","external"]}}},"required":["id","name","app","integrationGroups"],"additionalProperties":false}},"required":["id","name","displayName","domain","imageUrl","price","status","provisioningMethod","details","postProvisioningMessage","owners","ownerGroups","approvers","approverGroups","organizationId","createdAt","updatedAt","archivedAt","accessLevels","workspaces","assignmentStrategy","integrationApplicationId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"application-update","summary":"Update an application","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"details":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"owners":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"approvers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["AutoApprove","RoundRobin","All"]},{"type":"null"}]},"provisioningMethod":{"anyOf":[{"type":"string","enum":["group","application","workflow","manual","external"]},{"type":"null"}]},"workspaces":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"archived":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string","enum":["ACTIVE","INACTIVE","DELETED"]},"provisioningMethod":{"anyOf":[{"type":"string"},{"type":"null"}]},"details":{"anyOf":[{"type":"string"},{"type":"null"}]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"entitlementCount":{"type":"number"},"accessLevels":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"applicationId":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"order":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationUserGroupIds":{"type":"array","items":{"type":"string"}},"owners":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"ownerGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverIds":{"type":"array","items":{"type":"string"}},"approverGroupIds":{"type":"array","items":{"type":"string"}},"assignmentStrategy":{"anyOf":[{"type":"string","enum":["All","AutoApprove","RoundRobin"]},{"type":"null"}]},"approvalPolicy":{"anyOf":[{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},{"type":"null"}]},"roleBasedApprovers":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyArchivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyType":{"anyOf":[{"type":"string","enum":["standard","custom","external"]},{"type":"null"}]},"customAccessPolicy":{"anyOf":[{"type":"object","properties":{"approverMode":{"type":"string","enum":["template","explicit"]},"approvalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approverPolicy":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiresBusinessJustification":{"type":"boolean"},"durationMode":{"type":"string","enum":["none","fixed","choice"]},"defaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationOptions":{"type":"array","items":{"type":"string"}},"eligibleGroupIds":{"type":"array","items":{"type":"string"}},"ineligibleGroupIds":{"type":"array","items":{"type":"string"}}},"required":["approverMode","approvalTemplateId","approvers","approverPolicy","requiresBusinessJustification","durationMode","defaultDuration","durationOptions","eligibleGroupIds","ineligibleGroupIds"],"additionalProperties":false},{"type":"null"}]},"accessPolicyDurationOptions":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"accessPolicyDurationMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyDefaultDuration":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresBusinessJustification":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"accessPolicyExternalFields":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["text","select","date","multiselect","unsupported"]},"providerType":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"choices":{"type":"array","items":{"type":"string"}}},"required":["id","kind","providerType","label","required"],"additionalProperties":false}},{"type":"null"}]},"accessPolicyApprovalTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"accessPolicyRequiresApproval":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"provisioningMethod":{"type":"string","enum":["group","application","workflow","manual","external"]},"postProvisioningMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"seatLimit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestCount":{"type":"number"}},"required":["id","applicationId","name","description","order","createdAt","updatedAt","integrationUserGroupIds","owners","ownerGroups","approverIds","approverGroupIds","assignmentStrategy","approvalPolicy","roleBasedApprovers","accessPolicyId","accessPolicyName","accessPolicyIcon","accessPolicyColor","accessPolicyArchivedAt","accessPolicyType","customAccessPolicy","accessPolicyDurationOptions","accessPolicyDurationMode","accessPolicyDefaultDuration","accessPolicyRequiresBusinessJustification","accessPolicyExternalFields","accessPolicyApprovalTemplateId","accessPolicyRequiresApproval","provisioningMethod","postProvisioningMessage","seatLimit","archivedAt"],"additionalProperties":false}},{"type":"null"}]},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"assignmentStrategy":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationApplicationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"app":{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"externalGroupId":{"type":"string"},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"userGroup":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","externalGroupId","metadata"],"additionalProperties":false}},"supportedAccessProvisioningMethods":{"type":"array","items":{"type":"string","enum":["group","application","workflow","manual","external"]}}},"required":["id","name","app","integrationGroups"],"additionalProperties":false}},"required":["id","name","displayName","domain","imageUrl","price","status","provisioningMethod","details","postProvisioningMessage","owners","ownerGroups","approvers","approverGroups","organizationId","createdAt","updatedAt","archivedAt","accessLevels","workspaces","assignmentStrategy","integrationApplicationId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"application-delete","summary":"Delete an application","tags":["Application"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/{id}":{"get":{"operationId":"asset-get","summary":"Get an asset by ID","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"includeFields","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"status":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"assigneeIds":{"type":"array","items":{"type":"string"}},"lastAssignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}},"required":["id","name","description","statusId","status","organizationId","createdAt","updatedAt","deletedAt","archivedAt","assetType","assigneeIds","lastAssignedAt","integrationSource"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"asset-update","summary":"Update an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string","minLength":1},"assetTypeId":{"type":"string","minLength":1},"assigneeIds":{"type":"array","items":{"type":"string"}},"fields":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"fieldDefinitionId":{"type":"string","minLength":1},"value":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]}},"required":["fieldDefinitionId","value"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"status":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"assigneeIds":{"type":"array","items":{"type":"string"}},"lastAssignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}},"required":["id","name","description","statusId","status","organizationId","createdAt","updatedAt","deletedAt","archivedAt","assetType","assigneeIds","lastAssignedAt","integrationSource"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"asset-delete","summary":"Delete an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"status":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"assigneeIds":{"type":"array","items":{"type":"string"}},"lastAssignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}},"required":["id","name","description","statusId","status","organizationId","createdAt","updatedAt","deletedAt","archivedAt","assetType","assigneeIds","lastAssignedAt","integrationSource"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/{id}/activities":{"get":{"operationId":"asset-listActivities","summary":"List activity for an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"type":{"type":"string","const":"Assigned"},"actorId":{"type":"string"},"data":{"type":"object","properties":{"assigneeId":{"type":"string"}},"required":["assigneeId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","resourceId","type","actorId","data","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"type":{"type":"string","const":"Unassigned"},"actorId":{"type":"string"},"data":{"type":"object","properties":{"assigneeId":{"type":"string"}},"required":["assigneeId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","resourceId","type","actorId","data","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"type":{"type":"string","const":"StatusChanged"},"actorId":{"type":"string"},"data":{"type":"object","properties":{"fromStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"toStatusId":{"type":"string"}},"required":["fromStatusId","toStatusId"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","resourceId","type","actorId","data","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"type":{"type":"string","const":"AttachmentsAdded"},"actorId":{"type":"string"},"data":{"type":"object","properties":{"filenames":{"type":"array","items":{"type":"string"}}},"required":["filenames"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","resourceId","type","actorId","data","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"type":{"type":"string","const":"AttachmentsRemoved"},"actorId":{"type":"string"},"data":{"type":"object","properties":{"filenames":{"type":"array","items":{"type":"string"}}},"required":["filenames"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","resourceId","type","actorId","data","createdAt","updatedAt"],"additionalProperties":false}],"type":"object"}},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/{id}/archive":{"post":{"operationId":"asset-archive","summary":"Archive an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"status":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"assigneeIds":{"type":"array","items":{"type":"string"}},"lastAssignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}},"required":["id","name","description","statusId","status","organizationId","createdAt","updatedAt","deletedAt","archivedAt","assetType","assigneeIds","lastAssignedAt","integrationSource"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/{id}/unarchive":{"post":{"operationId":"asset-unarchive","summary":"Unarchive an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"status":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assetType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"assigneeIds":{"type":"array","items":{"type":"string"}},"lastAssignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"fieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt","fieldDefinition"],"additionalProperties":false}}},"required":["id","name","description","statusId","status","organizationId","createdAt","updatedAt","deletedAt","archivedAt","assetType","assigneeIds","lastAssignedAt","integrationSource"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/{assetId}/attachments":{"get":{"operationId":"asset-listAttachments","summary":"List attachments on an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"assetId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"downloadUrl":{"type":"string"},"previewUrl":{"type":"string"},"id":{"type":"string"},"filename":{"type":"string"},"location":{"type":"string"},"status":{"type":"string","enum":["pending","completed"]},"source":{"type":"string"},"assetId":{"type":"string"},"mimeType":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"anyOf":[{},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","filename","location","status","source","assetId","mimeType","createdAt","updatedAt","metadata","authorId"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"post":{"operationId":"asset-createAttachment","summary":"Create an asset attachment with upload URL","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"assetId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string"},"mimeType":{"type":"string"},"metadata":{}},"required":["filename","mimeType"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":"string"},"location":{"type":"string"},"status":{"type":"string","enum":["pending","completed"]},"source":{"type":"string"},"assetId":{"type":"string"},"mimeType":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"metadata":{"anyOf":[{},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"uploadUrl":{"type":"string"}},"required":["id","filename","location","status","source","assetId","mimeType","createdAt","updatedAt","metadata","authorId","uploadUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/{assetId}/attachments/connect":{"post":{"operationId":"asset-connectAttachments","summary":"Mark uploaded asset attachments as complete","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"assetId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attachmentIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["attachmentIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/assets/{assetId}/attachments/archive":{"post":{"operationId":"asset-archiveAttachments","summary":"Remove attachments from an asset","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"assetId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attachmentIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["attachmentIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-statuses/{id}":{"patch":{"operationId":"assetStatus-update","summary":"Update an asset status","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isDefault":{"type":"boolean","const":true}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-statuses/{id}/archive":{"post":{"operationId":"assetStatus-archive","summary":"Archive an asset status","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-statuses/{id}/unarchive":{"post":{"operationId":"assetStatus-unarchive","summary":"Restore an archived asset status","tags":["Assets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["AVAILABLE","IN_USE","UNAVAILABLE","RETIRED"]},"color":{"default":null,"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]},"order":{"type":"number"},"isDefault":{"type":"boolean"},"organizationId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","category","color","order","isDefault","organizationId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-types/{id}":{"get":{"operationId":"assetType-get","summary":"Get an asset type by ID","tags":["Asset Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"includeFieldDefinitions","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"assetType-update","summary":"Update an asset type","tags":["Asset Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"label":{"type":"string","minLength":1},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"hidden":{"type":"boolean"},"required":{"type":"boolean"},"singleSelect":{"type":"boolean"}},"required":["label","type"]}}},"required":["id","title","items"]}}},"required":["sections"]},{"type":"null"}]},"workspaceIds":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"assetType-delete","summary":"Delete an asset type","tags":["Asset Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"targetAssetTypeId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/asset-types/{id}/fields":{"post":{"operationId":"assetType-linkFields","summary":"Add existing fields to an asset type","tags":["Asset Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fieldIds":{"minItems":1,"type":"array","items":{"type":"string"}},"required":{"type":"boolean"}},"required":["fieldIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"fieldLayout":{"anyOf":[{"type":"object","properties":{"sections":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1,"maxLength":80},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^(builtin:[a-zA-Z]+|field:[A-Za-z0-9_-]+)$"},"hidden":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"singleSelect":{"default":false,"type":"boolean"}},"required":["key","hidden","required","singleSelect"],"additionalProperties":false}}},"required":["id","title","items"],"additionalProperties":false}}},"required":["sections"],"additionalProperties":false},{"type":"null"}]},"fieldDefinitions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","icon","color","organizationId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/field-definitions/{id}":{"get":{"operationId":"field-getDefinition","summary":"Get a field definition by ID","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"field-updateDefinition","summary":"Update a field definition","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"field-deleteDefinition","summary":"Delete a field definition","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","NUMBER","DATE","DATETIME","TIME","BOOLEAN","SELECT","MULTI_SELECT","USER_SELECT","APPLICATION_SELECT","CURRENCY"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string","enum":["gray","red","orange","amber","yellow","green","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","organizationId","label","type","options","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/field-values/{id}":{"delete":{"operationId":"field-deleteValue","summary":"Delete a field value","tags":["Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"fieldDefinitionId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"value":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","fieldDefinitionId","entityType","entityId","value","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/business-schedules/{id}":{"get":{"operationId":"businessSchedule-get","summary":"Get business schedule by ID","tags":["Business Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"weeklyHours":{},"holidays":{},"isDefault":{"type":"boolean"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"slas":{"type":"number"}},"required":["slas"],"additionalProperties":false}},"required":["id","name","timezone","weeklyHours","holidays","isDefault","icon","color","workspaceId","createdAt","updatedAt","archivedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"businessSchedule-update","summary":"Update business schedule","tags":["Business Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"timezone":{"type":"string"},"weeklyHours":{"type":"object","properties":{"mon":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"tue":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"wed":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"thu":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"fri":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"sat":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}},"sun":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}},"required":["start","end"]}}}},"holidays":{"type":"array","items":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"isDefault":{"type":"boolean"},"icon":{"type":"string"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"weeklyHours":{},"holidays":{},"isDefault":{"type":"boolean"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"slas":{"type":"number"}},"required":["slas"],"additionalProperties":false}},"required":["id","name","timezone","weeklyHours","holidays","isDefault","icon","color","workspaceId","createdAt","updatedAt","archivedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"businessSchedule-delete","summary":"Delete business schedule","tags":["Business Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"weeklyHours":{},"holidays":{},"isDefault":{"type":"boolean"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"slas":{"type":"number"}},"required":["slas"],"additionalProperties":false}},"required":["id","name","timezone","weeklyHours","holidays","isDefault","icon","color","workspaceId","createdAt","updatedAt","archivedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/business-schedules/{id}/archive":{"post":{"operationId":"businessSchedule-archive","summary":"Archive business schedule","tags":["Business Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"weeklyHours":{},"holidays":{},"isDefault":{"type":"boolean"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"slas":{"type":"number"}},"required":["slas"],"additionalProperties":false}},"required":["id","name","timezone","weeklyHours","holidays","isDefault","icon","color","workspaceId","createdAt","updatedAt","archivedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/business-schedules/{id}/unarchive":{"post":{"operationId":"businessSchedule-unarchive","summary":"Unarchive business schedule","tags":["Business Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"weeklyHours":{},"holidays":{},"isDefault":{"type":"boolean"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"slas":{"type":"number"}},"required":["slas"],"additionalProperties":false}},"required":["id","name","timezone","weeklyHours","holidays","isDefault","icon","color","workspaceId","createdAt","updatedAt","archivedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/categories/{id}":{"get":{"operationId":"category-byId","summary":"Get category by ID","tags":["Categories"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"category-update","summary":"Update a category","tags":["Categories"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"icon":{"type":"string"},"color":{"type":"string"}},"required":["name","examples"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"category-delete","summary":"Delete a category","tags":["Categories"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/notes/{id}":{"patch":{"operationId":"note-update","summary":"Update a note","tags":["Notes"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"editedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","entityType","entityId","content","authorId","editedAt","deletedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"note-delete","summary":"Delete a note","tags":["Notes"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"entityType":{"type":"string"},"entityId":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"editedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","entityType","entityId","content","authorId","editedAt","deletedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/code-actions/{id}":{"get":{"operationId":"codeAction-get","summary":"Get code action by ID","tags":["CodeAction"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"language":{"type":"string"},"version":{"type":"string"},"isActive":{"type":"boolean"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"foundryActionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"analysis":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"error":{"type":"string"}},"required":["inputs","outputs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","code","language","version","isActive","organizationId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"codeAction-update","summary":"Update code action","tags":["CodeAction"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"language":{"type":"string"},"version":{"type":"string"},"isActive":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"},"language":{"type":"string"},"version":{"type":"string"},"isActive":{"type":"boolean"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"foundryActionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"analysis":{"anyOf":[{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"outputs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"},"nested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","object","array","void","secret","date","datetime"]},"optional":{"default":false,"type":"boolean"},"description":{"type":"string"}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}}},"required":["name","type","optional"],"additionalProperties":false}},"error":{"type":"string"}},"required":["inputs","outputs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","type","code","language","version","isActive","organizationId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"codeAction-delete","summary":"Delete code action","tags":["CodeAction"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/credentials/{id}":{"put":{"operationId":"vault-update","summary":"Update credential value","tags":["Credential"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["name","value"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"keyVersion":{"type":"number"},"hint":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","type","keyVersion","metadata","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"vault-delete","summary":"Delete credential","tags":["Credential"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"keyVersion":{"type":"number"},"hint":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","name","type","keyVersion","metadata","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/custom-fields/{id}":{"get":{"operationId":"customField-byId","summary":"Get custom field by ID","tags":["Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"customField-update","summary":"Update a custom field","tags":["Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"config":{"anyOf":[{"type":"object","properties":{"fileTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"allowList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"blockList":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"richText":{"type":"boolean"},"assetTypeIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"requesterAssetsOnly":{"type":"boolean"}}},{"type":"null"}]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string","minLength":1},"order":{"type":"number"}},"required":["value"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"customField-delete","summary":"Delete a custom field","tags":["Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboards/{id}/duplicate":{"post":{"operationId":"dashboard-duplicate","summary":"Duplicate a dashboard along with its widgets","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","x","y","columns","rows"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"isSystemCreated":{"type":"boolean"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["legacy","v2","prepackaged"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"creatorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"widgets":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","slug","isSystemCreated","itemType","type","parentId","organizationId","organization","creatorId","creator","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboards/{id}":{"patch":{"operationId":"dashboard-update","summary":"Update an existing dashboard","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","rows"]}}}},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","x","y","columns","rows"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"isSystemCreated":{"type":"boolean"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["legacy","v2","prepackaged"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"creatorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"widgets":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","slug","isSystemCreated","itemType","type","parentId","organizationId","organization","creatorId","creator","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboards/by-slug/{slug}":{"get":{"operationId":"dashboard-getDashboardBySlug","summary":"Get a dashboard by its slug","tags":["Dashboard"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"slug","schema":{"type":"string"},"required":true},{"in":"query","name":"workspaceId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"type":"string"},"layout":{"type":"object","properties":{"columns":{"default":12,"type":"number","minimum":1,"maximum":12},"widgets":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"x":{"default":0,"type":"number","minimum":0},"y":{"default":0,"type":"number","minimum":0},"columns":{"default":1,"type":"number","minimum":1,"maximum":12},"rows":{"type":"number","minimum":1}},"required":["slug","x","y","columns","rows"],"additionalProperties":false}}},"required":["columns"],"additionalProperties":false},"config":{"type":"object","properties":{"filters":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}},"dateFilters":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"isSystemCreated":{"type":"boolean"},"itemType":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["legacy","v2","prepackaged"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"creatorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"widgets":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","slug","isSystemCreated","itemType","type","parentId","organizationId","organization","creatorId","creator","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/dashboard/widgets/{id}":{"patch":{"operationId":"dashboard-updateWidget","summary":"Update a dashboard widget","tags":["Dashboard","Widgets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["TREND","METRIC","TABLE"]},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"query":{"anyOf":[{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["timeInterval"]},{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"]}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}}},"required":["aggregations"]},{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"]}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]}}},"columns":{"type":"array","items":{"type":"string"}}}}]},"displayConfig":{"anyOf":[{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}}},{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}}},{"type":"object","properties":{"limit":{"type":"number"}}}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"dashboard-deleteWidget","summary":"Delete a dashboard widget","tags":["Dashboard","Widgets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TREND"},"query":{"type":"object","properties":{"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"groupBy":{"type":"array","items":{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]}},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"dateField":{"type":"string"},"hideEmptyValues":{"type":"boolean"},"comparePreviousPeriod":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","timeInterval"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"METRIC"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"aggregations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["count","avg","sum","min","max","avg_per_agent","avg_per_period","percent_of"]},"alias":{"type":"string"},"field":{"anyOf":[{"anyOf":[{"type":"string","enum":["id","responseTime","timeToResolution","timeToClose","ticketResponseTime","ticketTimeToResolution","ticketTimeToClose","timeToAssignment","assigneeId","csat","priority","slaMet","slaBreached","sla","slaAtRisk","noHumanTouch","deflectionDeflected","deflectionEscalated","deflectionAssisted","deflectionUnactionable"]},{"type":"string","enum":["aiGenerated","positiveFeedback","negativeFeedback","ticketId"]}]},{"type":"null"}]}},"required":["type"],"additionalProperties":false}},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"populationFilterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"groupBy":{"anyOf":[{"anyOf":[{"type":"string","enum":["statusId","priority","queueId","agentParticipated","requestTypeId","categoryId","tags","assigneeId","authorId","requesterId","followers","approvers","roundApprovers","workspaceId","sla","slaStatus","slaTarget","createdAt","hour_of_day","day_of_week","approvalStatus","day_of_month","month_of_year","csatScore"]},{"type":"string","enum":["ticketMessageAuthorId","aiGenerated","aiFeedback","private","ticketMessageCreatedAt","source","ticketId","agentResponseType","kbDocumentId"]},{"type":"string","enum":["workflowId","status","collectionId","workspaceId","hour_of_day","day_of_week","day_of_month","month_of_year","createdAt","ticketQueueId","ticketStatusId","ticketAssigneeId","ticketPriority","ticketSource","ticketCategoryId"]},{"type":"string","pattern":"^customField:.*"},{"type":"string","pattern":"^attributeField:.*"},{"type":"string","pattern":"^userField:.*"},{"type":"string","pattern":"^slaRule:.*"},{"type":"string","pattern":"^metric:.*"}]},{"type":"null"}]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"limit":{"type":"number"},"sortOrder":{"type":"string","enum":["ASC","DESC"]},"hideEmptyValues":{"type":"boolean"},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false}},"required":["dataSource","aggregations"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"formatter":{"type":"string","enum":["number","percentage","duration","currency"]},"maximumFractionDigits":{"type":"number"},"minimumFractionDigits":{"type":"number"},"featuredGroupIds":{"type":"array","items":{"type":"string"}},"featuredGroupId":{"type":"string"},"chartType":{"type":"string","enum":["bar","line","radial","stacked-bar","pie","table"]},"orientation":{"type":"string","enum":["horizontal","vertical"]},"showLabels":{"type":"boolean"},"maxItems":{"type":"number"},"hideEmptyValues":{"type":"boolean"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dashboardId":{"type":"string"},"dashboard":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"type":{"type":"string","const":"TABLE"},"query":{"type":"object","properties":{"dataSource":{"default":"Ticket","type":"string","enum":["Ticket","TicketMessage","KBDocument","WorkflowRun"]},"filterGroups":{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"condition":{"type":"string"},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"},{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}]}},{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}]},{"type":"null"}]},{"type":"string"}]},{"type":"null"}]},"given":{"type":"string"}},"required":["condition"],"additionalProperties":false}}},"limit":{"default":10,"type":"number"},"sortBy":{"type":"string"},"sortOrder":{"default":"DESC","type":"string","enum":["ASC","DESC"]},"dateOverride":{"type":"object","properties":{"period":{"type":"string","enum":["this.day","this.week","this.month","this.quarter","this.year","last.day","last.week","last.month","last.quarter","last.year","last.7days","last.14days","last.30days","last.90days","year.to.date","all.time","custom"]},"timeInterval":{"type":"string","enum":["hour","day","week","month","quarter","year"]},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false}},"additionalProperties":false},"columns":{"type":"array","items":{"type":"string"}}},"required":["dataSource","limit","sortOrder"],"additionalProperties":false},"displayConfig":{"type":"object","properties":{"limit":{"type":"number"}},"additionalProperties":false}},"required":["id","slug","name","description","dashboardId","dashboard","createdAt","updatedAt","type","query"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/email-domains/{id}":{"get":{"operationId":"emailDomain-get","summary":"Get email domain","tags":["EmailDomain"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"dkimRecords":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","const":"CNAME"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","domain","status","dkimRecords","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"emailDomain-delete","summary":"Delete email domain","tags":["EmailDomain"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"dkimRecords":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","const":"CNAME"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","domain","status","dkimRecords","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/email-domains/{id}/verify":{"post":{"operationId":"emailDomain-verify","summary":"Check email domain verification","tags":["EmailDomain"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"dkimRecords":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","const":"CNAME"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","domain","status","dkimRecords","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/email-domains/{id}/retry-dkim":{"post":{"operationId":"emailDomain-retry","summary":"Retry DKIM verification","tags":["EmailDomain"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["PENDING","VERIFIED","FAILED"]},"dkimRecords":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","const":"CNAME"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","organizationId","domain","status","dkimRecords","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/integrations/{id}":{"get":{"operationId":"foundry-getIntegration","summary":"Get a Foundry integration","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"apiName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string"},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"maskedAuthConfig":{"type":"object","properties":{"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"hasCredentials":{"type":"boolean"},"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]},"username":{"type":"string"},"loginUrl":{"type":"string"},"loginMethod":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"location":{"default":"header","type":"string","enum":["header","body","query","form"]},"secret":{"default":false,"type":"boolean"},"sendOnEveryRequest":{"default":false,"type":"boolean"},"prefix":{"type":"string"},"value":{"type":"string"}},"required":["name","location","secret","sendOnEveryRequest"],"additionalProperties":false}},"tokenSource":{"type":"string","enum":["header","body"]},"tokenLocation":{"type":"string"},"tokenPrefix":{"type":"string"},"tokenTtlSeconds":{"type":"number"}},"required":["authType","hasCredentials"],"additionalProperties":false},"docsValidationStatus":{"type":"string","enum":["NOT_VALIDATED","VALIDATING","VALID","INVALID"]},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{"type":"object","properties":{"completedSteps":{"type":"array","items":{"type":"string"}},"totalSteps":{"type":"number"}},"required":["completedSteps","totalSteps"],"additionalProperties":false},{"type":"null"}]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"],"additionalProperties":false}]}},{"type":"null"}]},"isDraft":{"type":"boolean"},"connectionHealthStatus":{"type":"string","enum":["healthy","failing","unknown","needs_reverification"]},"lastVerification":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","endpointPath","reason","diagnostics"],"additionalProperties":false},{"type":"null"}]},"foundryOAuthProviderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"context7LibraryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"grantType":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"}},"required":["key","label","required"],"additionalProperties":false}},"connectFieldValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"oauthProvider":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"isOrgScoped":{"type":"boolean"},"grantType":{"type":"string"},"clientId":{"type":"string"},"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","isOrgScoped","grantType","clientId","authUrl","tokenUrl","scopes"],"additionalProperties":false},{"type":"null"}]},"organizationId":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","apiName","description","docsUrl","baseUrl","authType","maskedAuthConfig","docsValidationStatus","docsValidationResult","imageURL","workflowGroup","defaultHeaders","isDraft","connectFields","connectFieldValues","organizationId","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"foundry-updateIntegration","summary":"Update a Foundry integration","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiName":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string","format":"uri"},"baseUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"authConfig":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"imageURL":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"]}]}},{"type":"null"}]},"connectFieldValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"isDraft":{"type":"boolean"},"foundryOAuthProviderId":{"type":"string"},"keyAsUsername":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"apiName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string"},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"maskedAuthConfig":{"type":"object","properties":{"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"hasCredentials":{"type":"boolean"},"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]},"username":{"type":"string"},"loginUrl":{"type":"string"},"loginMethod":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"location":{"default":"header","type":"string","enum":["header","body","query","form"]},"secret":{"default":false,"type":"boolean"},"sendOnEveryRequest":{"default":false,"type":"boolean"},"prefix":{"type":"string"},"value":{"type":"string"}},"required":["name","location","secret","sendOnEveryRequest"],"additionalProperties":false}},"tokenSource":{"type":"string","enum":["header","body"]},"tokenLocation":{"type":"string"},"tokenPrefix":{"type":"string"},"tokenTtlSeconds":{"type":"number"}},"required":["authType","hasCredentials"],"additionalProperties":false},"docsValidationStatus":{"type":"string","enum":["NOT_VALIDATED","VALIDATING","VALID","INVALID"]},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{"type":"object","properties":{"completedSteps":{"type":"array","items":{"type":"string"}},"totalSteps":{"type":"number"}},"required":["completedSteps","totalSteps"],"additionalProperties":false},{"type":"null"}]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"],"additionalProperties":false}]}},{"type":"null"}]},"isDraft":{"type":"boolean"},"connectionHealthStatus":{"type":"string","enum":["healthy","failing","unknown","needs_reverification"]},"lastVerification":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","endpointPath","reason","diagnostics"],"additionalProperties":false},{"type":"null"}]},"foundryOAuthProviderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"context7LibraryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"grantType":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"}},"required":["key","label","required"],"additionalProperties":false}},"connectFieldValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"oauthProvider":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"isOrgScoped":{"type":"boolean"},"grantType":{"type":"string"},"clientId":{"type":"string"},"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","isOrgScoped","grantType","clientId","authUrl","tokenUrl","scopes"],"additionalProperties":false},{"type":"null"}]},"organizationId":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","apiName","description","docsUrl","baseUrl","authType","maskedAuthConfig","docsValidationStatus","docsValidationResult","imageURL","workflowGroup","defaultHeaders","isDraft","connectFields","connectFieldValues","organizationId","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"foundry-deleteIntegration","summary":"Delete a Foundry integration","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"apiName":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"docsUrl":{"type":"string"},"baseUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"maskedAuthConfig":{"type":"object","properties":{"authType":{"type":"string","enum":["NONE","API_KEY","OAUTH2","BEARER","BASIC","ADVANCED"]},"hasCredentials":{"type":"boolean"},"keyName":{"type":"string"},"keyLocation":{"type":"string","enum":["header","query"]},"username":{"type":"string"},"loginUrl":{"type":"string"},"loginMethod":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"location":{"default":"header","type":"string","enum":["header","body","query","form"]},"secret":{"default":false,"type":"boolean"},"sendOnEveryRequest":{"default":false,"type":"boolean"},"prefix":{"type":"string"},"value":{"type":"string"}},"required":["name","location","secret","sendOnEveryRequest"],"additionalProperties":false}},"tokenSource":{"type":"string","enum":["header","body"]},"tokenLocation":{"type":"string"},"tokenPrefix":{"type":"string"},"tokenTtlSeconds":{"type":"number"}},"required":["authType","hasCredentials"],"additionalProperties":false},"docsValidationStatus":{"type":"string","enum":["NOT_VALIDATED","VALIDATING","VALID","INVALID"]},"docsValidationResult":{},"docsValidationProgress":{"anyOf":[{"type":"object","properties":{"completedSteps":{"type":"array","items":{"type":"string"}},"totalSteps":{"type":"number"}},"required":["completedSteps","totalSteps"],"additionalProperties":false},{"type":"null"}]},"imageURL":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowGroup":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultHeaders":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object","properties":{"credentialId":{"type":"string","pattern":"^vc_.*"}},"required":["credentialId"],"additionalProperties":false}]}},{"type":"null"}]},"isDraft":{"type":"boolean"},"connectionHealthStatus":{"type":"string","enum":["healthy","failing","unknown","needs_reverification"]},"lastVerification":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean"},"statusCode":{"type":"number"},"endpointPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"request":{"type":"object","properties":{"method":{"type":"string"},"url":{"type":"string"},"headerNames":{"type":"array","items":{"type":"string"}},"credentialPlacement":{"type":"string","enum":["header","query","body","form","login_exchange","none"]},"credentialFieldNames":{"type":"array","items":{"type":"string"}},"bodyKeys":{"type":"array","items":{"type":"string"}}},"required":["method","url","headerNames","credentialPlacement","credentialFieldNames"],"additionalProperties":false},"response":{"anyOf":[{"type":"object","properties":{"statusCode":{"type":"number"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["statusCode","headers","body"],"additionalProperties":false},{"type":"null"}]},"transportError":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointSource":{"anyOf":[{"type":"string"},{"type":"null"}]},"endpointReasoning":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["request","response","transportError","endpointSource","endpointReasoning"],"additionalProperties":false},{"type":"null"}]}},"required":["success","statusCode","endpointPath","reason","diagnostics"],"additionalProperties":false},{"type":"null"}]},"foundryOAuthProviderId":{"anyOf":[{"type":"string"},{"type":"null"}]},"context7LibraryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"keyAsUsername":{"type":"boolean"},"grantType":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectFields":{"default":[],"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":50,"pattern":"^[a-zA-Z][a-zA-Z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":100},"placeholder":{"type":"string","maxLength":100},"helpText":{"type":"string","maxLength":250},"required":{"type":"boolean"}},"required":["key","label","required"],"additionalProperties":false}},"connectFieldValues":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"oauthProvider":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"isOrgScoped":{"type":"boolean"},"grantType":{"type":"string"},"clientId":{"type":"string"},"authUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","isOrgScoped","grantType","clientId","authUrl","tokenUrl","scopes"],"additionalProperties":false},{"type":"null"}]},"organizationId":{"type":"string"},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","apiName","description","docsUrl","baseUrl","authType","maskedAuthConfig","docsValidationStatus","docsValidationResult","imageURL","workflowGroup","defaultHeaders","isDraft","connectFields","connectFieldValues","organizationId","workspaceId","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/{id}":{"get":{"operationId":"foundry-getAction","summary":"Get a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"foundry-updateAction","summary":"Update a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string"},"codeBody":{"type":"string"},"metadata":{},"endpointDocsUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"savedTestInputs":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"foundry-deleteAction","summary":"Delete a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"userRequest":{"type":"string"},"generationOptions":{},"code":{"type":"string"},"codePreamble":{"type":"string"},"codeBody":{"type":"string"},"codePostamble":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"type":"number"},"status":{"type":"string","enum":["GENERATED","EDITED"]},"lastTestStatus":{"type":"string","enum":["PASSING","FAILING","NEVER_RUN"]},"metadata":{},"inputSchemaJson":{"anyOf":[{},{"type":"null"}]},"requiredScopes":{"type":"array","items":{"type":"string"}},"endpointDocsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPublished":{"type":"boolean"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedCodeHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasUnpublishedChanges":{"type":"boolean"},"aiPrompts":{"anyOf":[{},{"type":"null"}]},"dryRunStrategy":{"anyOf":[{"type":"string","enum":["AS_IS","VARIANT"]},{"type":"null"}]},"dryRunCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"operationType":{"anyOf":[{"type":"string","enum":["READ","WRITE","DELETE"]},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"currentStep":{"anyOf":[{"type":"number"},{"type":"null"}]},"totalSteps":{"anyOf":[{"type":"number"},{"type":"null"}]},"currentStepLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStatus":{"type":"string","enum":["IDLE","GENERATING","COMPLETED","FAILED"]},"generationError":{"anyOf":[{"type":"string"},{"type":"null"}]},"generationStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"savedTestInputs":{"anyOf":[{},{"type":"null"}]}},"required":["id","workspaceId","integrationId","name","description","userRequest","generationOptions","code","codePreamble","codeBody","codePostamble","codeVersion","revision","status","lastTestStatus","metadata","inputSchemaJson","requiredScopes","endpointDocsUrl","isPublished","publishedAt","publishedVersion","publishedCodeHash","hasUnpublishedChanges","aiPrompts","dryRunStrategy","dryRunCode","operationType","createdAt","updatedAt","currentStep","totalSteps","currentStepLabel","generationStatus","generationError","generationStartedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/{id}/iterations":{"get":{"operationId":"foundry-getActionIterations","summary":"Get iteration history for a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"role":{"type":"string","enum":["USER","ASSISTANT","SYSTEM"]},"content":{"type":"string"},"applied":{"type":"boolean"},"diff":{"anyOf":[{},{"type":"null"}]},"images":{"anyOf":[{},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","actionId","role","content","applied","diff","images","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/{id}/checkpoints":{"get":{"operationId":"foundry-listCheckpoints","summary":"List restore checkpoints for a Foundry action","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"codeVersion":{"type":"number"},"revision":{"anyOf":[{"type":"number"},{"type":"null"}]},"name":{"type":"string"},"trigger":{"type":"string","enum":["GENERATION","ITERATION","EDIT","RESTORE","PUBLISH"]},"anchorIterationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"rolledBackFromVersion":{"anyOf":[{"type":"number"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","actionId","codeVersion","revision","name","trigger","anchorIterationId","rolledBackFromVersion","createdAt"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/test-runs/{id}":{"get":{"operationId":"foundry-getTestRun","summary":"Get a Foundry test run","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"actionId":{"type":"string"},"environment":{"type":"string","enum":["DEVELOPMENT","STAGING","PRODUCTION"]},"inputs":{},"verbose":{"type":"boolean"},"dryRun":{"type":"boolean"},"startedAt":{"type":"string"},"endedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"anyOf":[{"type":"number"},{"type":"null"}]},"status":{"type":"string","enum":["RUNNING","SUCCESS","ERROR"]},"resultJson":{"anyOf":[{},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestLogEntries":{},"consoleLog":{"type":"string"},"createdAt":{"type":"string"},"revision":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","actionId","environment","inputs","verbose","dryRun","startedAt","endedAt","durationMs","status","resultJson","error","requestLogEntries","consoleLog","createdAt","revision"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/{clusterId}":{"get":{"operationId":"knowledgeGapCluster-getClusterDetails","summary":"Get cluster details","description":"Get full cluster details: question phrasings, underlying tickets, and per-queue coverage","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"representativeQuery":{"type":"string"},"gapType":{"type":"string","enum":["NO_CONTENT","WEAK_CONTENT","NOT_A_KNOWLEDGE_GAP"]},"severity":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]},"severityScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"coverageState":{"type":"string","enum":["NO_COVERAGE","DOC_NOT_CONNECTED","ANSWER_DRAFTED","PARTIALLY_COVERED","PUBLISHED"]},"trendPercent":{"anyOf":[{"type":"number"},{"type":"null"}]},"draftability":{"type":"string","enum":["HIGH","LOW"]},"lifecycleState":{"type":"string","enum":["ACTIVE","DORMANT","ARCHIVED"]},"ticketCount":{"type":"number"},"primaryQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"phrasings":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"count":{"type":"number"}},"required":["title","count"],"additionalProperties":false}},"tickets":{"type":"array","items":{"type":"object","properties":{"ticketId":{"type":"string"},"shortId":{"type":"string"},"queuePrefix":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"published":{"type":"boolean"},"statusLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"kbSignal":{"type":"string","enum":["NO_CONTENT","HAD_CONTENT","NOT_SEARCHED"]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]}},"required":["ticketId","shortId","queuePrefix","number","title","published","statusLabel","statusGroupId","kbSignal","source","requester"],"additionalProperties":false}},"queueBreakdown":{"type":"array","items":{"type":"object","properties":{"queueId":{"type":"string"},"ticketCount":{"type":"number"},"coverageState":{"type":"string","enum":["NO_COVERAGE","DOC_NOT_CONNECTED","ANSWER_DRAFTED","PARTIALLY_COVERED","PUBLISHED"]}},"required":["queueId","ticketCount","coverageState"],"additionalProperties":false}}},"required":["id","label","description","representativeQuery","gapType","severity","severityScore","coverageState","trendPercent","draftability","lifecycleState","ticketCount","primaryQueueId","firstSeenAt","lastSeenAt","createdAt","updatedAt","phrasings","tickets","queueBreakdown"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/{clusterId}/tickets":{"get":{"operationId":"knowledgeGapCluster-getTicketsForCluster","summary":"Get tickets for cluster","description":"Get unique tickets associated with a cluster via its messages","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/{clusterId}/generate-kb-article":{"post":{"operationId":"knowledgeGapCluster-generateKBArticle","summary":"Generate KB article from cluster","description":"Start a KB article generation workflow from a knowledge gap cluster. Processes all tickets in the cluster to create a comprehensive KB article.","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"regenerate":{"description":"Whether to regenerate if workflow exists","type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"workflowId":{"type":"string"},"status":{"type":"string","enum":["started","already_running"]}},"required":["workflowId","status"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/{clusterId}/kb-article-status":{"get":{"operationId":"knowledgeGapCluster-getKBArticleGenerationStatus","summary":"Get KB article generation status","description":"Check the status of a KB article generation workflow for a cluster","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["running","completed","failed","not_found"]},"workflowId":{"type":"string"},"error":{"type":"string"}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gap-clusters/{clusterId}/lifecycle":{"post":{"operationId":"knowledgeGapCluster-setLifecycleState","summary":"Set cluster lifecycle state","description":"Manually archive or restore a knowledge gap cluster","tags":["Knowledge Gap Clusters"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"clusterId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lifecycleState":{"type":"string","enum":["ACTIVE","ARCHIVED"]}},"required":["lifecycleState"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"lifecycleState":{"type":"string","enum":["ACTIVE","DORMANT","ARCHIVED"]}},"required":["id","lifecycleState"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gaps-schedules/workspace/{workspaceId}":{"get":{"operationId":"knowledgeGapsSchedule-byWorkspaceId","summary":"Get knowledge gaps schedule by workspace ID","tags":["Knowledge Gaps Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workspaceId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastSuccessfulRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessfulRunEndDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","organizationId","scheduleId","isActive","lastSuccessfulRunAt","lastSuccessfulRunEndDate","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/knowledge-gaps-schedules/{id}":{"get":{"operationId":"knowledgeGapsSchedule-byId","summary":"Get knowledge gaps schedule by ID","tags":["Knowledge Gaps Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastSuccessfulRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessfulRunEndDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","organizationId","scheduleId","isActive","lastSuccessfulRunAt","lastSuccessfulRunEndDate","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"patch":{"operationId":"knowledgeGapsSchedule-update","summary":"Update knowledge gaps schedule","tags":["Knowledge Gaps Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isActive":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"scheduleId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"lastSuccessfulRunAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessfulRunEndDate":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","organizationId","scheduleId","isActive","lastSuccessfulRunAt","lastSuccessfulRunEndDate","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"knowledgeGapsSchedule-delete","summary":"Delete knowledge gaps schedule","tags":["Knowledge Gaps Schedule"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/queues/{id}":{"get":{"operationId":"queue-get","summary":"Get Channel by ID.","tags":["Channels"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"queue-update","summary":"Updates an existing Channel.","tags":["Channels"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"prefix":{"type":"string","minLength":1,"maxLength":10,"pattern":"^[A-Z][A-Z0-9]{0,9}$"},"emoji":{"type":"string"},"requestTypes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},{"type":"null"}]},"autoAssignees":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"queue-delete","summary":"Deletes an existing Channel.","tags":["Channels"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"fallbackTicketQueueId","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-type-custom-fields/{id}":{"get":{"operationId":"requestTypeCustomFields-byId","summary":"Get request type custom field by ID","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"requestTypeCustomFields-update","summary":"Update a request type custom field","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"number"},"private":{"type":"boolean"},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"requestTypeCustomFields-delete","summary":"Delete a request type custom field","tags":["Request Type Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}":{"get":{"operationId":"requestTypes-byId","summary":"Get request type by ID","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"requestTypes-update","summary":"Update a request type","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"status":{"type":"string","enum":["Draft","Published","Archived"]},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroupIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"requestTypes-delete","summary":"Delete a request type","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"deleteContents","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}/ticket-count":{"get":{"operationId":"requestTypes-ticketCount","summary":"Get ticket count for a request type","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"number"}},"required":["count"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}/public-access/enable":{"post":{"operationId":"requestTypes-enablePublicAccess","summary":"Enable public form access","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"publicUrl":{"type":"string"}},"required":["publicUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}/public-access/disable":{"post":{"operationId":"requestTypes-disablePublicAccess","summary":"Disable public form access","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"publicUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["publicUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}/public-access/rotate":{"post":{"operationId":"requestTypes-rotatePublicToken","summary":"Rotate public form token","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"publicUrl":{"type":"string"}},"required":["publicUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}/public-access/passcode/set":{"post":{"operationId":"requestTypes-setPasscode","summary":"Set or regenerate the public form passcode","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"passcode":{"type":"string"}},"required":["passcode"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}/public-access/passcode/clear":{"post":{"operationId":"requestTypes-clearPasscode","summary":"Remove the public form passcode","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/request-types/{id}/status":{"post":{"operationId":"requestTypes-updateStatus","summary":"Update a request type status","tags":["Request Types"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["Draft","Published","Archived"]}},"required":["status"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["request-type","collection"]},{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"isDefault":{"type":"boolean"},"isPrivate":{"type":"boolean"},"featuredInPortal":{"type":"boolean"},"publicAccessEnabled":{"type":"boolean"},"publicToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Draft","Published","Archived"]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"aiExamples":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceId":{"type":"string"},"titleTemplate":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultStatusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultTaskTemplateId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultPriority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"defaultType":{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"systemGenerated":{"default":false,"type":"boolean"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}},"required":["id","name","color"],"additionalProperties":false}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","imageUrl"],"additionalProperties":false}},"customFields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"private":{"type":"boolean"},"requestTypeId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"ticketField":{"anyOf":[{"type":"string","enum":["TITLE","DESCRIPTION","STATUS","PRIORITY","TYPE","REQUESTER","ASSIGNEE","APPROVERS","FOLLOWERS","DUE_DATE"]},{"type":"null"}]},"required":{"type":"boolean"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effectiveRequired":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"dependsOnValue":{"type":"array","items":{"type":"string"}}},"required":["id","order","private","requestTypeId","customField","customFieldId","ticketField","required","label","description","createdAt","updatedAt","parentId","dependsOnValue"],"additionalProperties":false}},"formEnabled":{"type":"boolean"},"submitAnonymous":{"type":"boolean"},"defaultPublicAcknowledgement":{"type":"boolean"},"audienceType":{"type":"string","enum":["Everyone","WorkspaceMembers","Specific"]},"allowedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","emoji","color","icon","iconImageUrl","isDefault","isPrivate","featuredInPortal","publicAccessEnabled","publicToken","status","jobId","description","aiExamples","aiResponse","workspaceId","titleTemplate","defaultQueueId","defaultStatusId","defaultTaskTemplateId","defaultPriority","defaultType","parentId","parent","systemGenerated","tags","agents","customFields","formEnabled","submitAnonymous","defaultPublicAcknowledgement","audienceType","allowedGroups","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/snippets/{id}":{"get":{"operationId":"snippet-get","summary":"Get a single snippet by ID","tags":["Snippets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"workspaceId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","workspaceId","authorId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"snippet-update","summary":"Update a snippet","tags":["Snippets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"content":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"workspaceId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","content","workspaceId","authorId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"snippet-delete","summary":"Delete a snippet","tags":["Snippets"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/{id}":{"get":{"operationId":"ticket-byId","summary":"Get ticket by id, shortId, or PREFIX-NUMBER format","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"ticket-update","summary":"Update a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"archivedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"publishedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assignedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"startAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"closedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"approvedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"declinedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"private":{"type":"boolean"},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"resolvedAt":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["SERVICE","INCIDENT","PROBLEM","CHANGE","ACCESS"]},{"type":"null"}]},"integrationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"disableAIResponse":{"type":"boolean"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},{"type":"null"}]},"customFields":{},"attributeFields":{},"lastAgentResponse":{"type":"string"},"agentParticipated":{"type":"boolean"},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{},"addTags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"removeTags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"createdAt":{"description":"Date field that accepts Date objects, ISO 8601 strings, or null","anyOf":[{"type":"string"},{"type":"string"}]},"noDispatch":{"type":"boolean"}}},"approverId":{"anyOf":[{"type":"string"},{"type":"null"}]},"includeChild":{"type":"boolean"},"expected":{"type":"object","properties":{"title":{"type":"string","maxLength":2000},"description":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]}}}},"required":["data"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"ticket-delete","summary":"Delete a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"noDispatch","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/by-url/{identifier}":{"get":{"operationId":"ticket-byUrlIdentifier","summary":"Get ticket by URL identifier (unified endpoint for all formats)","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"identifier","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/{ticketId}/custom-fields":{"get":{"operationId":"ticket-getCustomFields","summary":"Get formatted custom fields for a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"ticketId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"value":{}},"required":["id","key","label","type","value"],"additionalProperties":false}}},"required":["fields"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/summary/{identifier}":{"get":{"operationId":"ticket-summary","summary":"Get minimal ticket summary by URL identifier","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"identifier","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"shortId":{"type":"string"},"number":{"type":"number"},"queuePrefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","shortId","number","queuePrefix","workspaceId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/by-asset/{assetId}":{"get":{"operationId":"ticket-listByAsset","summary":"List tickets whose asset custom field holds an asset","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"assetId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"],"additionalProperties":false}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue"],"additionalProperties":false}},"totalCount":{"type":"number"}},"required":["items","totalCount"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/share/{id}":{"post":{"operationId":"ticket-share","summary":"Share a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"queueId":{"type":"string"}},"required":["queueId"]}},"required":["data"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/unshare/{id}":{"post":{"operationId":"ticket-unShare","summary":"unShare a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]}}}},"required":["data"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"ticketId":{"type":"string"},"queueIds":{"type":"array","items":{"type":"string"}}},"required":["ticketId","queueIds"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tickets/{id}/auto-tag":{"post":{"operationId":"ticket-autoTagManual","summary":"Manually trigger auto-tagging for a ticket","tags":["Ticket"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["tags"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-rounds/{id}":{"get":{"operationId":"ticketApprovalRound-get","summary":"Get a ticket approval round","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"ticketApprovalRound-delete","summary":"Delete a ticket approval round","tags":["Ticket Approval Round"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ticketId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"policy":{"type":"string","enum":["ANY","ALL","MAJORITY","THRESHOLD"]},"status":{"type":"string","enum":["PENDING","ACTIVE","APPROVED","DECLINED","RESET","SKIPPED"]},"stageIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetFromRoundId":{"anyOf":[{"type":"string"},{"type":"null"}]},"openedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"threshold":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"filterGroups":{"anyOf":[{"type":"array","items":{"type":"array","items":{"type":"object","properties":{"field":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]},"condition":{"type":"string","enum":["equals","not_equals","contains","not_contains","gt","gte","lt","lte","in","not_in","null","not_null","is_null","is_not_null","is_empty_string","is_not_empty_string","none","some","between","within","member_of","not_member_of","j_equals","j_not_equals","j_in","j_not_in","j_array_contains","j_string_contains","j_null","j_not_null","j_gt","j_gte","j_lt","j_lte","j_between"]},"value":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string"}]}}]}}]},{"type":"null"}]}},"required":["condition"],"additionalProperties":{}}}},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchAgentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolActions":{"anyOf":[{},{"type":"null"}]},"agentToolBatchSummary":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentToolBatchExecutedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","ticketId","name","policy","status","stageIndex","resetFromRoundId","openedAt","closedAt","deletedAt","threshold","type","agentToolBatchId","agentToolBatchAgentId","agentToolActions","agentToolBatchSummary","agentToolBatchExecutedAt","createdAt","updatedAt","approvers"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-round-approvers/{id}":{"get":{"operationId":"ticketApprovalRoundApprover-get","summary":"Get a ticket approval round approver","tags":["Ticket Approval Round Approver"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"ticketApprovalRoundApprover-delete","summary":"Remove an approver from a round","tags":["Ticket Approval Round Approver"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-round-approvers/{id}/approve":{"post":{"operationId":"ticketApprovalRoundApprover-approve","summary":"Approve on a round","tags":["Ticket Approval Round Approver"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"biometricProofToken":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-approval-round-approvers/{id}/decline":{"post":{"operationId":"ticketApprovalRoundApprover-decline","summary":"Decline on a round","tags":["Ticket Approval Round Approver"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"biometricProofToken":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"roundId":{"type":"string"},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"}},"required":["id","firstName","lastName","image","email"],"additionalProperties":false},"status":{"type":"string","enum":["PENDING","APPROVED","DECLINED"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","roundId","userId","user","status","reason","completedAt","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-clustering/jobs/{workflowId}/status":{"get":{"operationId":"ticketClustering-getTicketClusteringJobStatus","summary":"Get status of a ticket clustering job","description":"Retrieves the current status and results of a ticket clustering job by workflow ID","tags":["Ticket Clustering"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workflowId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"processing"},"workflowId":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","workflowId","createdAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"completed"},"l0_clusters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"cluster_id":{"type":"number"},"title":{"type":"string"},"ticket_count":{"type":"number"},"l1_cluster_count":{"type":"number"},"source_l1_cluster_ids":{"type":"array","items":{"type":"number"}}},"required":["cluster_id","title","ticket_count","l1_cluster_count","source_l1_cluster_ids"],"additionalProperties":false}},"l1_clusters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"cluster_id":{"type":"number"},"title":{"type":"string"},"ticket_count":{"type":"number"}},"required":["cluster_id","title","ticket_count"],"additionalProperties":false}},"workflowId":{"type":"string"},"createdAt":{"type":"string"},"completedAt":{"type":"string"},"totalTickets":{"type":"number"},"totalClusters":{"type":"number"}},"required":["status","l0_clusters","l1_clusters","workflowId","createdAt","completedAt","totalTickets","totalClusters"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"failed"},"workflowId":{"type":"string"},"error":{"type":"string"},"createdAt":{"type":"string"}},"required":["status","workflowId","createdAt"],"additionalProperties":false}],"type":"object"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-clustering/clusters/l0/{workflowId}/l1":{"get":{"operationId":"ticketClustering-getL1ClustersForL0","summary":"Get L1 sub-clusters for a specific L0 cluster","description":"Fetches L1 clusters with ticket lists for a given L0 cluster ID","tags":["Ticket Clustering"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workflowId","schema":{"type":"string"},"required":true},{"in":"query","name":"l0ClusterId","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"cluster_id":{"type":"number"},"title":{"type":"string"},"ticket_list":{"type":"array","items":{"type":"string"}},"ticket_count":{"type":"number"}},"required":["cluster_id","title","ticket_list","ticket_count"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-clustering/clusters/l1/{workflowId}/tickets":{"get":{"operationId":"ticketClustering-getL1ClusterTickets","summary":"Get tickets for a specific L1 cluster","description":"Fetches paginated ticket details for tickets in an L1 cluster","tags":["Ticket Clustering"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workflowId","schema":{"type":"string"},"required":true},{"in":"query","name":"l1ClusterId","schema":{"type":"number"},"required":true},{"in":"query","name":"page","schema":{"default":1,"type":"number"}},{"in":"query","name":"limit","schema":{"default":20,"type":"number","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"closedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"requestType":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isPrivate":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"iconImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isPrivate","color","icon","iconImageUrl"],"additionalProperties":false},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentAssigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"shortId":{"type":"string"},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"dueAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"followers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"approvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"declinedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"shares":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"queueId":{"type":"string"},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"}},"required":["workspaceId","name","emoji"],"additionalProperties":false},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","queueId","queue","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"published":{"type":"boolean"},"queueId":{"type":"string"},"requesterId":{"anyOf":[{"type":"string"},{"type":"null"}]},"requesterAnonymized":{"type":"boolean"},"resolvedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"summaryUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignedAIAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"startAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"snoozeUntil":{"anyOf":[{"type":"string"},{"type":"null"}]},"respondedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastAgentResponse":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentParticipated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"slackChannel":{"anyOf":[{"type":"object","properties":{"appId":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":"string"}},"required":["appId","channelId","channelName"],"additionalProperties":false},{"type":"null"}]},"slackThreads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"channelId":{"type":"string"},"messageTs":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","type","userId","appId","channelId","messageTs","mirrorTs","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"statusGroupId":{"type":"string"},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","statusGroupId","statusGroup","requestTypes","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"workspaceId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","color","aiGenerated","workspaceId","description","createdAt","updatedAt"],"additionalProperties":false}},"stars":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}},"queue":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"organizationId":{"type":"string"}},"required":["id","slug","organizationId"],"additionalProperties":false},"prefix":{"type":"string"},"emoji":{"type":"string"},"type":{"type":"string","enum":["DEFAULT","PORTAL","DM","PERSONAL_DM","AGENT_RUNS"]},"system":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"aiEnabled":{"type":"boolean"},"respondOnMessage":{"type":"string"},"respondOnMention":{"type":"boolean"},"allowInboundEmails":{"type":"boolean"},"onlyRespondToRequests":{"type":"boolean"},"autoCreateTickets":{"type":"boolean"},"ignoreInternalMembers":{"type":"boolean"},"autoClassify":{"type":"boolean"},"autoTag":{"type":"boolean"},"autoTagCreateNew":{"type":"boolean"},"enableUserActions":{"type":"boolean"},"enableUserEmojis":{"type":"boolean"},"enableCSAT":{"type":"boolean"},"enableEmojiUpdates":{"type":"boolean"},"sendAllTicketToTriageChannel":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"enableGranularSlackNotifications":{"type":"boolean"},"negativeFeedbackAutoCreate":{"type":"boolean"},"allowGuestUsers":{"type":"boolean"},"silentMode":{"type":"boolean"},"whitelistedInboundEmails":{"type":"array","items":{"type":"string"}},"whitelistedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedInboundEmails":{"type":"array","items":{"type":"string"}},"blockedInboundDomains":{"type":"array","items":{"type":"string"}},"blockedOutboundEmails":{"type":"array","items":{"type":"string"}},"blockedOutboundDomains":{"type":"array","items":{"type":"string"}},"emailSenderName":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailSenderAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailFooter":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendBouncedEmails":{"type":"boolean"},"maskInternalAgentEmails":{"type":"boolean"},"extractForwardedRequester":{"type":"boolean"},"ignoreCcRecipients":{"type":"boolean"},"ignoreBccRecipients":{"type":"boolean"}},"required":["id","aiEnabled","respondOnMessage","respondOnMention","allowInboundEmails","onlyRespondToRequests","autoCreateTickets","ignoreInternalMembers","autoClassify","autoTag","autoTagCreateNew","enableUserActions","enableUserEmojis","enableCSAT","enableEmojiUpdates","sendAllTicketToTriageChannel","showInSlackAssistant","enableGranularSlackNotifications","negativeFeedbackAutoCreate","allowGuestUsers","silentMode","whitelistedInboundEmails","whitelistedInboundDomains","blockedInboundEmails","blockedInboundDomains","blockedOutboundEmails","blockedOutboundDomains","emailSenderName","emailSenderAddress","emailFooter","sendBouncedEmails","maskInternalAgentEmails","extractForwardedRequester","ignoreCcRecipients","ignoreBccRecipients"],"additionalProperties":false},{"type":"null"}]},"slackChannels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"type":"string"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"audienceType":{"type":"string"},"status":{"type":"string"}},"required":["id","name","emoji","color","description","icon","audienceType","status"],"additionalProperties":false}},"agent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false},{"type":"null"}]},"queueAgents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"number"}},"required":["id","name","description","imageUrl","version"],"additionalProperties":false}},"required":["id","agent"],"additionalProperties":false}},"autoAssignees":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"_count":{"type":"object","properties":{"tickets":{"type":"number"}},"required":["tickets"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","workspaceId","workspace","prefix","emoji","type","system","ownerId","settings","slackChannels","requestTypes","agent","queueAgents","autoAssignees","_count","createdAt","updatedAt","deletedAt"],"additionalProperties":false},"originalQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"requestTypeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"csat":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"score":{"type":"number","minimum":1,"maximum":5},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"type":"string"},"ticketId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","score","feedback","userId","ticketId","createdAt","updatedAt"],"additionalProperties":false}},"disableAIResponse":{"type":"boolean"},"customFields":{},"attributeFields":{},"metadata":{"anyOf":[{},{"type":"null"}]},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","prefix","workspaceId"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"children":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"queueId":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"statusId":{"anyOf":[{"type":"string"},{"type":"null"}]},"assigneeId":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"string","enum":["URGENT","HIGH","MEDIUM","LOW","NO_PRIORITY"]},"queue":{"type":"object","properties":{"workspaceId":{"type":"string"},"prefix":{"type":"string"}},"required":["workspaceId","prefix"],"additionalProperties":false},"status":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]}},"required":["id","title","queueId","number","statusId","assigneeId","priority","queue","status"],"additionalProperties":false}},"mergedIntoId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedById":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergedInto":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"incident":{"type":"boolean"},"incidentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"incidentTracker":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"number":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"queue":{"type":"object","properties":{"id":{"type":"string"},"prefix":{"type":"string"},"workspaceId":{"type":"string"},"workspace":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","prefix","workspaceId","workspace"],"additionalProperties":false}},"required":["id","number","title","queue"],"additionalProperties":false},{"type":"null"}]},"categoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"examples":{"type":"array","items":{"type":"string"}},"isDefault":{"type":"boolean"},"templateSlug":{"anyOf":[{"type":"string"},{"type":"null"}]},"templateGroups":{"type":"array","items":{"type":"string"}},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","description","icon","color","examples","isDefault","templateSlug","templateGroups","workspaceId","createdAt","updatedAt","deletedAt"],"additionalProperties":false},{"type":"null"}]},"approvalStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalCompletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"csatScore":{"anyOf":[{"type":"number"},{"type":"null"}]},"metricValues":{"type":"array","items":{"type":"object","properties":{"metricKey":{"type":"string"},"stringValue":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["metricKey","stringValue"],"additionalProperties":false}},"approvalRounds":{"type":"array","items":{"type":"object","properties":{"approvers":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false}}},"required":["approvers"],"additionalProperties":false}},"assignee":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"requester":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"userGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}}},"required":["userGroups"],"additionalProperties":false},{"type":"null"}]}},"required":["id","publishedAt","assignedAt","closedAt","createdAt","updatedAt","requestType","assigneeId","agentAssigneeId","shortId","authorId","code","private","description","dueAt","followers","approvers","approvedAt","declinedAt","number","priority","shares","published","queueId","requesterId","resolvedAt","summary","summaryUpdatedAt","assignedAIAgent","startAt","snoozeUntil","respondedAt","slackChannelId","archivedAt","lastAgentResponse","agentParticipated","slackChannel","slackThreads","source","type","statusId","status","tags","stars","queue","originalQueueId","title","requestTypeId","csat","disableAIResponse","customFields","attributeFields","metadata","parentId","parent","children","mergedIntoId","mergedAt","mergedById","mergedInto","incident","incidentId","incidentTracker","categoryId","category","approvalStatus","approvalCompletedAt","csatScore","metricValues","approvalRounds","assignee","requester","author"],"additionalProperties":false}},"totalCount":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["tickets","totalCount","page","pageSize","hasMore"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-links/{id}":{"get":{"operationId":"ticketLink-get","summary":"Get a ticket link","tags":["Ticket Link"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"userId":{"type":"string"},"ticketId":{"type":"string"},"remoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationReplication":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","url","userId","ticketId","remoteId","createdAt","updatedAt","integrationReplication"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"ticketLink-update","summary":"Update a ticket link","tags":["Ticket Link"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"userId":{"type":"string"},"ticketId":{"type":"string"},"remoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationReplication":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","url","userId","ticketId","remoteId","createdAt","updatedAt","integrationReplication"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"ticketLink-delete","summary":"Delete a ticket link","tags":["Ticket Link"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"userId":{"type":"string"},"ticketId":{"type":"string"},"remoteId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"integrationReplication":{"anyOf":[{"type":"object","properties":{"integration":{"anyOf":[{"type":"object","properties":{"app":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]}},"required":["app"],"additionalProperties":false},{"type":"null"}]}},"required":["integration"],"additionalProperties":false},{"type":"null"}]}},"required":["id","name","url","userId","ticketId","remoteId","createdAt","updatedAt","integrationReplication"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/ticket-messages/{id}":{"get":{"operationId":"ticketMessage-byId","summary":"Get a ticket message by ID","tags":["Ticket Message"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"author":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["firstName","lastName","email","image"],"additionalProperties":false},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackMessages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ts":{"type":"string"},"channelId":{"type":"string"},"teamId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"thread":{"anyOf":[{"type":"object","properties":{"messageTs":{"type":"string"}},"required":["messageTs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ts","channelId","teamId","ticketMessageId","threadId","thread","createdAt","updatedAt"],"additionalProperties":false}},"deleted":{"type":"boolean"},"reactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"type":"string"},"authorId":{"type":"string"},"ticketMessageId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","image"],"additionalProperties":false}},"required":["id","emoji","authorId","ticketMessageId","author"],"additionalProperties":false}},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailInReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"broadcastFromMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{},{"type":"null"}]},"aiGenerated":{"type":"boolean"},"agentResponseType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","content","authorId","author","ticketId","source","status","slackChannelId","slackMessages","deleted","reactions","emailMessageId","emailInReplyTo","private","aiGenerated","agentResponseType","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"ticketMessage-update","summary":"Update a ticket message","tags":["Ticket Message"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string","enum":["WEB","EMAIL","FORM","SLACK","SLA","WORKFLOW","JIRA","INTEGRATION","SYSTEM","AGENT","TEAMS","PORTAL","MCP","COPILOT","FRESHSERVICE","LINEAR"]},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["CREATED","EDITED","DELETED"]},{"type":"null"}]},"slackTimestamp":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"reactions":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"noDispatch":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"author":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["firstName","lastName","email","image"],"additionalProperties":false},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackMessages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ts":{"type":"string"},"channelId":{"type":"string"},"teamId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"thread":{"anyOf":[{"type":"object","properties":{"messageTs":{"type":"string"}},"required":["messageTs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ts","channelId","teamId","ticketMessageId","threadId","thread","createdAt","updatedAt"],"additionalProperties":false}},"deleted":{"type":"boolean"},"reactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"type":"string"},"authorId":{"type":"string"},"ticketMessageId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","image"],"additionalProperties":false}},"required":["id","emoji","authorId","ticketMessageId","author"],"additionalProperties":false}},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailInReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"broadcastFromMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{},{"type":"null"}]},"aiGenerated":{"type":"boolean"},"agentResponseType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","content","authorId","author","ticketId","source","status","slackChannelId","slackMessages","deleted","reactions","emailMessageId","emailInReplyTo","private","aiGenerated","agentResponseType","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"ticketMessage-delete","summary":"Delete a ticket message","tags":["Ticket Message"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"noDispatch","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"authorId":{"type":"string"},"author":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["firstName","lastName","email","image"],"additionalProperties":false},"ticketId":{"type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackChannelId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackMessages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ts":{"type":"string"},"channelId":{"type":"string"},"teamId":{"type":"string"},"ticketMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"thread":{"anyOf":[{"type":"object","properties":{"messageTs":{"type":"string"}},"required":["messageTs"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","ts","channelId","teamId","ticketMessageId","threadId","thread","createdAt","updatedAt"],"additionalProperties":false}},"deleted":{"type":"boolean"},"reactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"emoji":{"type":"string"},"authorId":{"type":"string"},"ticketMessageId":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","image"],"additionalProperties":false}},"required":["id","emoji","authorId","ticketMessageId","author"],"additionalProperties":false}},"emailMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailInReplyTo":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"broadcastFromMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{},{"type":"null"}]},"aiGenerated":{"type":"boolean"},"agentResponseType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","content","authorId","author","ticketId","source","status","slackChannelId","slackMessages","deleted","reactions","emailMessageId","emailInReplyTo","private","aiGenerated","agentResponseType","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/statuses/{id}":{"get":{"operationId":"ticketStatus-get","summary":"Get status by id","tags":["Status"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"system":{"type":"boolean"},"requestTypes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestTypeId":{"type":"string"},"order":{"type":"number"}},"required":["id","requestTypeId","order"],"additionalProperties":false}},"statusGroup":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"}},"required":["id","label","order","workspaceId"],"additionalProperties":false},"statusGroupId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","order","system","requestTypes","statusGroup","statusGroupId","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/tags/{id}":{"put":{"operationId":"ticketTags-update","summary":"Update a tag","tags":["Tags"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"description":"ID of the tag to update.","type":"string"},"required":true,"description":"ID of the tag to update."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"New name. Must stay unique in the workspace. Omit if not changing.","type":"string","minLength":1},"description":{"description":"New description. Pass an empty string (or null over REST) to clear it; omit to leave it unchanged.","anyOf":[{"type":"string"},{"type":"null"}]},"color":{"description":"New color. Omit if not changing.","type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"workspaceId":{"type":"string"},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","color","workspaceId","aiGenerated","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"ticketTags-delete","summary":"Delete a tag","tags":["Tags"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},"workspaceId":{"type":"string"},"aiGenerated":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","color","workspaceId","aiGenerated","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/users/{id}":{"get":{"operationId":"user-get","summary":"Get user by id","tags":["User"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"user-update","summary":"Update a user","tags":["User"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"workspaceRole":{"anyOf":[{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},{"type":"null"}]},"organizationRole":{"anyOf":[{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},{"type":"null"}]},"email":{"type":"string"},"image":{"type":"object","properties":{"base64":{"type":"string"},"fileName":{"type":"string"}}},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/users/{id}/deactivate":{"post":{"operationId":"user-deactivate","summary":"Deactivate a user in the organization (admin only)","tags":["User"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/users/{id}/reactivate":{"post":{"operationId":"user-reactivate","summary":"Reactivate a deactivated user (admin only)","tags":["User"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/users/{id}/block":{"post":{"operationId":"user-block","summary":"Deprecated: use /users/{id}/deactivate","tags":["User"],"security":[{"Authorization":[]}],"deprecated":true,"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/users/{id}/unblock":{"post":{"operationId":"user-unblock","summary":"Deprecated: use /users/{id}/reactivate","tags":["User"],"security":[{"Authorization":[]}],"deprecated":true,"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/user-groups/{id}":{"get":{"operationId":"userGroup-get","summary":"Get a user group","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"}},"required":["users"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"userIds":{"type":"array","items":{"type":"string"}},"workspaceIds":{"type":"array","items":{"type":"string"}},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"isImmutable":{"type":"boolean"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt","userIds","workspaceIds","integrationSource","isImmutable"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"userGroup-update","summary":"Update a user group","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"},"imageUrl":{"type":"string","format":"uri"},"userIds":{"type":"array","items":{"type":"string"}},"workspaceIds":{"type":"array","items":{"type":"string"}},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"}},"required":["users"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"userGroup-delete","summary":"Delete a user group","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"}},"required":["users"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/user-groups/{id}/users":{"get":{"operationId":"userGroup-getWithUsers","summary":"Get a user group with users","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["user","email","createdAt"]}},{"in":"query","name":"sortDirection","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"}},"required":["users"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false}},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"isImmutable":{"type":"boolean"}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt","users","integrationSource","isImmutable"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/user-groups/{id}/users-workspaces":{"get":{"operationId":"userGroup-getWithUsersAndWorkspaces","summary":"Get a user group with users and workspaces","tags":["User Group"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["user","email","createdAt"]}},{"in":"query","name":"sortDirection","schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"integrationGroupId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"_count":{"type":"object","properties":{"users":{"type":"number"}},"required":["users"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultWorkspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isGuestCreated":{"type":"boolean"},"isBot":{"type":"boolean"},"createdAt":{"type":"string"},"auth0Id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string"},"slackUsers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slackUserId":{"type":"string"},"slackTeamId":{"type":"string"},"slackAppId":{"type":"string"},"slackImageUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackRealName":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackDisplayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isBot":{"type":"boolean"},"isConnected":{"type":"boolean"},"userGrantedScopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"slackApp":{"type":"object","properties":{"appId":{"type":"string"},"teamName":{"type":"string"}},"required":["appId","teamName"],"additionalProperties":false}},"required":["id","slackUserId","slackTeamId","slackAppId","slackImageUrl","slackRealName","slackDisplayName","isBot","userGrantedScopes","createdAt","updatedAt","slackApp"],"additionalProperties":false}},"outOfOffice":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"delegateType":{"anyOf":[{"type":"string","enum":["manager","user"]},{"type":"null"}]},"delegateUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"activityStatus":{"anyOf":[{"type":"string","enum":["active","out_of_office"]},{"type":"null"}]},"activityStatusSource":{"anyOf":[{"type":"string","enum":["manual","slack_sync"]},{"type":"null"}]}},"required":["id","delegateType","delegateUserId","activityStatus","activityStatusSource"],"additionalProperties":false},{"type":"null"}]}},"required":["id","firstName","lastName","email","image","emailVerified","defaultWorkspaceId","isGuestCreated","isBot","createdAt","auth0Id","updatedAt","slackUsers"],"additionalProperties":false}},"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","brandColor"],"additionalProperties":false}},"integrationSource":{"anyOf":[{"type":"string","enum":["CODA","CONFLUENCE","NOTION","SLACK","GOOGLE_DRIVE","ONE_NOTE","CLICK_UP","RAVENNA","ZENDESK","GURU","SLITE","GITHUB_KB","FRESHSERVICE_KB","SHAREPOINT","OKTA","GOOGLE_WORKSPACE","CLOUDFLARE_ACCESS","JUMPCLOUD","MICROSOFT_ENTRA","ONE_LOGIN","INCIDENT_IO","PAGER_DUTY","MERGE_DEV","RIPPLING","HIBOB","WORKDAY","FLEET_DM","JAMF_PRO","IRU","MICROSOFT_INTUNE","OMNISSA","VANTA","LINEAR","JIRA","GITHUB","FRESHSERVICE","ZAPIER","TEAMS","HUBSPOT","STATIC_WEBPAGE","FOUNDRY_CUSTOM","FOUNDRY_CODE","FOUNDRY_OAUTH"]},{"type":"null"}]},"isImmutable":{"type":"boolean"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"aliases":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","imageUrl","organizationId","integrationGroupId","ownerId","createdAt","updatedAt","users","workspaces","integrationSource","isImmutable"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webauthn/credentials/{id}":{"delete":{"operationId":"webAuthn-deleteCredential","summary":"Delete a WebAuthn credential","tags":["WebAuthn"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"deviceType":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","deviceType","createdAt","lastUsedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/webhooks/{id}":{"get":{"operationId":"webhook-get","summary":"Get webhook by ID","tags":["webhooks"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string","enum":["Ticket","Message"]}},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","url","secret","active","eventTypes","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"webhook-update","summary":"Update an existing webhook","tags":["webhooks"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string","enum":["Ticket","Message"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"type":"string"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"eventTypes":{"type":"array","items":{"type":"string","enum":["Ticket","Message"]}},"workspaceId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","url","secret","active","eventTypes","workspaceId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"webhook-delete","summary":"Delete a webhook","tags":["webhooks"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/{id}":{"get":{"operationId":"workflow-getById","summary":"Get workflow by id","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"workflow-update","summary":"Update workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"collectionId":{"type":"string"},"authorId":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"workflow-delete","summary":"Delete workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/{id}/validate":{"get":{"operationId":"workflow-validate","summary":"Validate workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"violations":{"type":"object","propertyNames":{"description":"The unique identifier for the step","type":"string"},"additionalProperties":{"type":"object","propertyNames":{"description":"The field id","type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"array","items":{}}},"required":["code","message"],"additionalProperties":false}}}},"warnings":{"type":"object","propertyNames":{"description":"The unique identifier for the step","type":"string"},"additionalProperties":{"type":"object","propertyNames":{"description":"The field id","type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}}}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/steps/{id}":{"put":{"operationId":"workflow-updateStep","summary":"Update step","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"description":"The unique identifier for the step","type":"string"},"required":true,"description":"The unique identifier for the step"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}},"workflowId":{"type":"string"},"sourceId":{"type":"string"},"targetId":{"type":"string"}},"required":["action","inputs","workflowId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Action","Activity","Conditional","Trigger"]},"group":{"type":"string"},"description":{"type":"string"},"title":{"type":"string"},"app":{"type":"string"},"inputs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}}},"outputs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}}},"hidden":{"type":"boolean"},"disabled":{"type":"boolean"},"disabledReason":{"type":"string"},"disabledType":{"type":"string","enum":["not_installed","restricted","config_gate"]},"version":{"type":"number"},"capabilities":{"type":"object","properties":{"canBranch":{"default":true,"type":"boolean"},"canHaveChildren":{"default":true,"type":"boolean"}},"required":["canBranch","canHaveChildren"],"additionalProperties":false}},"required":["name","type","inputs","outputs"],"additionalProperties":false},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}},"suggestions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}},"stepId":{"type":"string"}},"required":["field","stepId"],"additionalProperties":false}},"inputsWithSuggestions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}}},"required":["id","title","action","inputs"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/{workflowId}/run":{"post":{"operationId":"workflow-run","summary":"Run workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workflowId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"anyOf":[{},{"type":"null"}]}},"additionalProperties":{}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"}},"required":["runId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/runs/{runId}/retry":{"post":{"operationId":"workflow-retryWorkflowRun","summary":"Retry workflow run","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"runId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"},"retryFromFailure":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"}},"required":["runId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/{id}/activate":{"post":{"operationId":"workflow-activate","summary":"Activate workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"violations":{"type":"object","propertyNames":{"description":"The unique identifier for the step","type":"string"},"additionalProperties":{"type":"object","propertyNames":{"description":"The field id","type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"array","items":{}}},"required":["code","message"],"additionalProperties":false}}}},"warnings":{"type":"object","propertyNames":{"description":"The unique identifier for the step","type":"string"},"additionalProperties":{"type":"object","propertyNames":{"description":"The field id","type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}}}}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/runs/{id}":{"get":{"operationId":"workflow-getWorkflowRun","summary":"Get workflow run","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","completed_with_errors","failed","cancelled","skipped"]},"workflowId":{"type":"string"},"workflowVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"stepId":{"type":"string"},"runId":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed","waiting","skipped"]},"inputs":{},"outputs":{},"inferredInputs":{},"runIndex":{"type":"number"},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"auditEvents":{"type":"array","items":{"type":"object","properties":{"entityType":{"type":"string","enum":["ticket","slack","workflow","step","integration","code_action","foundryAction"]},"entityId":{"type":"string"},"event":{"type":"string"},"message":{"type":"string"},"level":{"default":"info","type":"string","enum":["info","warning","error"]},"data":{}},"required":["entityType","entityId","event","message","level"],"additionalProperties":false}},"inferredInputsSummary":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"},"fieldType":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"resourceData":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"type":"string"},"link":{"type":"string"},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"metadata":{},"users":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"type":"string"},"link":{"type":"string"},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"metadata":{}},"required":["label","value"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"type":"string"},"link":{"type":"string"},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"metadata":{}},"required":["label","value"],"additionalProperties":false}}},"required":["label","value"],"additionalProperties":false}},"required":["key","summary"],"additionalProperties":false}},{"type":"null"}]},"outputsSummary":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"summary":{"type":"string"},"fieldType":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"resourceData":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"type":"string"},"link":{"type":"string"},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"metadata":{},"users":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"type":"string"},"link":{"type":"string"},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"metadata":{}},"required":["label","value"],"additionalProperties":false}},"tags":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"image":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"type":"string"},"link":{"type":"string"},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]},"metadata":{}},"required":["label","value"],"additionalProperties":false}}},"required":["label","value"],"additionalProperties":false}},"required":["key","summary"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","stepId","runId","status","inputs","outputs","inferredInputs","runIndex","startedAt","completedAt","createdAt"],"additionalProperties":false}},"workflowVersionSnapshot":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}}},"required":["id","name","connections","steps"],"additionalProperties":false},{"type":"null"}]}},"required":["id","status","workflowId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/templates/{id}":{"get":{"operationId":"workflow-template-get","summary":"Get template workflow","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-collections/{id}":{"get":{"operationId":"workflowCollection-get","summary":"Get a workflow collection","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"authorId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"workspaceId":{"type":"string"},"parentCollectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"workflowCount":{"type":"number"}},"required":["id","name","description","emoji","icon","color","createdAt","updatedAt","deletedAt","authorId","author","workspaceId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"workflowCollection-delete","summary":"Delete a workflow collection","tags":["Workflow-Collections"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"query","name":"deleteContents","schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-config/{id}/config":{"get":{"operationId":"workflowConfig-getForWorkflow","summary":"Get workflow config","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"isTemplate":{"type":"boolean"},"connections":{"type":"array","items":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"sourceId":{"type":"string"},"targetId":{"type":"string"},"criteria":{},"id":{"type":"string"}},"required":["sourceId","targetId","id"],"additionalProperties":false}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"string"},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}}},"required":["id","title","action","inputs"],"additionalProperties":false}},"collectionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string"},"image":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","firstName","lastName","email","image"],"additionalProperties":false},{"type":"null"}]},"state":{"type":"string","enum":["Active","Draft","Paused","Deprovisioning","Deleted"]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"primaryIntegration":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"activeVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasChanges":{"type":"boolean"},"settings":{"type":"object","properties":{"webhookUrl":{"type":"string"},"allowedDomains":{"default":[],"type":"array","items":{"type":"string"}}},"required":["webhookUrl","allowedDomains"],"additionalProperties":false}},"required":["id","name","isTemplate","connections","steps","collectionId","author","state","reference","tags","primaryIntegration","createdAt","updatedAt","activeVersionId"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspaces/{id}":{"get":{"operationId":"workspace-get","summary":"Get a workspaces","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"slackBotIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackEmojiActions":{},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackTriageChannels":{"type":"array","items":{"type":"object","properties":{"workspace":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"private":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},"channelId":{"type":"string"},"channelName":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","name","emoji","workspaceId"],"additionalProperties":false},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextTeamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"app":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"teamUrl":{"type":"string"},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["teamId","teamName","teamUrl","channelName"],"additionalProperties":false}},"required":["workspace","id","createdAt","updatedAt","private","deletedAt","type","channelId","channelName","mirrorTs","appId","workspaceId","queue","queueId","agentId","slackUserId","userId","ticketId","contextTeamId","app"],"additionalProperties":false}},"slugAliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","slug","workspaceId","organizationId","createdAt"],"additionalProperties":false}},"userGroupMemberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},"userGroupId":{"type":"string"}},"required":["id","role","userGroupId"],"additionalProperties":false}},"activePersonality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketAssigneeScope":{"type":"string"},"visibleInSlack":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"showInPortal":{"type":"boolean"},"showInDMs":{"type":"boolean"},"showSlackStatus":{"type":"boolean"},"showSlackPriority":{"type":"boolean"},"showSlackDescription":{"type":"boolean"},"showSlackAssignee":{"type":"boolean"},"showSlackRequester":{"type":"boolean"},"showSlackApprovers":{"type":"boolean"},"showSlackFollowers":{"type":"boolean"},"showSlackSource":{"type":"boolean"},"showSlackCustomFields":{"type":"boolean"},"slackFieldOrder":{},"enableBotUsers":{"type":"boolean"},"enableAdminApprovals":{"type":"boolean"},"allowRequesterAsApprover":{"type":"boolean"},"allowPostDecisionApprovalEdits":{"type":"boolean"},"enableReopenOnMessage":{"type":"boolean"},"closeTicketTaskPolicy":{"type":"string"},"customerPortalConfig":{},"biometricApprovalEnabled":{"type":"boolean"},"biometricWindowSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","ticketAssigneeScope","visibleInSlack","showInSlackAssistant","showInPortal","showInDMs","showSlackStatus","showSlackPriority","showSlackDescription","showSlackAssignee","showSlackRequester","showSlackApprovers","showSlackFollowers","showSlackSource","showSlackCustomFields","slackFieldOrder","enableBotUsers","enableAdminApprovals","allowRequesterAsApprover","allowPostDecisionApprovalEdits","enableReopenOnMessage","closeTicketTaskPolicy","customerPortalConfig","biometricApprovalEnabled","biometricWindowSeconds"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","description","organizationId","creatorId","ownerId","private","slackBotIconUrl","slackBotUsername","slackEmojiActions","brandIcon","brandColor","defaultQueueId","slackTriageChannels","slugAliases","userGroupMemberships","activePersonality","settings","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"workspace-update","summary":"Updates a workspaces","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotIcon":{"type":"object","properties":{"base64":{"type":"string"},"fileName":{"type":"string"}}},"memberUserGroupIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}},"adminUserGroupIds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"slackBotIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackEmojiActions":{},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackTriageChannels":{"type":"array","items":{"type":"object","properties":{"workspace":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"private":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},"channelId":{"type":"string"},"channelName":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","name","emoji","workspaceId"],"additionalProperties":false},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextTeamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"app":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"teamUrl":{"type":"string"},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["teamId","teamName","teamUrl","channelName"],"additionalProperties":false}},"required":["workspace","id","createdAt","updatedAt","private","deletedAt","type","channelId","channelName","mirrorTs","appId","workspaceId","queue","queueId","agentId","slackUserId","userId","ticketId","contextTeamId","app"],"additionalProperties":false}},"slugAliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","slug","workspaceId","organizationId","createdAt"],"additionalProperties":false}},"userGroupMemberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},"userGroupId":{"type":"string"}},"required":["id","role","userGroupId"],"additionalProperties":false}},"activePersonality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketAssigneeScope":{"type":"string"},"visibleInSlack":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"showInPortal":{"type":"boolean"},"showInDMs":{"type":"boolean"},"showSlackStatus":{"type":"boolean"},"showSlackPriority":{"type":"boolean"},"showSlackDescription":{"type":"boolean"},"showSlackAssignee":{"type":"boolean"},"showSlackRequester":{"type":"boolean"},"showSlackApprovers":{"type":"boolean"},"showSlackFollowers":{"type":"boolean"},"showSlackSource":{"type":"boolean"},"showSlackCustomFields":{"type":"boolean"},"slackFieldOrder":{},"enableBotUsers":{"type":"boolean"},"enableAdminApprovals":{"type":"boolean"},"allowRequesterAsApprover":{"type":"boolean"},"allowPostDecisionApprovalEdits":{"type":"boolean"},"enableReopenOnMessage":{"type":"boolean"},"closeTicketTaskPolicy":{"type":"string"},"customerPortalConfig":{},"biometricApprovalEnabled":{"type":"boolean"},"biometricWindowSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","ticketAssigneeScope","visibleInSlack","showInSlackAssistant","showInPortal","showInDMs","showSlackStatus","showSlackPriority","showSlackDescription","showSlackAssignee","showSlackRequester","showSlackApprovers","showSlackFollowers","showSlackSource","showSlackCustomFields","slackFieldOrder","enableBotUsers","enableAdminApprovals","allowRequesterAsApprover","allowPostDecisionApprovalEdits","enableReopenOnMessage","closeTicketTaskPolicy","customerPortalConfig","biometricApprovalEnabled","biometricWindowSeconds"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","description","organizationId","creatorId","ownerId","private","slackBotIconUrl","slackBotUsername","slackEmojiActions","brandIcon","brandColor","defaultQueueId","slackTriageChannels","slugAliases","userGroupMemberships","activePersonality","settings","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"workspace-delete","summary":"Deletes a workspaces","tags":["Workspace"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"creatorId":{"type":"string"},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"private":{"type":"boolean"},"slackBotIconUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackBotUsername":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackEmojiActions":{},"brandIcon":{"anyOf":[{"type":"string"},{"type":"null"}]},"brandColor":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultQueueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackTriageChannels":{"type":"array","items":{"type":"object","properties":{"workspace":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"id":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"private":{"type":"boolean"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"type":"string","enum":["DM","PERSONAL_DM","REQUEST","TRIAGE","GROUP","ASSISTANT","OTHER"]},"channelId":{"type":"string"},"channelName":{"type":"string"},"mirrorTs":{"anyOf":[{"type":"string"},{"type":"null"}]},"appId":{"type":"string"},"workspaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"queue":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"emoji":{"type":"string"},"workspaceId":{"type":"string"}},"required":["id","name","emoji","workspaceId"],"additionalProperties":false},{"type":"null"}]},"queueId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"slackUserId":{"anyOf":[{"type":"string"},{"type":"null"}]},"userId":{"anyOf":[{"type":"string"},{"type":"null"}]},"ticketId":{"anyOf":[{"type":"string"},{"type":"null"}]},"contextTeamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"app":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"teamUrl":{"type":"string"},"channelName":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["teamId","teamName","teamUrl","channelName"],"additionalProperties":false}},"required":["workspace","id","createdAt","updatedAt","private","deletedAt","type","channelId","channelName","mirrorTs","appId","workspaceId","queue","queueId","agentId","slackUserId","userId","ticketId","contextTeamId","app"],"additionalProperties":false}},"slugAliases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"workspaceId":{"type":"string"},"organizationId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","slug","workspaceId","organizationId","createdAt"],"additionalProperties":false}},"userGroupMemberships":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string","enum":["ADMIN","BOT","GUEST","MEMBER"]},"userGroupId":{"type":"string"}},"required":["id","role","userGroupId"],"additionalProperties":false}},"activePersonality":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}]},"tone":{"anyOf":[{"type":"string"},{"type":"null"}]},"emoji":{"anyOf":[{"type":"string"},{"type":"null"}]},"length":{"anyOf":[{"type":"string"},{"type":"null"}]},"greeting":{"anyOf":[{"type":"string"},{"type":"null"}]},"branding":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","workspaceId","persona","tone","emoji","length","greeting","branding","createdAt","updatedAt"],"additionalProperties":false},{"type":"null"}]},"settings":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"ticketAssigneeScope":{"type":"string"},"visibleInSlack":{"type":"boolean"},"showInSlackAssistant":{"type":"boolean"},"showInPortal":{"type":"boolean"},"showInDMs":{"type":"boolean"},"showSlackStatus":{"type":"boolean"},"showSlackPriority":{"type":"boolean"},"showSlackDescription":{"type":"boolean"},"showSlackAssignee":{"type":"boolean"},"showSlackRequester":{"type":"boolean"},"showSlackApprovers":{"type":"boolean"},"showSlackFollowers":{"type":"boolean"},"showSlackSource":{"type":"boolean"},"showSlackCustomFields":{"type":"boolean"},"slackFieldOrder":{},"enableBotUsers":{"type":"boolean"},"enableAdminApprovals":{"type":"boolean"},"allowRequesterAsApprover":{"type":"boolean"},"allowPostDecisionApprovalEdits":{"type":"boolean"},"enableReopenOnMessage":{"type":"boolean"},"closeTicketTaskPolicy":{"type":"string"},"customerPortalConfig":{},"biometricApprovalEnabled":{"type":"boolean"},"biometricWindowSeconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","ticketAssigneeScope","visibleInSlack","showInSlackAssistant","showInPortal","showInDMs","showSlackStatus","showSlackPriority","showSlackDescription","showSlackAssignee","showSlackRequester","showSlackApprovers","showSlackFollowers","showSlackSource","showSlackCustomFields","slackFieldOrder","enableBotUsers","enableAdminApprovals","allowRequesterAsApprover","allowPostDecisionApprovalEdits","enableReopenOnMessage","closeTicketTaskPolicy","customerPortalConfig","biometricApprovalEnabled","biometricWindowSeconds"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"deletedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","slug","description","organizationId","creatorId","ownerId","private","slackBotIconUrl","slackBotUsername","slackEmojiActions","brandIcon","brandColor","defaultQueueId","slackTriageChannels","slugAliases","userGroupMemberships","activePersonality","settings","createdAt","updatedAt","deletedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workspace-custom-fields/{id}":{"put":{"operationId":"workspaceCustomFields-update","summary":"Update a ticket attribute (e.g. reorder)","tags":["Workspace Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"order":{"type":"number"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"number"},"workspaceId":{"type":"string"},"customField":{"type":"object","properties":{"id":{"type":"string"},"workspaceId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":{"type":"boolean"},"hidden":{"type":"boolean"},"system":{"type":"boolean"},"config":{"anyOf":[{},{"type":"null"}]},"type":{"type":"string","enum":["TEXT","TEXT_AREA","NUMBER","DATE","TIME","DATETIME","BOOLEAN","SELECT","FILE_PICKER","MULTI_SELECT","USER_SELECT","USER_MULTI_SELECT","TAG_SELECT","STATUS_SELECT","USER_GROUP_SELECT","USER_GROUP_MULTI_SELECT","PRIORITY_SELECT","TICKET_TYPE_SELECT","APPLICATION_SELECT","APPLICATION_MULTI_SELECT","APPLICATION_GROUP_SELECT","ACCESS_LEVEL_SELECT","DURATION","BUSINESS_JUSTIFICATION","TIMEZONE_SELECT","HEADING","DIVIDER","TEXT_BLOCK","ASSET_SELECT","ASSET_TYPE_SELECT"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"},"order":{"type":"number"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","enum":["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"customFieldId":{"type":"string"},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","value","order","description","color","icon","customFieldId","archivedAt","createdAt","updatedAt"],"additionalProperties":false}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"type":"object","properties":{"requestTypeCustomField":{"type":"number"}},"required":["requestTypeCustomField"],"additionalProperties":false}},"required":["id","workspaceId","key","label","description","required","hidden","system","config","type","options","createdAt","updatedAt","_count"],"additionalProperties":false},"customFieldId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","order","workspaceId","customField","customFieldId","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"delete":{"operationId":"workspaceCustomFields-delete","summary":"Remove a ticket attribute","tags":["Workspace Custom Fields"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/rules/{ruleId}/versions/{versionId}":{"get":{"operationId":"agentModel-getRuleVersion","summary":"Get a snapshot of a rule as it was when it ran","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"ruleId","schema":{"type":"string","minLength":1},"required":true},{"in":"path","name":"versionId","schema":{"type":"string","minLength":1},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ruleId":{"type":"string"},"number":{"type":"number"},"snapshot":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"version":{"type":"number"},"definition":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"audienceType":{"type":"string"},"allowedGroupIds":{"type":"array","items":{"type":"string"}}},"required":["title","description","content","version","definition","audienceType","allowedGroupIds"],"additionalProperties":false},"createdAt":{"type":"string"}},"required":["id","ruleId","number","snapshot","createdAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{agentId}/rules/{ruleId}/attach":{"post":{"operationId":"agentModel-attachRule","summary":"Attach a rule to an agent","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"agentId","schema":{"type":"string"},"required":true},{"in":"path","name":"ruleId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"default":true,"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/agents/{agentId}/rules/{ruleId}":{"delete":{"operationId":"agentModel-detachRule","summary":"Detach a rule from an agent","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"agentId","schema":{"type":"string"},"required":true},{"in":"path","name":"ruleId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}},"put":{"operationId":"agentModel-updateRuleRelation","summary":"Update the rule relation on an agent (e.g., enable/disable)","tags":["Rules"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"agentId","schema":{"type":"string"},"required":true},{"in":"path","name":"ruleId","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/{id}/checkpoints/{checkpointId}/restore":{"post":{"operationId":"foundry-restoreCheckpoint","summary":"Restore a Foundry action to a checkpoint","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"path","name":"checkpointId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/foundry/actions/{id}/checkpoints/{checkpointId}/rollback-published":{"post":{"operationId":"foundry-rollbackPublishedVersion","summary":"Roll back a published Foundry action to a prior published version","tags":["Foundry"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true},{"in":"path","name":"checkpointId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflows/runs/{runId}/steps/{stepId}/fast-forward":{"post":{"operationId":"workflow-fastForwardWaitStep","summary":"Fast-forward a waiting timer step","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"runId","schema":{"type":"string"},"required":true},{"in":"path","name":"stepId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}},"/workflow-config/{workflowId}/steps/{stepId}":{"get":{"operationId":"workflowConfig-getStep","summary":"Get step","tags":["Workflow"],"security":[{"Authorization":[]}],"parameters":[{"in":"path","name":"workflowId","schema":{"type":"string"},"required":true},{"in":"path","name":"stepId","schema":{"type":"string"},"required":true},{"in":"query","name":"suggestions","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The unique identifier for the step","type":"string"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"action":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["Action","Activity","Conditional","Trigger"]},"group":{"type":"string"},"description":{"type":"string"},"title":{"type":"string"},"app":{"type":"string"},"inputs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}}},"outputs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}}},"hidden":{"type":"boolean"},"disabled":{"type":"boolean"},"disabledReason":{"type":"string"},"disabledType":{"type":"string","enum":["not_installed","restricted","config_gate"]},"version":{"type":"number"},"capabilities":{"type":"object","properties":{"canBranch":{"default":true,"type":"boolean"},"canHaveChildren":{"default":true,"type":"boolean"}},"required":["canBranch","canHaveChildren"],"additionalProperties":false}},"required":["name","type","inputs","outputs"],"additionalProperties":false},"inputs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}},"metadata":{"type":"object","properties":{"groupId":{"type":"string"},"isHidden":{"type":"boolean"},"isNotDeletable":{"type":"boolean"},"isNotDuplicable":{"type":"boolean"},"isNotReOrderable":{"type":"boolean"}},"additionalProperties":{}},"suggestions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"object","properties":{"label":{"type":"string"},"key":{"type":"string"},"placeholder":{"type":"string"},"span":{"type":"number"},"type":{"type":"string","enum":["text","contenteditable","prefix","sensitivetext","textarea","select","multiselect","user","checkbox","number","currency","avatarcolor","colorpicker","colorpairpicker","tags","switch","button","switchcard","datetime","time","emoji","icon","iconwithcolor","richtexteditor","customfieldoptions","resourceMapping","ticketfilters","ticketfiltercolumn","ticketfilteroperation","ticketfiltervalue","SLARules","SLAAlerts","logo","logoPicker","logoWithName","filterGroups","filepicker","fileimport","attachments","radiogroup","slider","approvalRounds","heading","divider","textBlock","hexcolor","cardSelect","weeklyHours","cron","tokens","durationselect","multidurationselect"]},"resourceType":{"type":"string","enum":["organization","workspace","workflow-collection","workflow","queue","ticket","ticketMessage","priority","ticketType","status","user-group","user","user-mentions","user_property","document","membershipRole","KB","kb-document","kb-document-folder","icon","tag","sla","business-schedule","integration","application","source","message-visibility","provisioning-method","application-group","assignment-strategy","approval-policy","access-level","access-policy","api-key","okta-application","okta-group","google-group","cloudflare-group","entra-group","jumpcloud-group","linear-team","linear-project","linear-status","linear-member","slack-user","slack-app","slack-channel","slack-thread","slack-message","request-type","agent","agent-bot-user","rule","custom-field","custom-field-option","file-type","duration","task-template","task-item","approval-template","tool","category","timezone","code-action","access-entitlement","time-off-policy-type","workspace-member","organization-member","asset","asset-type","asset-status","foundry-action","foundry-integration","badge"]}},"required":["label","key","placeholder","span","type"],"additionalProperties":{}},"stepId":{"type":"string"}},"required":["field","stepId"],"additionalProperties":false}},"inputsWithSuggestions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"boolean"}]},{"type":"string"}]},{}]}}},"required":["id","title","action","inputs"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}},"components":{"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","example":{"code":"BAD_REQUEST","message":"Invalid input data","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Invalid input data","type":"string"},"code":{"description":"The error code","example":"BAD_REQUEST","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","example":{"code":"UNAUTHORIZED","message":"Authorization not provided","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Authorization not provided","type":"string"},"code":{"description":"The error code","example":"UNAUTHORIZED","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","example":{"code":"FORBIDDEN","message":"Insufficient access","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Insufficient access","type":"string"},"code":{"description":"The error code","example":"FORBIDDEN","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","example":{"code":"NOT_FOUND","message":"Not found","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Not found","type":"string"},"code":{"description":"The error code","example":"NOT_FOUND","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","example":{"code":"INTERNAL_SERVER_ERROR","message":"Internal server error","issues":[]},"type":"object","properties":{"message":{"description":"The error message","example":"Internal server error","type":"string"},"code":{"description":"The error code","example":"INTERNAL_SERVER_ERROR","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","example":[],"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/__schema0"}}]}},"securitySchemes":{"Authorization":{"type":"apiKey","in":"header","name":"x-ravenna-api-token"}}}}