{ "openapi": "3.0.0", "paths": { "/v1/auth/me": { "get": { "operationId": "AuthController_getMe_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get current user info, organizations, and pending invitations", "tags": [ "Auth" ] } }, "/v1/auth/invitations": { "get": { "operationId": "AuthController_listInvitations_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "List pending invitations for the organization", "tags": [ "Auth" ] } }, "/v1/auth/invitations/{id}": { "delete": { "operationId": "AuthController_deleteInvitation_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Invitation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Revoke a pending invitation", "tags": [ "Auth" ] } }, "/v1/organization": { "get": { "description": "Returns detailed information about the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "OrganizationController_getOrganization_v1", "parameters": [ { "name": "includeOwnership", "required": false, "in": "query", "description": "Include ownership data for transfer UI", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Organization information retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "The organization ID", "example": "org_abc123def456" }, "name": { "type": "string", "description": "Organization name", "example": "Acme Corporation" }, "slug": { "type": "string", "description": "Organization slug", "example": "acme-corp" }, "logo": { "type": "string", "nullable": true, "description": "Organization logo URL", "example": "https://example.com/logo.png" }, "metadata": { "type": "string", "nullable": true, "description": "Additional metadata in JSON format", "example": "{\"theme\": \"dark\", \"preferences\": {}}" }, "website": { "type": "string", "nullable": true, "description": "Organization website URL", "example": "https://acme-corp.com" }, "onboardingCompleted": { "type": "boolean", "description": "Whether onboarding is completed", "example": true }, "hasAccess": { "type": "boolean", "description": "Whether organization has access to the platform", "example": true }, "fleetDmLabelId": { "type": "integer", "nullable": true, "description": "FleetDM label ID for device management", "example": 123 }, "isFleetSetupCompleted": { "type": "boolean", "description": "Whether FleetDM setup is completed", "example": false }, "primaryColor": { "type": "string", "nullable": true, "description": "Organization primary color in hex format", "example": "#3B82F6" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the organization was created" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get organization information", "tags": [ "Organization" ] }, "patch": { "description": "Partially updates the authenticated organization. Only provided fields will be updated. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "OrganizationController_updateOrganization_v1", "parameters": [], "requestBody": { "required": true, "description": "Organization update data", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Organization name", "example": "New Acme Corporation" }, "slug": { "type": "string", "description": "Organization slug", "example": "new-acme-corp" }, "logo": { "type": "string", "description": "Organization logo URL", "example": "https://example.com/logo.png" }, "metadata": { "type": "string", "description": "Additional metadata in JSON format", "example": "{\"theme\": \"dark\", \"preferences\": {}}" }, "website": { "type": "string", "description": "Organization website URL", "example": "https://acme-corp.com" }, "onboardingCompleted": { "type": "boolean", "description": "Whether onboarding is completed", "example": true }, "hasAccess": { "type": "boolean", "description": "Whether organization has access to the platform", "example": true }, "fleetDmLabelId": { "type": "integer", "description": "FleetDM label ID for device management", "example": 123 }, "isFleetSetupCompleted": { "type": "boolean", "description": "Whether FleetDM setup is completed", "example": false }, "primaryColor": { "type": "string", "description": "Organization primary color in hex format", "example": "#3B82F6" } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Organization updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "The organization ID", "example": "org_abc123def456" }, "name": { "type": "string", "description": "Organization name", "example": "New Acme Corporation" }, "slug": { "type": "string", "description": "Organization slug", "example": "new-acme-corp" }, "logo": { "type": "string", "nullable": true, "description": "Organization logo URL", "example": "https://example.com/logo.png" }, "metadata": { "type": "string", "nullable": true, "description": "Additional metadata in JSON format", "example": "{\"theme\": \"dark\", \"preferences\": {}}" }, "website": { "type": "string", "nullable": true, "description": "Organization website URL", "example": "https://acme-corp.com" }, "onboardingCompleted": { "type": "boolean", "description": "Whether onboarding is completed", "example": true }, "hasAccess": { "type": "boolean", "description": "Whether organization has access to the platform", "example": true }, "fleetDmLabelId": { "type": "integer", "nullable": true, "description": "FleetDM label ID for device management", "example": 123 }, "isFleetSetupCompleted": { "type": "boolean", "description": "Whether FleetDM setup is completed", "example": false }, "primaryColor": { "type": "string", "nullable": true, "description": "Organization primary color in hex format", "example": "#3B82F6" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the organization was created" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" } } } } } }, "400": { "description": "Bad Request - Invalid update data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid slug format" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update organization", "tags": [ "Organization" ] }, "delete": { "description": "Permanently deletes the authenticated organization. This action cannot be undone. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "OrganizationController_deleteOrganization_v1", "parameters": [], "responses": { "200": { "description": "Organization deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates successful deletion", "example": true }, "deletedOrganization": { "type": "object", "properties": { "id": { "type": "string", "description": "The deleted organization ID", "example": "org_abc123def456" }, "name": { "type": "string", "description": "The deleted organization name", "example": "Acme Corporation" } } }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete organization", "tags": [ "Organization" ] } }, "/v1/organization/onboarding": { "get": { "operationId": "OrganizationController_getOnboarding_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Organization" ] } }, "/v1/organization/transfer-ownership": { "post": { "description": "Transfers organization ownership to another member. The current owner will become an admin and keep all other roles. The new owner will receive the owner role while keeping their existing roles. Only the current organization owner can perform this action. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "OrganizationController_transferOwnership_v1", "parameters": [], "requestBody": { "required": true, "description": "Transfer organization ownership to another member", "content": { "application/json": { "schema": { "type": "object", "required": [ "newOwnerId" ], "properties": { "newOwnerId": { "type": "string", "description": "Member ID of the new owner", "example": "mem_xyz789" }, "userId": { "type": "string", "description": "User ID of the current owner initiating the transfer (required for API key auth, ignored for JWT auth)", "example": "usr_abc123def456" } }, "additionalProperties": false } } } }, "responses": { "default": { "description": "Ownership transferred successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Ownership transferred successfully" }, "currentOwner": { "type": "object", "properties": { "memberId": { "type": "string", "example": "mem_abc123" }, "previousRoles": { "type": "array", "items": { "type": "string" }, "example": [ "owner", "employee" ] }, "newRoles": { "type": "array", "items": { "type": "string" }, "example": [ "admin", "employee" ] } } }, "newOwner": { "type": "object", "properties": { "memberId": { "type": "string", "example": "mem_xyz789" }, "previousRoles": { "type": "array", "items": { "type": "string" }, "example": [ "admin" ] }, "newRoles": { "type": "array", "items": { "type": "string" }, "example": [ "admin", "owner" ] } } } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Transfer organization ownership", "tags": [ "Organization" ] } }, "/v1/organization/role-notifications": { "put": { "operationId": "OrganizationController_updateRoleNotifications_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "settings" ], "properties": { "settings": { "type": "array", "items": { "type": "object", "required": [ "role", "policyNotifications", "taskReminders", "taskAssignments", "taskMentions", "weeklyTaskDigest", "findingNotifications" ], "properties": { "role": { "type": "string" }, "policyNotifications": { "type": "boolean" }, "taskReminders": { "type": "boolean" }, "taskAssignments": { "type": "boolean" }, "taskMentions": { "type": "boolean" }, "weeklyTaskDigest": { "type": "boolean" }, "findingNotifications": { "type": "boolean" } } } } } } } } }, "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Update role notification settings", "tags": [ "Organization" ] }, "get": { "operationId": "OrganizationController_getRoleNotifications_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get role notification settings", "tags": [ "Organization" ] } }, "/v1/organization/api-keys": { "get": { "operationId": "OrganizationController_listApiKeys_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "List active API keys", "tags": [ "Organization" ] }, "post": { "operationId": "OrganizationController_createApiKey_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Create a new API key", "tags": [ "Organization" ] } }, "/v1/organization/api-keys/available-scopes": { "get": { "operationId": "OrganizationController_getAvailableScopes_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get available API key scopes", "tags": [ "Organization" ] } }, "/v1/organization/primary-color": { "get": { "description": "Returns the primary color of the organization. Supports three access methods: 1) API key authentication (X-API-Key header), 2) Session authentication (Bearer token or cookies), or 3) Public access using an access token query parameter (?token=tok_xxx). When using an access token, no authentication is required.", "operationId": "OrganizationController_getPrimaryColor_v1", "parameters": [ { "name": "token", "required": false, "in": "query", "description": "Access token for public access (alternative to authentication). When provided, authentication is not required.", "schema": { "example": "tok_abc123def456" } } ], "responses": { "200": { "description": "Organization primary color retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "primaryColor": { "type": "string", "nullable": true, "description": "The primary color in hex format (e.g., #FF5733)", "example": "#3B82F6" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get organization primary color", "tags": [ "Organization" ] } }, "/v1/organization/logo": { "post": { "operationId": "OrganizationController_uploadLogo_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Upload organization logo", "tags": [ "Organization" ] }, "delete": { "operationId": "OrganizationController_removeLogo_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Remove organization logo", "tags": [ "Organization" ] } }, "/v1/organization/api-keys/revoke": { "post": { "operationId": "OrganizationController_revokeApiKey_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Revoke an API key", "tags": [ "Organization" ] } }, "/v1/people/invite": { "post": { "operationId": "PeopleController_inviteMembers_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvitePeopleDto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Invite members to the organization", "tags": [ "People" ] } }, "/v1/people": { "get": { "description": "Returns all members for the authenticated organization with their user information. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_getAllPeople_v1", "parameters": [ { "name": "includeDeactivated", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "People retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/PeopleResponseDto" } }, "count": { "type": "number", "description": "Total number of people", "example": 25 }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "properties": { "id": { "type": "string", "description": "User ID", "example": "usr_abc123def456" }, "email": { "type": "string", "description": "User email", "example": "user@company.com" } } } } }, "example": { "data": [ { "id": "mem_abc123def456", "organizationId": "org_abc123def456", "userId": "usr_abc123def456", "role": "admin", "createdAt": "2024-01-01T00:00:00Z", "department": "it", "isActive": true, "fleetDmLabelId": 123, "user": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "emailVerified": true, "image": "https://example.com/avatar.jpg", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T00:00:00Z", "lastLogin": "2024-01-15T12:00:00Z" } } ], "count": 1, "authType": "api-key", "authenticatedUser": { "id": "usr_abc123def456", "email": "user@company.com" } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Failed to retrieve members" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all people", "tags": [ "People" ] }, "post": { "description": "Adds a new member to the authenticated organization. The user must already exist in the system. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_createMember_v1", "parameters": [], "requestBody": { "required": true, "description": "Member creation data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePeopleDto" } } } }, "responses": { "201": { "description": "Member created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PeopleResponseDto" }, "example": { "id": "mem_abc123def456", "organizationId": "org_abc123def456", "userId": "usr_abc123def456", "role": "admin", "createdAt": "2024-01-01T00:00:00Z", "department": "it", "isActive": true, "fleetDmLabelId": 123, "user": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "emailVerified": true, "image": "https://example.com/avatar.jpg", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T00:00:00Z", "lastLogin": "2024-01-15T12:00:00Z" } } } } }, "400": { "description": "Bad Request - Invalid member data or user already exists", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "User user@example.com is already a member of this organization" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization or user not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "User with ID usr_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Failed to create member" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new member", "tags": [ "People" ] } }, "/v1/people/devices": { "get": { "operationId": "PeopleController_getDevices_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get all employee devices with fleet compliance data", "tags": [ "People" ] } }, "/v1/people/test-stats/by-assignee": { "get": { "operationId": "PeopleController_getTestStatsByAssignee_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get integration test statistics grouped by assignee", "tags": [ "People" ] } }, "/v1/people/bulk": { "post": { "description": "Bulk adds multiple members to the authenticated organization. Each member must have a valid user ID that exists in the system. Members who already exist in the organization or have invalid data will be skipped with error details returned. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_bulkCreateMembers_v1", "parameters": [], "requestBody": { "required": true, "description": "Bulk member creation data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkCreatePeopleDto" } } } }, "responses": { "201": { "description": "Bulk member creation completed", "content": { "application/json": { "schema": { "type": "object", "properties": { "created": { "type": "array", "items": { "$ref": "#/components/schemas/PeopleResponseDto" }, "description": "Successfully created members" }, "errors": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number", "description": "Index in the original array where the error occurred", "example": 2 }, "userId": { "type": "string", "description": "User ID that failed to be added", "example": "usr_abc123def456" }, "error": { "type": "string", "description": "Error message explaining why the member could not be created", "example": "User user@example.com is already a member of this organization" } } }, "description": "Members that failed to be created with error details" }, "summary": { "type": "object", "properties": { "total": { "type": "number", "description": "Total number of members in the request", "example": 5 }, "successful": { "type": "number", "description": "Number of members successfully created", "example": 3 }, "failed": { "type": "number", "description": "Number of members that failed to be created", "example": 2 } } }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "properties": { "id": { "type": "string", "description": "User ID", "example": "usr_abc123def456" }, "email": { "type": "string", "description": "User email", "example": "user@company.com" } } } } }, "example": { "created": [ { "id": "mem_abc123def456", "organizationId": "org_abc123def456", "userId": "usr_abc123def456", "role": "member", "createdAt": "2024-01-01T00:00:00Z", "department": "it", "isActive": true, "fleetDmLabelId": 123, "user": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "emailVerified": true, "image": "https://example.com/avatar.jpg", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T00:00:00Z", "lastLogin": "2024-01-15T12:00:00Z" } } ], "errors": [ { "index": 2, "userId": "usr_xyz789abc123", "error": "User user2@example.com is already a member of this organization" } ], "summary": { "total": 2, "successful": 1, "failed": 1 }, "authType": "api-key", "authenticatedUser": { "id": "usr_admin123", "email": "admin@company.com" } } } } }, "400": { "description": "Bad Request - Invalid bulk data or validation errors", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Members array cannot be empty" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Bulk creation failed" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Add multiple members to organization", "tags": [ "People" ] } }, "/v1/people/mentionable": { "get": { "operationId": "PeopleController_getMentionableMembers_v1", "parameters": [ { "name": "resource", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get members who can read a specific resource type", "tags": [ "People" ] } }, "/v1/people/{id}/reactivate": { "patch": { "operationId": "PeopleController_reactivateMember_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Reactivate a deactivated member", "tags": [ "People" ] } }, "/v1/people/{id}": { "get": { "description": "Returns a specific member by ID for the authenticated organization with their user information. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_getPersonById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Person retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PeopleResponseDto" }, "example": { "id": "mem_abc123def456", "organizationId": "org_abc123def456", "userId": "usr_abc123def456", "role": "admin", "createdAt": "2024-01-01T00:00:00Z", "department": "it", "isActive": true, "fleetDmLabelId": 123, "user": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "emailVerified": true, "image": "https://example.com/avatar.jpg", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T00:00:00Z", "lastLogin": "2024-01-15T12:00:00Z" } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization or member not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Member with ID mem_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get person by ID", "tags": [ "People" ] }, "patch": { "description": "Partially updates a member. Only provided fields will be updated. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_updateMember_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "description": "Member update data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePeopleDto" } } } }, "responses": { "200": { "description": "Member updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PeopleResponseDto" }, "example": { "id": "mem_abc123def456", "organizationId": "org_abc123def456", "userId": "usr_abc123def456", "role": "member", "createdAt": "2024-01-01T00:00:00Z", "department": "it", "isActive": true, "fleetDmLabelId": 123, "user": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "emailVerified": true, "image": "https://example.com/avatar.jpg", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T00:00:00Z", "lastLogin": "2024-01-15T12:00:00Z" } } } } }, "400": { "description": "Bad Request - Invalid update data or user conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "User user@example.com is already a member of this organization" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization, member, or user not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Member with ID mem_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update member", "tags": [ "People" ] }, "delete": { "description": "Permanently removes a member from the organization. This action cannot be undone. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_deleteMember_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Member deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates successful deletion", "example": true }, "deletedMember": { "type": "object", "properties": { "id": { "type": "string", "description": "The deleted member ID", "example": "mem_abc123def456" }, "name": { "type": "string", "description": "The deleted member name", "example": "John Doe" }, "email": { "type": "string", "description": "The deleted member email", "example": "john.doe@company.com" } } }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization or member not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Member with ID mem_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Failed to delete member" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete member", "tags": [ "People" ] } }, "/v1/people/{id}/training-videos": { "get": { "operationId": "PeopleController_getTrainingVideos_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get training video completions for a member", "tags": [ "People" ] } }, "/v1/people/{id}/fleet-compliance": { "get": { "operationId": "PeopleController_getFleetCompliance_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get fleet/device compliance for a member", "tags": [ "People" ] } }, "/v1/people/{id}/host/{hostId}": { "delete": { "description": "Removes a single host (device) from FleetDM by host ID. Only organization owners can perform this action. Validates that the organization exists and the member exists within the organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_removeHost_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } }, { "name": "hostId", "required": true, "in": "path", "description": "FleetDM host ID", "schema": { "example": 1, "type": "number" } } ], "responses": { "200": { "description": "Host removed from Fleet successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates successful removal", "example": true }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication, insufficient permissions, or not organization owner", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization or member not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Member with ID mem_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Failed to remove host" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Remove host (device) from Fleet", "tags": [ "People" ] } }, "/v1/people/{id}/unlink-device": { "patch": { "description": "Resets the fleetDmLabelId for a member, effectively unlinking their device from FleetDM. This will disconnect the device from the organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PeopleController_unlinkDevice_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Member updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PeopleResponseDto" }, "example": { "id": "mem_abc123def456", "organizationId": "org_abc123def456", "userId": "usr_abc123def456", "role": "member", "createdAt": "2024-01-01T00:00:00Z", "department": "it", "isActive": true, "fleetDmLabelId": 123, "user": { "id": "usr_abc123def456", "name": "John Doe", "email": "john.doe@company.com", "emailVerified": true, "image": "https://example.com/avatar.jpg", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T00:00:00Z", "lastLogin": "2024-01-15T12:00:00Z" } } } } }, "400": { "description": "Bad Request - Invalid update data or user conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "User user@example.com is already a member of this organization" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization, member, or user not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Member with ID mem_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Unlink device from member", "tags": [ "People" ] } }, "/v1/people/me/email-preferences": { "get": { "operationId": "PeopleController_getEmailPreferences_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get current user email notification preferences", "tags": [ "People" ] }, "put": { "operationId": "PeopleController_updateEmailPreferences_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateEmailPreferencesDto" } } } }, "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Update current user email notification preferences", "tags": [ "People" ] } }, "/v1/risks": { "get": { "description": "Returns all risks for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "RisksController_getAllRisks_v1", "parameters": [ { "name": "title", "required": false, "in": "query", "description": "Search by title (case-insensitive contains)", "schema": { "example": "data breach", "type": "string" } }, { "name": "page", "required": false, "in": "query", "description": "Page number (1-indexed)", "schema": { "minimum": 1, "default": 1, "example": 1, "type": "number" } }, { "name": "perPage", "required": false, "in": "query", "description": "Number of items per page", "schema": { "minimum": 1, "maximum": 250, "default": 50, "example": 50, "type": "number" } }, { "name": "sort", "required": false, "in": "query", "description": "Sort by field", "schema": { "default": "createdAt", "type": "string", "enum": [ "createdAt", "updatedAt", "title", "status" ] } }, { "name": "sortDirection", "required": false, "in": "query", "description": "Sort direction", "schema": { "default": "desc", "type": "string", "enum": [ "asc", "desc" ] } }, { "name": "status", "required": false, "in": "query", "description": "Filter by status", "schema": { "type": "string", "enum": [ "open", "pending", "closed", "archived" ] } }, { "name": "category", "required": false, "in": "query", "description": "Filter by category", "schema": { "type": "string", "enum": [ "customer", "fraud", "governance", "operations", "other", "people", "regulatory", "reporting", "resilience", "technology", "vendor_management" ] } }, { "name": "department", "required": false, "in": "query", "description": "Filter by department", "schema": { "type": "string", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ] } }, { "name": "assigneeId", "required": false, "in": "query", "description": "Filter by assignee member ID", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Risks retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Risk ID", "example": "rsk_abc123def456" }, "title": { "type": "string", "description": "Risk title", "example": "Data breach vulnerability in user authentication system" }, "description": { "type": "string", "description": "Risk description", "example": "Weak password requirements could lead to unauthorized access to user accounts" }, "category": { "type": "string", "enum": [ "customer", "governance", "operations", "other", "people", "regulatory", "reporting", "resilience", "technology", "vendor_management" ], "example": "technology" }, "status": { "type": "string", "enum": [ "open", "pending", "closed", "archived" ], "example": "open" }, "likelihood": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "impact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "major" }, "treatmentStrategy": { "type": "string", "enum": [ "accept", "avoid", "mitigate", "transfer" ], "example": "mitigate" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to this risk", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the risk was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the risk was last updated" } } } }, "count": { "type": "number", "description": "Total number of risks", "example": 15 }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all risks", "tags": [ "Risks" ] }, "post": { "description": "Creates a new risk for the authenticated organization. All required fields must be provided. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "RisksController_createRisk_v1", "parameters": [], "requestBody": { "required": true, "description": "Risk creation data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRiskDto" } } } }, "responses": { "201": { "description": "Risk created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Risk ID", "example": "rsk_abc123def456" }, "title": { "type": "string", "description": "Risk title", "example": "Data breach vulnerability in user authentication system" }, "description": { "type": "string", "description": "Risk description", "example": "Weak password requirements could lead to unauthorized access to user accounts" }, "category": { "type": "string", "enum": [ "customer", "governance", "operations", "other", "people", "regulatory", "reporting", "resilience", "technology", "vendor_management" ], "example": "technology" }, "department": { "type": "string", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "nullable": true, "example": "it" }, "status": { "type": "string", "enum": [ "open", "pending", "closed", "archived" ], "example": "open" }, "likelihood": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "impact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "major" }, "residualLikelihood": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "unlikely" }, "residualImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "minor" }, "treatmentStrategyDescription": { "type": "string", "nullable": true, "example": "Implement multi-factor authentication and strengthen password requirements" }, "treatmentStrategy": { "type": "string", "enum": [ "accept", "avoid", "mitigate", "transfer" ], "example": "mitigate" }, "organizationId": { "type": "string", "example": "org_abc123def456" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to this risk", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the risk was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the risk was last updated" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "400": { "description": "Bad request - Invalid input data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "example": [ "title should not be empty", "description should not be empty", "category must be a valid enum value" ] }, "error": { "type": "string", "example": "Bad Request" }, "statusCode": { "type": "number", "example": 400 } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new risk", "tags": [ "Risks" ] } }, "/v1/risks/stats/by-assignee": { "get": { "operationId": "RisksController_getStatsByAssignee_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get risk statistics grouped by assignee", "tags": [ "Risks" ] } }, "/v1/risks/stats/by-department": { "get": { "operationId": "RisksController_getStatsByDepartment_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get risk counts grouped by department", "tags": [ "Risks" ] } }, "/v1/risks/{id}": { "get": { "description": "Returns a specific risk by ID for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "RisksController_getRiskById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Risk ID", "schema": { "example": "rsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Risk retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Risk ID", "example": "rsk_abc123def456" }, "title": { "type": "string", "description": "Risk title", "example": "Data breach vulnerability in user authentication system" }, "description": { "type": "string", "description": "Risk description", "example": "Weak password requirements could lead to unauthorized access to user accounts" }, "category": { "type": "string", "enum": [ "customer", "governance", "operations", "other", "people", "regulatory", "reporting", "resilience", "technology", "vendor_management" ], "example": "technology" }, "department": { "type": "string", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "nullable": true, "example": "it" }, "status": { "type": "string", "enum": [ "open", "pending", "closed", "archived" ], "example": "open" }, "likelihood": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "impact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "major" }, "residualLikelihood": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "unlikely" }, "residualImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "minor" }, "treatmentStrategyDescription": { "type": "string", "nullable": true, "example": "Implement multi-factor authentication and strengthen password requirements" }, "treatmentStrategy": { "type": "string", "enum": [ "accept", "avoid", "mitigate", "transfer" ], "example": "mitigate" }, "organizationId": { "type": "string", "example": "org_abc123def456" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to this risk", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the risk was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the risk was last updated" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "403": { "description": "Forbidden - User does not have permission to access this risk", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "You do not have access to view this risk" } } } } } }, "404": { "description": "Risk not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Risk with ID rsk_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get risk by ID", "tags": [ "Risks" ] }, "patch": { "description": "Partially updates a risk. Only provided fields will be updated. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "RisksController_updateRisk_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Risk ID", "schema": { "example": "rsk_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "description": "Risk update data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRiskDto" } } } }, "responses": { "200": { "description": "Risk updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Risk ID", "example": "rsk_abc123def456" }, "title": { "type": "string", "description": "Risk title", "example": "Data breach vulnerability in user authentication system" }, "description": { "type": "string", "description": "Risk description", "example": "Weak password requirements could lead to unauthorized access to user accounts" }, "category": { "type": "string", "enum": [ "customer", "governance", "operations", "other", "people", "regulatory", "reporting", "resilience", "technology", "vendor_management" ], "example": "technology" }, "department": { "type": "string", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "nullable": true, "example": "it" }, "status": { "type": "string", "enum": [ "open", "pending", "closed", "archived" ], "example": "open" }, "likelihood": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "impact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "major" }, "residualLikelihood": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "unlikely" }, "residualImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "minor" }, "treatmentStrategyDescription": { "type": "string", "nullable": true, "example": "Implement multi-factor authentication and strengthen password requirements" }, "treatmentStrategy": { "type": "string", "enum": [ "accept", "avoid", "mitigate", "transfer" ], "example": "mitigate" }, "organizationId": { "type": "string", "example": "org_abc123def456" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to this risk", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the risk was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the risk was last updated" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "400": { "description": "Bad request - Invalid input data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "example": [ "title should not be empty", "category must be a valid enum value", "status must be a valid enum value" ] }, "error": { "type": "string", "example": "Bad Request" }, "statusCode": { "type": "number", "example": 400 } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Risk not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Risk with ID rsk_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update risk", "tags": [ "Risks" ] }, "delete": { "description": "Permanently removes a risk from the organization. This action cannot be undone. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "RisksController_deleteRisk_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Risk ID", "schema": { "example": "rsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Risk deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Risk deleted successfully" }, "deletedRisk": { "type": "object", "properties": { "id": { "type": "string", "description": "Deleted risk ID", "example": "rsk_abc123def456" }, "title": { "type": "string", "description": "Deleted risk title", "example": "Data breach vulnerability in user authentication system" } } }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Risk not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Risk with ID rsk_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete risk", "tags": [ "Risks" ] } }, "/v1/vendors/global/search": { "get": { "operationId": "VendorsController_searchGlobalVendors_v1", "parameters": [ { "name": "name", "required": false, "in": "query", "description": "Vendor name to search for", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Search global vendors database", "tags": [ "Vendors" ] } }, "/v1/vendors": { "get": { "description": "Returns all vendors for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "VendorsController_getAllVendors_v1", "parameters": [], "responses": { "200": { "description": "Vendors retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Vendor ID", "example": "vnd_abc123def456" }, "name": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions Inc." }, "description": { "type": "string", "description": "Vendor description", "example": "Cloud infrastructure provider offering AWS-like services" }, "category": { "type": "string", "enum": [ "cloud", "infrastructure", "software_as_a_service", "finance", "marketing", "sales", "hr", "other" ], "example": "cloud" }, "status": { "type": "string", "enum": [ "not_assessed", "in_progress", "assessed" ], "example": "not_assessed" }, "inherentProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "inherentImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "moderate" }, "residualProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "unlikely" }, "residualImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "minor" }, "website": { "type": "string", "nullable": true, "example": "https://www.cloudtechsolutions.com" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to manage this vendor", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the vendor was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the vendor was last updated" } } } }, "count": { "type": "number", "description": "Total number of vendors", "example": 12 }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all vendors", "tags": [ "Vendors" ] }, "post": { "description": "Creates a new vendor for the authenticated organization. All required fields must be provided. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "VendorsController_createVendor_v1", "parameters": [], "requestBody": { "required": true, "description": "Vendor creation data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateVendorDto" } } } }, "responses": { "201": { "description": "Vendor created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Vendor ID", "example": "vnd_abc123def456" }, "name": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions Inc." }, "description": { "type": "string", "description": "Vendor description", "example": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers." }, "category": { "type": "string", "enum": [ "cloud", "infrastructure", "software_as_a_service", "finance", "marketing", "sales", "hr", "other" ], "example": "cloud" }, "status": { "type": "string", "enum": [ "not_assessed", "in_progress", "assessed" ], "example": "not_assessed" }, "inherentProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "inherentImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "moderate" }, "residualProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "unlikely" }, "residualImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "minor" }, "website": { "type": "string", "nullable": true, "example": "https://www.cloudtechsolutions.com" }, "organizationId": { "type": "string", "example": "org_abc123def456" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to manage this vendor", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the vendor was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the vendor was last updated" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "400": { "description": "Bad request - Invalid input data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "example": [ "name should not be empty", "description should not be empty", "category must be a valid enum value", "website must be a URL address" ] }, "error": { "type": "string", "example": "Bad Request" }, "statusCode": { "type": "number", "example": 400 } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new vendor", "tags": [ "Vendors" ] } }, "/v1/vendors/{id}": { "get": { "description": "Returns a specific vendor by ID for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "VendorsController_getVendorById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Vendor ID", "schema": { "example": "vnd_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Vendor retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Vendor ID", "example": "vnd_abc123def456" }, "name": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions Inc." }, "description": { "type": "string", "description": "Vendor description", "example": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers." }, "category": { "type": "string", "enum": [ "cloud", "infrastructure", "software_as_a_service", "finance", "marketing", "sales", "hr", "other" ], "example": "cloud" }, "status": { "type": "string", "enum": [ "not_assessed", "in_progress", "assessed" ], "example": "not_assessed" }, "inherentProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "inherentImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "moderate" }, "residualProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "unlikely" }, "residualImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "minor" }, "website": { "type": "string", "nullable": true, "example": "https://www.cloudtechsolutions.com" }, "organizationId": { "type": "string", "example": "org_abc123def456" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to manage this vendor", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the vendor was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the vendor was last updated" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Vendor not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Vendor with ID vnd_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get vendor by ID", "tags": [ "Vendors" ] }, "patch": { "description": "Partially updates a vendor. Only provided fields will be updated. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "VendorsController_updateVendor_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Vendor ID", "schema": { "example": "vnd_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "description": "Vendor update data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateVendorDto" } } } }, "responses": { "200": { "description": "Vendor updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Vendor ID", "example": "vnd_abc123def456" }, "name": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions Inc." }, "description": { "type": "string", "description": "Vendor description", "example": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers." }, "category": { "type": "string", "enum": [ "cloud", "infrastructure", "software_as_a_service", "finance", "marketing", "sales", "hr", "other" ], "example": "cloud" }, "status": { "type": "string", "enum": [ "not_assessed", "in_progress", "assessed" ], "example": "assessed" }, "inherentProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "possible" }, "inherentImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "moderate" }, "residualProbability": { "type": "string", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "example": "unlikely" }, "residualImpact": { "type": "string", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "example": "minor" }, "website": { "type": "string", "nullable": true, "example": "https://www.cloudtechsolutions.com" }, "organizationId": { "type": "string", "example": "org_abc123def456" }, "assigneeId": { "type": "string", "nullable": true, "description": "ID of the user assigned to manage this vendor", "example": "mem_abc123def456" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the vendor was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the vendor was last updated" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "400": { "description": "Bad request - Invalid input data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "example": [ "name should not be empty", "category must be a valid enum value", "status must be a valid enum value", "website must be a URL address" ] }, "error": { "type": "string", "example": "Bad Request" }, "statusCode": { "type": "number", "example": 400 } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Vendor not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Vendor with ID vnd_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update vendor", "tags": [ "Vendors" ] }, "delete": { "description": "Permanently removes a vendor from the organization. This action cannot be undone. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "VendorsController_deleteVendor_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Vendor ID", "schema": { "example": "vnd_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Vendor deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Vendor deleted successfully" }, "deletedVendor": { "type": "object", "properties": { "id": { "type": "string", "description": "Deleted vendor ID", "example": "vnd_abc123def456" }, "name": { "type": "string", "description": "Deleted vendor name", "example": "CloudTech Solutions Inc." } } }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "User information (only for session auth)", "properties": { "id": { "type": "string", "example": "usr_def456ghi789" }, "email": { "type": "string", "example": "user@example.com" } } } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Vendor not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Vendor with ID vnd_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Internal server error" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete vendor", "tags": [ "Vendors" ] } }, "/v1/vendors/{id}/trigger-assessment": { "post": { "operationId": "VendorsController_triggerAssessment_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Vendor ID", "schema": { "example": "vnd_abc123def456", "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Trigger vendor risk assessment", "tags": [ "Vendors" ] } }, "/v1/internal/vendors/risk-assessment/trigger-batch": { "post": { "operationId": "InternalVendorAutomationController_triggerVendorRiskAssessmentBatch_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerVendorRiskAssessmentBatchDto" } } } }, "responses": { "200": { "description": "Tasks triggered" } }, "security": [ { "apikey": [] } ], "summary": "Trigger vendor risk assessment tasks for a batch of vendors (internal)", "tags": [ "Internal - Vendors" ] } }, "/v1/internal/vendors/risk-assessment/trigger-single": { "post": { "operationId": "InternalVendorAutomationController_triggerSingleVendorRiskAssessment_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerSingleVendorRiskAssessmentDto" } } } }, "responses": { "200": { "description": "Task triggered with run info for real-time tracking" } }, "security": [ { "apikey": [] } ], "summary": "Trigger vendor risk assessment for a single vendor and return run info (internal)", "tags": [ "Internal - Vendors" ] } }, "/v1/context": { "get": { "description": "Returns all context entries for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "ContextController_getAllContext_v1", "parameters": [ { "name": "search", "required": false, "in": "query", "description": "Search by question text", "schema": { "type": "string" } }, { "name": "page", "required": false, "in": "query", "description": "Page number (1-based)", "schema": { "type": "string" } }, { "name": "perPage", "required": false, "in": "query", "description": "Items per page", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Context entries retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "question": { "type": "string" }, "answer": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } }, "count": { "type": "number" }, "authType": { "type": "string", "enum": [ "api-key", "session" ] } } }, "example": { "data": [ { "id": "ctx_abc123def456", "organizationId": "org_xyz789uvw012", "question": "How do we handle user authentication in our application?", "answer": "We use a hybrid authentication system supporting both API keys and session-based authentication.", "tags": [ "authentication", "security", "api", "sessions" ], "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T14:20:00.000Z" }, { "id": "ctx_ghi789jkl012", "organizationId": "org_xyz789uvw012", "question": "What database do we use and why?", "answer": "We use PostgreSQL as our primary database with Prisma as the ORM.", "tags": [ "database", "postgresql", "prisma", "architecture" ], "createdAt": "2024-01-14T09:15:00.000Z", "updatedAt": "2024-01-14T09:15:00.000Z" } ], "count": 2, "authType": "apikey" } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 401 } } }, "example": { "message": "Unauthorized", "statusCode": 401 } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 404 } } }, "example": { "message": "Organization not found", "statusCode": 404 } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 500 } } }, "example": { "message": "Internal server error", "statusCode": 500 } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all context entries", "tags": [ "Context" ] }, "post": { "description": "Creates a new context entry for the authenticated organization. All required fields must be provided. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "ContextController_createContext_v1", "parameters": [], "requestBody": { "required": true, "description": "Context entry data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateContextDto" }, "examples": { "Authentication Context": { "value": { "question": "How do we handle user authentication in our application?", "answer": "We use a hybrid authentication system supporting both API keys and session-based authentication. API keys are used for programmatic access while sessions are used for web interface interactions.", "tags": [ "authentication", "security", "api", "sessions" ] } }, "Database Context": { "value": { "question": "What database do we use and why?", "answer": "We use PostgreSQL as our primary database with Prisma as the ORM. PostgreSQL provides excellent performance, ACID compliance, and supports advanced features like JSON columns and full-text search.", "tags": [ "database", "postgresql", "prisma", "architecture" ] } } } } } }, "responses": { "201": { "description": "Context entry created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "question": { "type": "string" }, "answer": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "authType": { "type": "string", "enum": [ "api-key", "session" ] } } }, "example": { "id": "ctx_abc123def456", "organizationId": "org_xyz789uvw012", "question": "How do we handle user authentication in our application?", "answer": "We use a hybrid authentication system supporting both API keys and session-based authentication.", "tags": [ "authentication", "security", "api", "sessions" ], "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:30:00.000Z", "authType": "apikey" } } } }, "400": { "description": "Bad request - Invalid input data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" } }, "error": { "type": "string" }, "statusCode": { "type": "number" } } }, "example": { "message": [ "question should not be empty", "answer should not be empty" ], "error": "Bad Request", "statusCode": 400 } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 401 } } }, "example": { "message": "Unauthorized", "statusCode": 401 } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 404 } } }, "example": { "message": "Organization not found", "statusCode": 404 } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 500 } } }, "example": { "message": "Internal server error", "statusCode": 500 } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new context entry", "tags": [ "Context" ] } }, "/v1/context/{id}": { "get": { "description": "Returns a specific context entry by ID for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "ContextController_getContextById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Context entry ID", "schema": { "example": "ctx_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Context entry retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "ctx_abc123def456" }, "organizationId": { "type": "string", "example": "org_xyz789uvw012" }, "question": { "type": "string" }, "answer": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" }, "example": [ "authentication", "security" ] }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "authType": { "type": "string", "enum": [ "api-key", "session" ] } } }, "example": { "id": "ctx_abc123def456", "organizationId": "org_xyz789uvw012", "question": "How do we handle user authentication in our application?", "answer": "We use a hybrid authentication system supporting both API keys and session-based authentication.", "tags": [ "authentication", "security", "api", "sessions" ], "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T14:20:00.000Z", "authType": "apikey" } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" }, "statusCode": { "type": "number", "example": 401 } } }, "example": { "message": "Unauthorized", "statusCode": 401 } } } }, "404": { "description": "Context entry not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 404 } } }, "example": { "message": "Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012", "statusCode": 404 } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 500 } } }, "example": { "message": "Internal server error", "statusCode": 500 } } } } }, "security": [ { "apikey": [] } ], "summary": "Get context entry by ID", "tags": [ "Context" ] }, "patch": { "description": "Partially updates a context entry. Only provided fields will be updated. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "ContextController_updateContext_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Context entry ID", "schema": { "example": "ctx_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "description": "Partial context entry data to update", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateContextDto" }, "examples": { "Update Tags": { "value": { "tags": [ "authentication", "security", "api", "sessions", "updated" ] } }, "Update Answer": { "value": { "answer": "Updated: We use a hybrid authentication system supporting both API keys and session-based authentication. Recent updates include support for OAuth2 providers." } } } } } }, "responses": { "200": { "description": "Context entry updated successfully", "content": { "application/json": { "example": { "id": "ctx_abc123def456", "organizationId": "org_xyz789uvw012", "question": "How do we handle user authentication in our application?", "answer": "Updated: We use a hybrid authentication system supporting both API keys and session-based authentication with OAuth2 support.", "tags": [ "authentication", "security", "api", "sessions", "oauth2" ], "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T15:45:00.000Z", "authType": "apikey" } } } }, "400": { "description": "Bad request - Invalid input data", "content": { "application/json": { "example": { "message": [ "tags must be an array of strings" ], "error": "Bad Request", "statusCode": 400 } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "example": { "message": "Unauthorized", "statusCode": 401 } } } }, "404": { "description": "Context entry not found", "content": { "application/json": { "example": { "message": "Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012", "statusCode": 404 } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "example": { "message": "Internal server error", "statusCode": 500 } } } } }, "security": [ { "apikey": [] } ], "summary": "Update context entry", "tags": [ "Context" ] }, "delete": { "description": "Permanently removes a context entry from the organization. This action cannot be undone. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "ContextController_deleteContext_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Context entry ID", "schema": { "example": "ctx_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Context entry deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "deletedContext": { "type": "object", "properties": { "id": { "type": "string" }, "question": { "type": "string" } } }, "authType": { "type": "string", "enum": [ "api-key", "session" ] } } }, "example": { "message": "Context entry deleted successfully", "deletedContext": { "id": "ctx_abc123def456", "question": "How do we handle user authentication in our application?" }, "authType": "apikey" } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 401 } } }, "example": { "message": "Unauthorized", "statusCode": 401 } } } }, "404": { "description": "Context entry not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 404 } } }, "example": { "message": "Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012", "statusCode": 404 } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" }, "statusCode": { "type": "number", "example": 500 } } }, "example": { "message": "Internal server error", "statusCode": 500 } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete context entry", "tags": [ "Context" ] } }, "/v1/devices": { "get": { "description": "Returns all devices for the authenticated organization from FleetDM. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "DevicesController_getAllDevices_v1", "parameters": [], "responses": { "200": { "description": "Devices retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/DeviceResponseDto" } }, "count": { "type": "number", "description": "Total number of devices", "example": 25 }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "properties": { "id": { "type": "string", "description": "User ID", "example": "usr_abc123def456" }, "email": { "type": "string", "description": "User email", "example": "user@company.com" } } } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid or expired API key" } } } } } }, "404": { "description": "Organization not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization with ID org_abc123def456 not found" } } } } } }, "500": { "description": "Internal server error - FleetDM integration issue", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Organization does not have FleetDM configured" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all devices", "tags": [ "Devices" ] } }, "/v1/devices/member/{memberId}": { "get": { "description": "Returns all devices assigned to a specific member within the authenticated organization. Devices are fetched from FleetDM using the member's dedicated fleetDmLabelId. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "DevicesController_getDevicesByMember_v1", "parameters": [ { "name": "memberId", "required": true, "in": "path", "description": "Member ID to get devices for", "schema": { "example": "mem_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Member devices retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DevicesByMemberResponseDto" } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Organization or member not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Member with ID mem_abc123def456 not found in organization org_abc123def456" } } } } } }, "500": { "description": "Internal server error - FleetDM integration issue" } }, "security": [ { "apikey": [] } ], "summary": "Get devices by member ID", "tags": [ "Devices" ] } }, "/v1/policies": { "get": { "description": "Returns all policies for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PoliciesController_getAllPolicies_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Policies retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/PolicyResponseDto" }, "description": "Array of policies" }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" }, "authenticatedUser": { "type": "object", "description": "Authenticated user information (only present for session auth)", "properties": { "id": { "type": "string", "description": "User ID", "example": "usr_abc123def456" }, "email": { "type": "string", "description": "User email", "example": "user@company.com" } } } }, "required": [ "data", "authType" ] }, "example": { "data": [ { "id": "pol_abc123def456", "name": "Data Privacy Policy", "description": "This policy outlines how we handle and protect personal data", "status": "draft", "content": [ { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "This policy outlines our commitment to protecting personal data." } ] } ], "frequency": "yearly", "department": "IT", "isRequiredToSign": true, "signedBy": [], "reviewDate": "2024-12-31T00:00:00.000Z", "isArchived": false, "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "lastArchivedAt": null, "lastPublishedAt": "2024-01-10T00:00:00.000Z", "organizationId": "org_abc123def456", "assigneeId": "usr_abc123def456", "approverId": "usr_xyz789abc123", "policyTemplateId": null } ], "authType": "session", "authenticatedUser": { "id": "usr_abc123def456", "email": "user@company.com" } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all policies", "tags": [ "Policies" ] }, "post": { "description": "Creates a new policy for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PoliciesController_createPolicy_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "description": "Policy creation data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePolicyDto" } } } }, "responses": { "201": { "description": "Policy created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponseDto" }, "example": { "id": "pol_abc123def456", "name": "Data Privacy Policy", "description": "This policy outlines how we handle and protect personal data", "status": "draft", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Policy content here" } ] } ], "frequency": "yearly", "department": "it", "isRequiredToSign": true, "signedBy": [], "reviewDate": "2024-12-31T00:00:00.000Z", "isArchived": false, "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "organizationId": "org_abc123def456", "assigneeId": "usr_abc123def456", "approverId": "usr_xyz789abc123" } } } }, "400": { "description": "Bad Request - Invalid policy data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid policy content format" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new policy", "tags": [ "Policies" ] } }, "/v1/policies/publish-all": { "post": { "operationId": "PoliciesController_publishAllPolicies_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Publish all draft policies", "tags": [ "Policies" ] } }, "/v1/policies/download-all": { "get": { "description": "Generates a PDF bundle containing all published policies with organization branding and returns a signed download URL", "operationId": "PoliciesController_downloadAllPolicies_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Signed URL for PDF bundle returned" }, "404": { "description": "No published policies found" } }, "security": [ { "apikey": [] } ], "summary": "Download all published policies as a single PDF", "tags": [ "Policies" ] } }, "/v1/policies/{id}/controls": { "get": { "operationId": "PoliciesController_getPolicyControls_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get mapped and all controls for a policy", "tags": [ "Policies" ] }, "post": { "operationId": "PoliciesController_addPolicyControls_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Map controls to a policy", "tags": [ "Policies" ] } }, "/v1/policies/{id}/regenerate": { "post": { "operationId": "PoliciesController_regeneratePolicy_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Regenerate policy content using AI", "tags": [ "Policies" ] } }, "/v1/policies/{id}/pdf/signed-url": { "get": { "operationId": "PoliciesController_getPdfSignedUrl_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } }, { "name": "versionId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get a signed URL for the policy PDF", "tags": [ "Policies" ] } }, "/v1/policies/{id}/pdf": { "post": { "operationId": "PoliciesController_uploadPolicyPdf_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Upload a PDF to a policy or version", "tags": [ "Policies" ] }, "delete": { "operationId": "PoliciesController_deletePolicyPdf_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } }, { "name": "versionId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Delete a policy PDF", "tags": [ "Policies" ] } }, "/v1/policies/{id}/pdf-url": { "get": { "operationId": "PoliciesController_getPdfUrl_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } }, { "name": "versionId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get signed URL for policy PDF (alternate path)", "tags": [ "Policies" ] } }, "/v1/policies/{id}/controls/{controlId}": { "delete": { "operationId": "PoliciesController_removePolicyControl_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } }, { "name": "controlId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Remove a control mapping from a policy", "tags": [ "Policies" ] } }, "/v1/policies/{id}": { "get": { "description": "Returns a specific policy by ID for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PoliciesController_getPolicy_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Policy retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponseDto" }, "example": { "id": "pol_abc123def456", "name": "Data Privacy Policy", "status": "draft", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "..." } ] } ], "isRequiredToSign": true, "signedBy": [], "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "organizationId": "org_abc123def456" } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Policy not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Policy with ID pol_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get policy by ID", "tags": [ "Policies" ] }, "patch": { "description": "Partially updates a policy. Only provided fields will be updated. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PoliciesController_updatePolicy_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "description": "Policy update data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePolicyDto" } } } }, "responses": { "200": { "description": "Policy updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PolicyResponseDto" }, "example": { "id": "pol_abc123def456", "name": "Data Privacy Policy", "description": "This policy outlines how we handle and protect personal data", "status": "published", "content": [ { "type": "heading", "attrs": { "level": 2 }, "content": [ { "type": "text", "text": "Purpose" } ] } ], "frequency": "yearly", "department": "it", "isRequiredToSign": true, "signedBy": [ "usr_123" ], "reviewDate": "2024-12-31T00:00:00.000Z", "isArchived": false, "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "organizationId": "org_abc123def456", "assigneeId": "usr_abc123def456", "approverId": "usr_xyz789abc123" } } } }, "400": { "description": "Bad Request - Invalid update data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Validation failed" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Policy not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Policy with ID pol_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update policy", "tags": [ "Policies" ] }, "delete": { "description": "Permanently deletes a policy. This action cannot be undone. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "PoliciesController_deletePolicy_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Policy deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates successful deletion", "example": true }, "deletedPolicy": { "type": "object", "properties": { "id": { "type": "string", "description": "The deleted policy ID", "example": "pol_abc123def456" }, "name": { "type": "string", "description": "The deleted policy name", "example": "Data Privacy Policy" } } }, "authType": { "type": "string", "enum": [ "api-key", "session" ], "description": "How the request was authenticated" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication or insufficient permissions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Policy not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Policy with ID pol_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete policy", "tags": [ "Policies" ] } }, "/v1/policies/{id}/versions": { "get": { "description": "Returns all versions for a policy in descending order. Supports both API key authentication and session authentication.", "operationId": "PoliciesController_getPolicyVersions_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } } ], "responses": { "200": { "description": "Policy versions retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "versions": { "type": "array", "items": { "type": "object" } }, "currentVersionId": { "type": "string", "nullable": true }, "pendingVersionId": { "type": "string", "nullable": true } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get policy versions", "tags": [ "Policies" ] }, "post": { "description": "Creates a new draft version based on the current published version (or a specified source version).", "operationId": "PoliciesController_createPolicyVersion_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } } ], "requestBody": { "required": true, "description": "Create a new policy version draft", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateVersionDto" } } } }, "responses": { "201": { "description": "Policy version created", "content": { "application/json": { "schema": { "type": "object", "properties": { "versionId": { "type": "string" }, "version": { "type": "number" } } } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid request" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Create policy version", "tags": [ "Policies" ] } }, "/v1/policies/{id}/versions/{versionId}": { "get": { "description": "Returns a single policy version by its ID, including content and metadata.", "operationId": "PoliciesController_getPolicyVersionById_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } }, { "name": "versionId", "required": true, "in": "path", "description": "Policy version ID", "schema": { "type": "string", "example": "pv_abc123def456" } } ], "responses": { "200": { "description": "Policy version retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "version": { "type": "object" }, "currentVersionId": { "type": "string", "nullable": true }, "pendingVersionId": { "type": "string", "nullable": true } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get policy version by ID", "tags": [ "Policies" ] }, "patch": { "description": "Updates content for a non-published, non-pending version. Published and pending versions are immutable.", "operationId": "PoliciesController_updateVersionContent_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } }, { "name": "versionId", "required": true, "in": "path", "description": "Policy version ID", "schema": { "type": "string", "example": "pv_abc123def456" } } ], "requestBody": { "required": true, "description": "Update content for a policy version", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateVersionContentDto" } } } }, "responses": { "200": { "description": "Version content updated", "content": { "application/json": { "schema": { "type": "object", "properties": { "versionId": { "type": "string" } } } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid request" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update version content", "tags": [ "Policies" ] }, "delete": { "description": "Deletes a non-published, non-pending version. Published and pending versions cannot be deleted.", "operationId": "PoliciesController_deletePolicyVersion_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } }, { "name": "versionId", "required": true, "in": "path", "description": "Policy version ID", "schema": { "type": "string", "example": "pv_abc123def456" } } ], "responses": { "200": { "description": "Version deleted", "content": { "application/json": { "schema": { "type": "object", "properties": { "deletedVersion": { "type": "number" } } } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid request" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete policy version", "tags": [ "Policies" ] } }, "/v1/policies/{id}/versions/publish": { "post": { "description": "Publishes draft content as a new version and optionally sets it as active.", "operationId": "PoliciesController_publishPolicyVersion_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } } ], "requestBody": { "required": true, "description": "Publish a new policy version", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishVersionDto" } } } }, "responses": { "200": { "description": "Version published", "content": { "application/json": { "schema": { "type": "object", "properties": { "versionId": { "type": "string" }, "version": { "type": "number" } } } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid request" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Publish new policy version", "tags": [ "Policies" ] } }, "/v1/policies/{id}/versions/{versionId}/activate": { "post": { "description": "Marks a version as the active (published) version and updates the policy content.", "operationId": "PoliciesController_setActivePolicyVersion_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } }, { "name": "versionId", "required": true, "in": "path", "description": "Policy version ID", "schema": { "type": "string", "example": "pv_abc123def456" } } ], "responses": { "200": { "description": "Active version updated", "content": { "application/json": { "schema": { "type": "object", "properties": { "versionId": { "type": "string" }, "version": { "type": "number" } } } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid request" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Set active policy version", "tags": [ "Policies" ] } }, "/v1/policies/{id}/versions/{versionId}/submit-for-approval": { "post": { "description": "Submits a version for approval by setting pendingVersionId and updating policy status.", "operationId": "PoliciesController_submitVersionForApproval_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "type": "string", "example": "pol_abc123def456" } }, { "name": "versionId", "required": true, "in": "path", "description": "Policy version ID", "schema": { "type": "string", "example": "pv_abc123def456" } } ], "requestBody": { "required": true, "description": "Submit a policy version for approval", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitForApprovalDto" } } } }, "responses": { "200": { "description": "Version submitted for approval", "content": { "application/json": { "schema": { "type": "object", "properties": { "versionId": { "type": "string" }, "version": { "type": "number" } } } } } }, "400": { "description": "Invalid request", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid request" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Resource not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Resource not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Submit version for approval", "tags": [ "Policies" ] } }, "/v1/policies/{id}/accept-changes": { "post": { "operationId": "PoliciesController_acceptPolicyChanges_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Accept pending policy changes and publish the version", "tags": [ "Policies" ] } }, "/v1/policies/{id}/deny-changes": { "post": { "operationId": "PoliciesController_denyPolicyChanges_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Deny pending policy changes", "tags": [ "Policies" ] } }, "/v1/policies/{id}/ai-chat": { "post": { "description": "Stream AI responses for policy editing assistance. Returns a text/event-stream with AI-generated suggestions.", "operationId": "PoliciesController_aiChatPolicy_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Policy ID", "schema": { "example": "pol_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AISuggestPolicyRequestDto" } } } }, "responses": { "200": { "description": "Streaming AI response", "content": { "text/event-stream": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Policy not found" } }, "security": [ { "apikey": [] } ], "summary": "Chat with AI about a policy", "tags": [ "Policies" ] } }, "/v1/attachments/{attachmentId}/download": { "get": { "description": "Generate a fresh signed URL for downloading any attachment", "operationId": "AttachmentsController_getAttachmentDownloadUrl_v1", "parameters": [ { "name": "attachmentId", "required": true, "in": "path", "description": "Unique attachment identifier", "schema": { "example": "att_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Download URL generated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "downloadUrl": { "type": "string", "description": "Signed URL for downloading the file", "example": "https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=..." }, "expiresIn": { "type": "number", "description": "URL expiration time in seconds", "example": 900 } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get attachment download URL", "tags": [ "Attachments" ] } }, "/v1/device-agent/mac": { "get": { "description": "Downloads the Comp AI Device Agent installer for macOS as a DMG file. The agent helps monitor device compliance and security policies. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "DeviceAgentController_downloadMacAgent_v1", "parameters": [], "responses": { "default": { "description": "macOS agent DMG file download", "content": { "application/x-apple-diskimage": { "schema": { "type": "string", "format": "binary" }, "example": "Binary DMG file content" } }, "headers": { "Content-Disposition": { "description": "Indicates file should be downloaded with specific filename", "schema": { "type": "string", "example": "attachment; filename=\"Comp AI Agent-1.0.0-arm64.dmg\"" } }, "Content-Type": { "description": "MIME type for macOS disk image", "schema": { "type": "string", "example": "application/x-apple-diskimage" } } } } }, "security": [ { "apikey": [] } ], "summary": "Download macOS Device Agent", "tags": [ "Device Agent" ] } }, "/v1/device-agent/windows": { "get": { "description": "Downloads a ZIP package containing the Comp AI Device Agent installer for Windows, along with setup scripts and instructions. The package includes an MSI installer, setup batch script customized for the organization and user, and a README with installation instructions. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).", "operationId": "DeviceAgentController_downloadWindowsAgent_v1", "parameters": [], "responses": { "default": { "description": "Windows agent ZIP file download containing MSI installer and setup scripts", "content": { "application/zip": { "schema": { "type": "string", "format": "binary" }, "example": "Binary ZIP file content" } }, "headers": { "Content-Disposition": { "description": "Indicates file should be downloaded with specific filename", "schema": { "type": "string", "example": "attachment; filename=\"compai-device-agent-windows.zip\"" } }, "Content-Type": { "description": "MIME type for ZIP archive", "schema": { "type": "string", "example": "application/zip" } } } } }, "security": [ { "apikey": [] } ], "summary": "Download Windows Device Agent ZIP", "tags": [ "Device Agent" ] } }, "/v1/tasks": { "get": { "description": "Retrieve all tasks for the authenticated organization. Employees/contractors only see their assigned tasks.", "operationId": "TasksController_getTasks_v1", "parameters": [ { "name": "includeRelations", "required": false, "in": "query", "description": "Include controls and automations with runs", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Tasks retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TaskResponseDto" } }, "example": [ { "id": "tsk_abc123def456", "title": "Implement user authentication", "description": "Add OAuth 2.0 authentication to the platform", "status": "in_progress", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } ] } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all tasks", "tags": [ "Tasks" ] }, "post": { "description": "Create a new task for the organization", "operationId": "TasksController_createTask_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "example": "Implement access controls" }, "description": { "type": "string", "example": "Set up role-based access controls for the platform" }, "assigneeId": { "type": "string", "nullable": true, "example": "mem_abc123" }, "frequency": { "type": "string", "enum": [ "daily", "weekly", "monthly", "quarterly", "yearly" ], "nullable": true, "example": "monthly" }, "department": { "type": "string", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "nullable": true, "example": "it" }, "controlIds": { "type": "array", "items": { "type": "string" }, "example": [ "ctrl_abc123" ] }, "taskTemplateId": { "type": "string", "nullable": true, "example": "tmpl_abc123" }, "vendorId": { "type": "string", "nullable": true, "example": "vnd_abc123", "description": "Vendor ID to connect this task to" } }, "required": [ "title", "description" ] } } } }, "responses": { "201": { "description": "Task created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponseDto" } } } }, "400": { "description": "Invalid request body" } }, "security": [ { "apikey": [] } ], "summary": "Create a task", "tags": [ "Tasks" ] } }, "/v1/tasks/bulk": { "patch": { "description": "Bulk update the status of multiple tasks", "operationId": "TasksController_updateTasksStatus_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "taskIds": { "type": "array", "items": { "type": "string" }, "example": [ "tsk_abc123", "tsk_def456" ] }, "status": { "type": "string", "enum": [ "todo", "in_progress", "in_review", "done", "not_relevant", "failed" ], "example": "in_progress" }, "reviewDate": { "type": "string", "format": "date-time", "example": "2025-01-01T00:00:00.000Z", "description": "Optional review date to set on all tasks" } }, "required": [ "taskIds", "status" ] } } } }, "responses": { "200": { "description": "Tasks updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "updatedCount": { "type": "number", "example": 2 } } } } } }, "400": { "description": "Invalid request body" } }, "security": [ { "apikey": [] } ], "summary": "Update status for multiple tasks", "tags": [ "Tasks" ] }, "delete": { "description": "Bulk delete multiple tasks by their IDs", "operationId": "TasksController_deleteTasks_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "taskIds": { "type": "array", "items": { "type": "string" }, "example": [ "tsk_abc123", "tsk_def456" ] } }, "required": [ "taskIds" ] } } } }, "responses": { "200": { "description": "Tasks deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "deletedCount": { "type": "number", "example": 2 } } } } } }, "400": { "description": "Invalid request body" } }, "security": [ { "apikey": [] } ], "summary": "Delete multiple tasks", "tags": [ "Tasks" ] } }, "/v1/tasks/bulk/assignee": { "patch": { "description": "Bulk update the assignee of multiple tasks", "operationId": "TasksController_updateTasksAssignee_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "taskIds": { "type": "array", "items": { "type": "string" }, "example": [ "tsk_abc123", "tsk_def456" ] }, "assigneeId": { "type": "string", "nullable": true, "example": "mem_abc123", "description": "Assignee member ID, or null to unassign" } }, "required": [ "taskIds" ] } } } }, "responses": { "200": { "description": "Tasks updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "updatedCount": { "type": "number", "example": 2 } } } } } }, "400": { "description": "Invalid request body" } }, "security": [ { "apikey": [] } ], "summary": "Update assignee for multiple tasks", "tags": [ "Tasks" ] } }, "/v1/tasks/reorder": { "patch": { "description": "Update the order and status for multiple tasks (drag & drop)", "operationId": "TasksController_reorderTasks_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "updates": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "order": { "type": "number" }, "status": { "type": "string", "enum": [ "todo", "in_progress", "in_review", "done", "not_relevant", "failed" ] } }, "required": [ "id", "order", "status" ] } } }, "required": [ "updates" ] } } } }, "responses": { "200": { "description": "Tasks reordered successfully" }, "400": { "description": "Invalid request body" } }, "security": [ { "apikey": [] } ], "summary": "Reorder tasks", "tags": [ "Tasks" ] } }, "/v1/tasks/bulk/submit-for-review": { "post": { "description": "Submit multiple tasks for review with a single approver", "operationId": "TasksController_bulkSubmitForReview_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "taskIds": { "type": "array", "items": { "type": "string" }, "example": [ "tsk_abc123", "tsk_def456" ] }, "approverId": { "type": "string", "example": "mem_abc123", "description": "Member ID of the approver" } }, "required": [ "taskIds", "approverId" ] } } } }, "responses": { "200": { "description": "Tasks submitted for review" }, "400": { "description": "Invalid request" } }, "security": [ { "apikey": [] } ], "summary": "Bulk submit tasks for review", "tags": [ "Tasks" ] } }, "/v1/tasks/options": { "get": { "operationId": "TasksController_getTaskOptions_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get page options for tasks overview", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}": { "get": { "description": "Retrieve a specific task by its ID", "operationId": "TasksController_getTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Task retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponseDto" }, "example": { "id": "tsk_abc123def456", "title": "Implement user authentication", "description": "Add OAuth 2.0 authentication to the platform", "status": "in_progress", "createdAt": "2024-01-15T10:30:00Z", "updatedAt": "2024-01-15T10:30:00Z" } } } }, "403": { "description": "Forbidden - Not assigned to this task" }, "404": { "description": "Task not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Task with ID tsk_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get task by ID", "tags": [ "Tasks" ] }, "patch": { "description": "Update an existing task (title, description, status, assignee, approver, frequency, department, reviewDate)", "operationId": "TasksController_updateTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "example": "Review access controls", "description": "Task title" }, "description": { "type": "string", "example": "Review and update access control policies", "description": "Task description" }, "status": { "type": "string", "enum": [ "todo", "in_progress", "in_review", "done", "not_relevant", "failed" ], "example": "in_progress" }, "assigneeId": { "type": "string", "nullable": true, "example": "mem_abc123", "description": "Assignee member ID, or null to unassign" }, "approverId": { "type": "string", "nullable": true, "example": "mem_abc123", "description": "Approver member ID, or null to unassign" }, "frequency": { "type": "string", "enum": [ "daily", "weekly", "monthly", "quarterly", "yearly" ], "example": "monthly" }, "department": { "type": "string", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "reviewDate": { "type": "string", "format": "date-time", "example": "2025-01-01T00:00:00.000Z" } } } } } }, "responses": { "200": { "description": "Task updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskResponseDto" } } } }, "400": { "description": "Invalid request body or task not found" }, "404": { "description": "Task not found" } }, "security": [ { "apikey": [] } ], "summary": "Update a task", "tags": [ "Tasks" ] }, "delete": { "description": "Delete a single task by its ID", "operationId": "TasksController_deleteTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Task deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "message": { "type": "string", "example": "Task deleted successfully" } } } } } }, "404": { "description": "Task not found" } }, "security": [ { "apikey": [] } ], "summary": "Delete a task", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/activity": { "get": { "description": "Retrieve audit log activity for a specific task with pagination", "operationId": "TasksController_getTaskActivity_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } }, { "name": "skip", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "take", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Activity retrieved successfully" }, "400": { "description": "Task not found" } }, "security": [ { "apikey": [] } ], "summary": "Get task activity", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/regenerate": { "post": { "description": "Update the task title, description, and automation status with the latest content from the framework template", "operationId": "TasksController_regenerateTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Task regenerated successfully" }, "400": { "description": "Task has no associated template" }, "404": { "description": "Task not found" } }, "security": [ { "apikey": [] } ], "summary": "Regenerate task from template", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/submit-for-review": { "post": { "description": "Move task status to in_review and assign an approver.", "operationId": "TasksController_submitForReview_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "approverId": { "type": "string", "example": "mem_abc123", "description": "Member ID of the approver" } }, "required": [ "approverId" ] } } } }, "responses": { "200": { "description": "Task submitted for review" }, "400": { "description": "Invalid request" } }, "security": [ { "apikey": [] } ], "summary": "Submit task for review", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/approve": { "post": { "description": "Approve a task that is in review. Only the assigned approver can approve. Moves status to done and creates an audit comment.", "operationId": "TasksController_approveTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Task approved successfully" }, "400": { "description": "Task is not in review" }, "403": { "description": "Not the assigned approver" } }, "security": [ { "apikey": [] } ], "summary": "Approve a task", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/reject": { "post": { "description": "Reject a task that is in review. Only the assigned approver can reject. Reverts status to the previous status and creates an audit comment.", "operationId": "TasksController_rejectTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Task rejected successfully" }, "400": { "description": "Task is not in review" }, "403": { "description": "Not the assigned approver" } }, "security": [ { "apikey": [] } ], "summary": "Reject a task review", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/attachments": { "get": { "description": "Retrieve all attachments for a specific task", "operationId": "TasksController_getTaskAttachments_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Attachments retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AttachmentResponseDto" } }, "example": [ { "id": "att_abc123def456", "name": "evidence.pdf", "type": "application/pdf", "size": 123456, "downloadUrl": "https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=...", "createdAt": "2024-01-15T10:30:00Z" } ] } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Task not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Task with ID tsk_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get task attachments", "tags": [ "Tasks" ] }, "post": { "description": "Upload a file attachment to a specific task", "operationId": "TasksController_uploadTaskAttachment_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadAttachmentDto" } } } }, "responses": { "201": { "description": "Attachment uploaded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentResponseDto" }, "example": { "id": "att_abc123def456", "entityId": "tsk_abc123def456", "entityType": "task", "fileName": "evidence.pdf", "fileType": "application/pdf", "fileSize": 123456, "createdAt": "2024-01-01T00:00:00Z", "createdBy": "usr_abc123def456" } } } }, "400": { "description": "Invalid file data or file too large", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "File exceeds maximum allowed size" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Task not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Task with ID tsk_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Upload attachment to task", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/attachments/{attachmentId}/download": { "get": { "description": "Generate a signed URL for downloading a task attachment", "operationId": "TasksController_getTaskAttachmentDownloadUrl_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } }, { "name": "attachmentId", "required": true, "in": "path", "description": "Unique attachment identifier", "schema": { "example": "att_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Download URL generated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "downloadUrl": { "type": "string", "description": "Signed URL for downloading the file", "example": "https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=..." }, "expiresIn": { "type": "number", "description": "URL expiration time in seconds", "example": 900 } } } } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Task or attachment not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Task or attachment not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get attachment download URL", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/attachments/{attachmentId}": { "delete": { "description": "Delete a specific attachment from a task", "operationId": "TasksController_deleteTaskAttachment_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } }, { "name": "attachmentId", "required": true, "in": "path", "description": "Unique attachment identifier", "schema": { "example": "att_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Attachment deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "deletedAttachmentId": { "type": "string", "example": "att_abc123def456" }, "message": { "type": "string", "example": "Attachment deleted successfully" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Task or attachment not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Task or attachment not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete task attachment", "tags": [ "Tasks" ] } }, "/v1/tasks/{taskId}/automations": { "get": { "description": "Retrieve all automations for a specific task", "operationId": "AutomationsController_getTaskAutomations_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Automations retrieved successfully" } }, "security": [ { "apikey": [] } ], "summary": "Get all automations for a task", "tags": [ "Task Automations" ] }, "post": { "description": "Create an automation for collecting evidence for a specific task", "operationId": "AutomationsController_createAutomation_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "201": { "description": "Automation created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "automation": { "type": "object", "properties": { "id": { "type": "string", "example": "auto_abc123def456" }, "name": { "type": "string", "example": "Task Name - Evidence Collection" } } } } } } } }, "400": { "description": "Bad request - Invalid task ID or organization ID", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid task ID or organization ID" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Task not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Task not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new evidence automation", "tags": [ "Task Automations" ] } }, "/v1/tasks/{taskId}/automations/{automationId}": { "get": { "description": "Retrieve details for a specific automation", "operationId": "AutomationsController_getAutomation_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } }, { "name": "automationId", "required": true, "in": "path", "description": "Unique automation identifier", "schema": { "example": "auto_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Automation details retrieved successfully" } }, "security": [ { "apikey": [] } ], "summary": "Get automation details", "tags": [ "Task Automations" ] }, "patch": { "description": "Update the name or description of an existing automation", "operationId": "AutomationsController_updateAutomation_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } }, { "name": "automationId", "required": true, "in": "path", "description": "Unique automation identifier", "schema": { "example": "auto_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAutomationDto" } } } }, "responses": { "200": { "description": "Automation updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "automation": { "type": "object", "properties": { "id": { "type": "string", "example": "auto_abc123def456" }, "name": { "type": "string", "example": "Updated Automation Name" }, "description": { "type": "string", "example": "Updated description" } } } } } } } }, "400": { "description": "Bad request - Invalid automation ID or data", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Invalid automation data" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Automation not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Automation not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update an existing automation", "tags": [ "Task Automations" ] }, "delete": { "description": "Delete a specific automation and all its associated data", "operationId": "AutomationsController_deleteAutomation_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } }, { "name": "automationId", "required": true, "in": "path", "description": "Unique automation identifier", "schema": { "example": "auto_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Automation deleted successfully" } }, "security": [ { "apikey": [] } ], "summary": "Delete an automation", "tags": [ "Task Automations" ] } }, "/v1/tasks/{taskId}/automations/{automationId}/runs": { "get": { "description": "Retrieve all runs for a specific automation", "operationId": "AutomationsController_getAutomationRuns_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Task ID", "schema": { "type": "string" } }, { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Runs retrieved successfully" } }, "security": [ { "apikey": [] } ], "summary": "Get all runs for a specific automation", "tags": [ "Task Automations" ] } }, "/v1/tasks/{taskId}/automations/{automationId}/versions": { "get": { "description": "Retrieve all published versions of an automation script", "operationId": "AutomationsController_getAutomationVersions_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Task ID", "schema": { "type": "string" } }, { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } }, { "name": "limit", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Versions retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "versions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "version": { "type": "number" }, "scriptKey": { "type": "string" }, "changelog": { "type": "string", "nullable": true }, "publishedBy": { "type": "string", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" } } } } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all versions for an automation", "tags": [ "Task Automations" ] }, "post": { "operationId": "AutomationsController_createVersion_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Task ID", "schema": { "type": "string" } }, { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Create a published version record for an automation", "tags": [ "Task Automations" ] } }, "/v1/tasks/{taskId}/automations/runs": { "get": { "description": "Retrieve all evidence automation runs across automations for a specific task", "operationId": "AutomationsController_getTaskAutomationRuns_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Task ID", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Automation runs retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "example": "ear_abc123def456" }, "status": { "type": "string", "enum": [ "PENDING", "RUNNING", "COMPLETED", "FAILED" ] }, "trigger": { "type": "string", "enum": [ "MANUAL", "SCHEDULED", "EVENT" ] }, "createdAt": { "type": "string", "format": "date-time" }, "completedAt": { "type": "string", "format": "date-time", "nullable": true }, "error": { "type": "object", "nullable": true } } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all automation runs for a task", "tags": [ "Task Automations" ] } }, "/v1/tasks/{taskId}/evidence": { "get": { "description": "Retrieve a summary of all automation evidence for a specific task", "operationId": "EvidenceExportController_getTaskEvidenceSummary_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "example": "tsk_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Evidence summary retrieved successfully" }, "404": { "description": "Task not found" } }, "security": [ { "apikey": [] } ], "summary": "Get task evidence summary", "tags": [ "Evidence Export" ] } }, "/v1/tasks/{taskId}/evidence/automation/{automationId}/pdf": { "get": { "description": "Generate and download a PDF containing all evidence for a specific automation", "operationId": "EvidenceExportController_exportAutomationPDF_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "type": "string" } }, { "name": "automationId", "required": true, "in": "path", "description": "Unique automation identifier (checkId for app automations)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "PDF file generated successfully", "content": { "application/pdf": {} } }, "404": { "description": "Task or automation not found" } }, "security": [ { "apikey": [] } ], "summary": "Export automation evidence as PDF", "tags": [ "Evidence Export" ] } }, "/v1/tasks/{taskId}/evidence/export": { "get": { "description": "Generate and download a ZIP file containing all automation evidence for a task", "operationId": "EvidenceExportController_exportTaskEvidenceZip_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Unique task identifier", "schema": { "type": "string" } }, { "name": "includeJson", "required": false, "in": "query", "description": "Include raw JSON files alongside PDFs", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "ZIP file generated successfully", "content": { "application/zip": {} } }, "404": { "description": "Task not found" } }, "security": [ { "apikey": [] } ], "summary": "Export task evidence as ZIP", "tags": [ "Evidence Export" ] } }, "/v1/evidence-export/all": { "get": { "description": "Generate and download a ZIP file containing all automation evidence across all tasks. Only accessible by auditors.", "operationId": "AuditorEvidenceExportController_exportAllEvidence_v1", "parameters": [ { "name": "includeJson", "required": false, "in": "query", "description": "Include raw JSON files alongside PDFs", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "ZIP file generated successfully", "content": { "application/zip": {} } }, "403": { "description": "Access denied - Auditor role required" } }, "security": [ { "apikey": [] } ], "summary": "Export all organization evidence as ZIP (Auditor only)", "tags": [ "Evidence Export (Auditor)" ] } }, "/v1/comments": { "get": { "description": "Retrieve all comments for a specific entity (task, policy, vendor, etc.)", "operationId": "CommentsController_getComments_v1", "parameters": [ { "name": "entityId", "required": true, "in": "query", "description": "ID of the entity to get comments for", "schema": { "example": "tsk_abc123def456", "type": "string" } }, { "name": "entityType", "required": true, "in": "query", "description": "Type of entity", "schema": { "enum": [ "task", "vendor", "risk", "policy" ], "type": "string" } } ], "responses": { "200": { "description": "Comments retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CommentResponseDto" } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get comments for an entity", "tags": [ "Comments" ] }, "post": { "description": "Create a comment on an entity with optional file attachments", "operationId": "CommentsController_createComment_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCommentDto" } } } }, "responses": { "201": { "description": "Comment created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new comment", "tags": [ "Comments" ] } }, "/v1/comments/{commentId}": { "put": { "description": "Update the content of an existing comment (author only)", "operationId": "CommentsController_updateComment_v1", "parameters": [ { "name": "commentId", "required": true, "in": "path", "description": "Unique comment identifier", "schema": { "example": "cmt_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCommentDto" } } } }, "responses": { "200": { "description": "Comment updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CommentResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Update a comment", "tags": [ "Comments" ] }, "delete": { "description": "Delete a comment and all its attachments (author only)", "operationId": "CommentsController_deleteComment_v1", "parameters": [ { "name": "commentId", "required": true, "in": "path", "description": "Unique comment identifier", "schema": { "example": "cmt_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "description": "Delete comment request body", "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string", "description": "User ID of the comment author (required for API key auth, ignored for JWT auth)", "example": "usr_abc123def456" } } } } } }, "responses": { "200": { "description": "Comment deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "deletedCommentId": { "type": "string", "example": "cmt_abc123def456" }, "message": { "type": "string", "example": "Comment deleted successfully" } } } } } }, "401": { "description": "Unauthorized - Invalid authentication", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Unauthorized" } } } } } }, "404": { "description": "Comment not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Comment with ID cmt_abc123def456 not found" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete a comment", "tags": [ "Comments" ] } }, "/v1/health": { "get": { "description": "Returns the health status of the API", "operationId": "HealthController_getHealth_v1", "parameters": [], "responses": { "200": { "description": "API is healthy", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "ok" }, "timestamp": { "type": "string", "format": "date-time" }, "uptime": { "type": "number", "description": "Process uptime in seconds" }, "version": { "type": "string", "example": "1.0.0" } } } } } } }, "summary": "Health check", "tags": [ "Health" ] } }, "/v1/trust-portal/settings": { "get": { "operationId": "TrustPortalController_getSettings_v1", "parameters": [], "responses": { "200": { "description": "Trust portal settings retrieved successfully" } }, "security": [ { "apikey": [] } ], "summary": "Get complete trust portal settings for admin page", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/favicon": { "post": { "operationId": "TrustPortalController_uploadFavicon_v1", "parameters": [], "responses": { "201": { "description": "Favicon uploaded successfully" } }, "security": [ { "apikey": [] } ], "summary": "Upload a favicon for the trust portal", "tags": [ "Trust Portal" ] }, "delete": { "operationId": "TrustPortalController_removeFavicon_v1", "parameters": [], "responses": { "200": { "description": "Favicon removed successfully" } }, "security": [ { "apikey": [] } ], "summary": "Remove the trust portal favicon", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/domain/status": { "get": { "description": "Retrieve the verification status and DNS records for a custom domain configured in the Vercel trust portal project", "operationId": "TrustPortalController_getDomainStatus_v1", "parameters": [ { "name": "domain", "required": true, "in": "query", "description": "The domain name to check status for", "schema": { "example": "portal.example.com", "type": "string" } } ], "responses": { "200": { "description": "Domain status retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DomainStatusResponseDto" } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication" }, "500": { "description": "Failed to retrieve domain status from Vercel" } }, "security": [ { "apikey": [] } ], "summary": "Get domain verification status", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/compliance-resources/upload": { "post": { "description": "Stores the compliance certificate in the organization assets bucket and replaces any previous file for the same framework.", "operationId": "TrustPortalController_uploadComplianceResource_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadComplianceResourceDto" } } } }, "responses": { "201": { "description": "Compliance certificate uploaded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceResourceResponseDto" } } } }, "400": { "description": "Framework not compliant, PDF validation failed, or organization mismatch" } }, "security": [ { "apikey": [] } ], "summary": "Upload or replace a compliance certificate (PDF only)", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/compliance-resources/signed-url": { "post": { "operationId": "TrustPortalController_getComplianceResourceUrl_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceResourceSignedUrlDto" } } } }, "responses": { "200": { "description": "Signed URL generated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComplianceResourceUrlResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Generate a temporary signed URL for a compliance certificate", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/compliance-resources/list": { "post": { "operationId": "TrustPortalController_listComplianceResources_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListComplianceResourcesDto" } } } }, "responses": { "200": { "description": "Compliance certificates retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ComplianceResourceResponseDto" } } } } } }, "security": [ { "apikey": [] } ], "summary": "List uploaded compliance certificates for the organization", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/documents/upload": { "post": { "description": "Stores a document in the organization assets bucket and registers it for the trust portal.", "operationId": "TrustPortalController_uploadTrustDocument_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadTrustDocumentDto" } } } }, "responses": { "201": { "description": "Document uploaded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrustDocumentResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Upload an additional trust portal document", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/documents/list": { "post": { "operationId": "TrustPortalController_listTrustDocuments_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListComplianceResourcesDto" } } } }, "responses": { "200": { "description": "Documents retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TrustDocumentResponseDto" } } } } } }, "security": [ { "apikey": [] } ], "summary": "List additional trust portal documents for the organization", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/documents/{documentId}/download": { "post": { "operationId": "TrustPortalController_getTrustDocumentUrl_v1", "parameters": [ { "name": "documentId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrustDocumentSignedUrlDto" } } } }, "responses": { "200": { "description": "Signed URL generated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrustDocumentUrlResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Generate a temporary signed URL for a trust portal document", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/documents/{documentId}/delete": { "post": { "operationId": "TrustPortalController_deleteTrustDocument_v1", "parameters": [ { "name": "documentId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteTrustDocumentDto" } } } }, "responses": { "200": { "description": "Document deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete (deactivate) a trust portal document", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/settings/toggle": { "put": { "operationId": "TrustPortalController_togglePortal_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Enable or disable the trust portal", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/settings/custom-domain": { "post": { "operationId": "TrustPortalController_addCustomDomain_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Add or update a custom domain for the trust portal", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/settings/check-dns": { "post": { "operationId": "TrustPortalController_checkDnsRecords_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Check DNS records for a custom domain", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/settings/faqs": { "put": { "operationId": "TrustPortalController_updateFaqs_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Update trust portal FAQs", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/settings/allowed-domains": { "put": { "operationId": "TrustPortalController_updateAllowedDomains_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Update allowed domains for the trust portal", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/settings/frameworks": { "put": { "operationId": "TrustPortalController_updateFrameworks_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Update trust portal framework settings", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/overview": { "post": { "operationId": "TrustPortalController_updateOverview_v1", "parameters": [], "responses": { "200": { "description": "Overview updated successfully" } }, "security": [ { "apikey": [] } ], "summary": "Update trust portal overview section", "tags": [ "Trust Portal" ] }, "get": { "operationId": "TrustPortalController_getOverview_v1", "parameters": [ { "name": "organizationId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get trust portal overview", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/custom-links": { "post": { "operationId": "TrustPortalController_createCustomLink_v1", "parameters": [], "responses": { "201": { "description": "Custom link created successfully" } }, "security": [ { "apikey": [] } ], "summary": "Create a custom link for trust portal", "tags": [ "Trust Portal" ] }, "get": { "operationId": "TrustPortalController_listCustomLinks_v1", "parameters": [ { "name": "organizationId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "List custom links for trust portal", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/custom-links/{linkId}": { "post": { "operationId": "TrustPortalController_updateCustomLink_v1", "parameters": [ { "name": "linkId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Custom link updated successfully" } }, "security": [ { "apikey": [] } ], "summary": "Update a custom link", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/custom-links/{linkId}/delete": { "post": { "operationId": "TrustPortalController_deleteCustomLink_v1", "parameters": [ { "name": "linkId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Custom link deleted successfully" } }, "security": [ { "apikey": [] } ], "summary": "Delete a custom link", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/custom-links/reorder": { "post": { "operationId": "TrustPortalController_reorderCustomLinks_v1", "parameters": [], "responses": { "200": { "description": "Custom links reordered successfully" } }, "security": [ { "apikey": [] } ], "summary": "Reorder custom links", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/vendors/{vendorId}/trust-settings": { "post": { "operationId": "TrustPortalController_updateVendorTrustSettings_v1", "parameters": [ { "name": "vendorId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Vendor settings updated successfully" } }, "security": [ { "apikey": [] } ], "summary": "Update vendor trust portal settings", "tags": [ "Trust Portal" ] } }, "/v1/trust-portal/vendors": { "get": { "operationId": "TrustPortalController_listVendors_v1", "parameters": [ { "name": "all", "required": false, "in": "query", "description": "When true, returns all org vendors with sync", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "List vendors configured for trust portal", "tags": [ "Trust Portal" ] } }, "/v1/trust-access/{friendlyUrl}/requests": { "post": { "description": "External users submit request for data access from trust site", "operationId": "TrustAccessController_createAccessRequest_v1", "parameters": [ { "name": "friendlyUrl", "required": true, "in": "path", "description": "Trust Portal friendly URL or Organization ID", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAccessRequestDto" } } } }, "responses": { "201": { "description": "Access request created and sent for review" } }, "summary": "Submit data access request", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/requests": { "get": { "description": "Get all access requests for organization", "operationId": "TrustAccessController_listAccessRequests_v1", "parameters": [ { "name": "status", "required": false, "in": "query", "schema": { "type": "string", "enum": [ "under_review", "approved", "denied", "canceled" ] } } ], "responses": { "200": { "description": "Access requests retrieved" } }, "security": [ { "apikey": [] } ], "summary": "List access requests", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/requests/{id}": { "get": { "description": "Get detailed information about a specific access request", "operationId": "TrustAccessController_getAccessRequest_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Request details returned" } }, "security": [ { "apikey": [] } ], "summary": "Get access request details", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/requests/{id}/approve": { "post": { "description": "Approve request and create time-limited grant", "operationId": "TrustAccessController_approveRequest_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveAccessRequestDto" } } } }, "responses": { "200": { "description": "Request approved successfully" } }, "security": [ { "apikey": [] } ], "summary": "Approve access request", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/requests/{id}/deny": { "post": { "description": "Reject access request with reason", "operationId": "TrustAccessController_denyRequest_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DenyAccessRequestDto" } } } }, "responses": { "200": { "description": "Request denied" } }, "security": [ { "apikey": [] } ], "summary": "Deny access request", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/grants": { "get": { "description": "Get all active and expired grants", "operationId": "TrustAccessController_listGrants_v1", "parameters": [], "responses": { "200": { "description": "Grants retrieved" } }, "security": [ { "apikey": [] } ], "summary": "List access grants", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/grants/{id}/revoke": { "post": { "description": "Immediately revoke active grant", "operationId": "TrustAccessController_revokeGrant_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeGrantDto" } } } }, "responses": { "200": { "description": "Grant revoked" } }, "security": [ { "apikey": [] } ], "summary": "Revoke access grant", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/grants/{id}/resend-access-email": { "post": { "description": "Resend the access granted email to user with active grant", "operationId": "TrustAccessController_resendAccessEmail_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Access email resent" } }, "security": [ { "apikey": [] } ], "summary": "Resend access granted email", "tags": [ "Trust Access" ] } }, "/v1/trust-access/nda/{token}": { "get": { "description": "Fetch NDA agreement details for signing", "operationId": "TrustAccessController_getNda_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "NDA details returned" } }, "summary": "Get NDA details by token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/nda/{token}/preview-nda": { "post": { "description": "Generate preview NDA PDF for external user before signing", "operationId": "TrustAccessController_previewNdaByToken_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Preview NDA generated" } }, "summary": "Preview NDA by token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/nda/{token}/sign": { "post": { "description": "Sign NDA agreement, generate watermarked PDF, and create access grant", "operationId": "TrustAccessController_signNda_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SignNdaDto" } } } }, "responses": { "200": { "description": "NDA signed successfully" } }, "summary": "Sign NDA", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/requests/{id}/resend-nda": { "post": { "description": "Resend NDA signing email to requester", "operationId": "TrustAccessController_resendNda_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "NDA email resent" } }, "security": [ { "apikey": [] } ], "summary": "Resend NDA email", "tags": [ "Trust Access" ] } }, "/v1/trust-access/admin/requests/{id}/preview-nda": { "post": { "description": "Generate preview NDA with watermark and save to S3 with preview-* prefix", "operationId": "TrustAccessController_previewNda_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Preview NDA generated" } }, "security": [ { "apikey": [] } ], "summary": "Preview NDA PDF", "tags": [ "Trust Access" ] } }, "/v1/trust-access/{friendlyUrl}/reclaim": { "post": { "description": "Generate access link for users with existing grants to redownload data", "operationId": "TrustAccessController_reclaimAccess_v1", "parameters": [ { "name": "friendlyUrl", "required": true, "in": "path", "description": "Trust Portal friendly URL or Organization ID", "schema": { "type": "string" } }, { "name": "query", "required": false, "in": "query", "description": "Query parameter to append to the access link (e.g., security-questionnaire)", "schema": { "example": "security-questionnaire", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReclaimAccessDto" } } } }, "responses": { "200": { "description": "Access link sent to email" } }, "summary": "Reclaim access", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}": { "get": { "description": "Retrieve compliance data using access token", "operationId": "TrustAccessController_getGrantByAccessToken_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Grant data returned" } }, "summary": "Get grant data by access token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/policies": { "get": { "description": "Get list of published policies available for download", "operationId": "TrustAccessController_getPoliciesByAccessToken_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Policies list returned" } }, "summary": "List policies by access token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/policies/download-all": { "get": { "description": "Generate combined PDF from all published policy content with watermark", "operationId": "TrustAccessController_downloadAllPolicies_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Download URL for watermarked PDF returned" } }, "summary": "Download all policies as watermarked PDF", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/policies/download-all-zip": { "get": { "description": "Generate ZIP archive containing individual watermarked PDFs for each policy", "operationId": "TrustAccessController_downloadAllPoliciesAsZip_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Download URL for ZIP archive returned" } }, "summary": "Download all policies as ZIP with individual PDFs", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/compliance-resources": { "get": { "description": "Get list of uploaded compliance certificates for the organization", "operationId": "TrustAccessController_getComplianceResourcesByAccessToken_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Compliance resources list returned" } }, "summary": "List compliance resources by access token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/documents": { "get": { "description": "Get list of trust portal additional documents available for download", "operationId": "TrustAccessController_getTrustDocumentsByAccessToken_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Documents list returned" } }, "summary": "List additional documents by access token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/documents/download-all": { "get": { "description": "Creates a ZIP archive of all active trust portal additional documents and returns a signed download URL", "operationId": "TrustAccessController_downloadAllTrustDocuments_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Signed URL for ZIP archive returned" } }, "summary": "Download all additional documents as a ZIP by access token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/documents/{documentId}": { "get": { "description": "Get signed URL to download a specific trust portal additional document", "operationId": "TrustAccessController_getTrustDocumentUrlByAccessToken_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "documentId", "required": true, "in": "path", "description": "Trust document ID", "schema": { "example": "tdoc_abc123", "type": "string" } } ], "responses": { "200": { "description": "Signed URL for document returned" }, "400": { "description": "Invalid access token" }, "404": { "description": "Document not found" } }, "summary": "Download additional document by access token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/access/{token}/compliance-resources/{framework}": { "get": { "description": "Get signed URL to download a specific compliance certificate file", "operationId": "TrustAccessController_getComplianceResourceUrlByAccessToken_v1", "parameters": [ { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "framework", "required": true, "in": "path", "description": "Compliance framework identifier", "schema": { "enum": [ "iso_27001", "iso_42001", "gdpr", "hipaa", "soc2_type1", "soc2_type2", "pci_dss", "nen_7510", "iso_9001" ], "type": "string" } } ], "responses": { "200": { "description": "Signed URL for compliance resource returned" }, "400": { "description": "Invalid framework or access token" }, "404": { "description": "Compliance resource not found" } }, "summary": "Download compliance resource by access token", "tags": [ "Trust Access" ] } }, "/v1/trust-access/{friendlyUrl}/faqs": { "get": { "description": "Retrieve the frequently asked questions for a published trust portal as structured data.", "operationId": "TrustAccessController_getFaqs_v1", "parameters": [ { "name": "friendlyUrl", "required": true, "in": "path", "description": "Trust Portal friendly URL or Organization ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "FAQs retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "faqs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "question": { "type": "string" }, "answer": { "type": "string" }, "order": { "type": "number" } } }, "nullable": true } } } } } }, "404": { "description": "Trust site not found or not published" } }, "summary": "Get FAQs for a trust portal", "tags": [ "Trust Access" ] } }, "/v1/trust-access/{friendlyUrl}/overview": { "get": { "description": "Retrieve the overview/mission text for a published trust portal.", "operationId": "TrustAccessController_getPublicOverview_v1", "parameters": [ { "name": "friendlyUrl", "required": true, "in": "path", "description": "Trust Portal friendly URL or Organization ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Overview retrieved successfully" } }, "summary": "Get overview section for a trust portal", "tags": [ "Trust Access" ] } }, "/v1/trust-access/{friendlyUrl}/custom-links": { "get": { "description": "Retrieve the custom external links configured for the trust portal.", "operationId": "TrustAccessController_getPublicCustomLinks_v1", "parameters": [ { "name": "friendlyUrl", "required": true, "in": "path", "description": "Trust Portal friendly URL or Organization ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Custom links retrieved successfully" } }, "summary": "Get custom links for a trust portal", "tags": [ "Trust Access" ] } }, "/v1/trust-access/{friendlyUrl}/favicon": { "get": { "description": "Retrieve the favicon URL for the trust portal.", "operationId": "TrustAccessController_getPublicFavicon_v1", "parameters": [ { "name": "friendlyUrl", "required": true, "in": "path", "description": "Trust Portal friendly URL or Organization ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Favicon URL retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "faviconUrl": { "type": "string", "nullable": true, "description": "Signed URL to the favicon, or null if not set" } } } } } } }, "summary": "Get favicon URL for a trust portal", "tags": [ "Trust Access" ] } }, "/v1/trust-access/{friendlyUrl}/vendors": { "get": { "description": "Retrieve the list of vendors configured to display on the trust portal.", "operationId": "TrustAccessController_getPublicVendors_v1", "parameters": [ { "name": "friendlyUrl", "required": true, "in": "path", "description": "Trust Portal friendly URL or Organization ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Vendors retrieved successfully" } }, "summary": "Get vendors/subprocessors for a trust portal", "tags": [ "Trust Access" ] } }, "/v1/framework-editor/task-template": { "get": { "description": "Retrieve all framework editor task templates", "operationId": "TaskTemplateController_getAllTaskTemplates_v1", "parameters": [], "responses": { "200": { "description": "Successfully retrieved all framework editor task templates", "content": { "application/json": { "schema": { "example": { "data": [ { "id": "frk_tt_abc123def456", "name": "Monthly Security Review", "description": "Review and update security policies on a monthly basis", "frequency": "monthly", "department": "it", "createdAt": "2025-01-01T00:00:00.000Z", "updatedAt": "2025-01-01T00:00:00.000Z" } ], "count": 1, "authType": "session", "authenticatedUser": { "id": "user_123", "email": "user@example.com" } } } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "example": { "statusCode": 401, "message": "Unauthorized" } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "example": { "statusCode": 500, "message": "Internal server error" } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all framework editor task templates", "tags": [ "Framework Editor Task Templates" ] } }, "/v1/framework-editor/task-template/{id}": { "get": { "description": "Retrieve a specific framework editor task template by its ID", "operationId": "TaskTemplateController_getTaskTemplateById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Framework editor task template ID", "schema": { "example": "frk_tt_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved framework editor task template", "content": { "application/json": { "schema": { "example": { "id": "frk_tt_abc123def456", "name": "Monthly Security Review", "description": "Review and update security policies on a monthly basis", "frequency": "monthly", "department": "it", "createdAt": "2025-01-01T00:00:00.000Z", "updatedAt": "2025-01-01T00:00:00.000Z", "authType": "session", "authenticatedUser": { "id": "user_123", "email": "user@example.com" } } } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "example": { "statusCode": 401, "message": "Unauthorized" } } } } }, "404": { "description": "Framework editor task template not found", "content": { "application/json": { "schema": { "example": { "statusCode": 404, "message": "Framework editor task template with ID frk_tt_abc123def456 not found" } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "example": { "statusCode": 500, "message": "Internal server error" } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get framework editor task template by ID", "tags": [ "Framework Editor Task Templates" ] }, "patch": { "description": "Update a framework editor task template by ID", "operationId": "TaskTemplateController_updateTaskTemplate_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Framework editor task template ID", "schema": { "example": "frk_tt_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "description": "Update framework editor task template data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTaskTemplateDto" } } } }, "responses": { "200": { "description": "Successfully updated framework editor task template", "content": { "application/json": { "schema": { "example": { "id": "frk_tt_abc123def456", "name": "Monthly Security Review (Updated)", "description": "Review and update security policies on a monthly basis", "frequency": "monthly", "department": "it", "createdAt": "2025-01-01T00:00:00.000Z", "updatedAt": "2025-01-02T00:00:00.000Z", "authType": "session", "authenticatedUser": { "id": "user_123", "email": "user@example.com" } } } } } }, "400": { "description": "Bad request - Invalid data provided", "content": { "application/json": { "schema": { "example": { "statusCode": 400, "message": "Validation failed" } } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "example": { "statusCode": 401, "message": "Unauthorized" } } } } }, "404": { "description": "Framework editor task template not found", "content": { "application/json": { "schema": { "example": { "statusCode": 404, "message": "Framework editor task template with ID frk_tt_abc123def456 not found" } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "example": { "statusCode": 500, "message": "Internal server error" } } } } } }, "security": [ { "apikey": [] } ], "summary": "Update framework editor task template", "tags": [ "Framework Editor Task Templates" ] }, "delete": { "description": "Delete a framework editor task template by ID", "operationId": "TaskTemplateController_deleteTaskTemplate_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Framework editor task template ID", "schema": { "example": "frk_tt_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Successfully deleted framework editor task template", "content": { "application/json": { "schema": { "example": { "message": "Framework editor task template deleted successfully", "deletedTaskTemplate": { "id": "frk_tt_abc123def456", "name": "Monthly Security Review" }, "authType": "session", "authenticatedUser": { "id": "user_123", "email": "user@example.com" } } } } } }, "401": { "description": "Unauthorized - Invalid or missing authentication", "content": { "application/json": { "schema": { "example": { "statusCode": 401, "message": "Unauthorized" } } } } }, "404": { "description": "Framework editor task template not found", "content": { "application/json": { "schema": { "example": { "statusCode": 404, "message": "Framework editor task template with ID frk_tt_abc123def456 not found" } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "example": { "statusCode": 500, "message": "Internal server error" } } } } } }, "security": [ { "apikey": [] } ], "summary": "Delete framework editor task template", "tags": [ "Framework Editor Task Templates" ] } }, "/v1/finding-template": { "get": { "description": "Retrieve all finding templates ordered by category and order", "operationId": "FindingTemplateController_getAllFindingTemplates_v1", "parameters": [], "responses": { "200": { "description": "List of all finding templates" }, "401": { "description": "Unauthorized" } }, "summary": "Get all finding templates", "tags": [ "Finding Templates" ] }, "post": { "description": "Create a new finding template (Platform Admin only)", "operationId": "FindingTemplateController_createFindingTemplate_v1", "parameters": [], "requestBody": { "required": true, "description": "Finding template data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateFindingTemplateDto" } } } }, "responses": { "201": { "description": "The created finding template" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - Platform admin required" } }, "summary": "Create a finding template", "tags": [ "Finding Templates" ] } }, "/v1/finding-template/{id}": { "get": { "description": "Retrieve a specific finding template by its ID", "operationId": "FindingTemplateController_getFindingTemplateById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Finding template ID", "schema": { "example": "fnd_t_abc123", "type": "string" } } ], "responses": { "200": { "description": "The finding template" }, "401": { "description": "Unauthorized" }, "404": { "description": "Finding template not found" } }, "summary": "Get finding template by ID", "tags": [ "Finding Templates" ] }, "patch": { "description": "Update an existing finding template (Platform Admin only)", "operationId": "FindingTemplateController_updateFindingTemplate_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Finding template ID", "schema": { "example": "fnd_t_abc123", "type": "string" } } ], "requestBody": { "required": true, "description": "Finding template update data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateFindingTemplateDto" } } } }, "responses": { "200": { "description": "The updated finding template" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - Platform admin required" }, "404": { "description": "Finding template not found" } }, "summary": "Update a finding template", "tags": [ "Finding Templates" ] }, "delete": { "description": "Delete a finding template (Platform Admin only)", "operationId": "FindingTemplateController_deleteFindingTemplate_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Finding template ID", "schema": { "example": "fnd_t_abc123", "type": "string" } } ], "responses": { "200": { "description": "Finding template deleted successfully" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - Platform admin required" }, "404": { "description": "Finding template not found" } }, "summary": "Delete a finding template", "tags": [ "Finding Templates" ] } }, "/v1/findings": { "get": { "description": "Retrieve all findings for a specific task", "operationId": "FindingsController_getFindingsByTask_v1", "parameters": [ { "name": "taskId", "required": false, "in": "query", "description": "Task ID to get findings for", "schema": { "example": "tsk_abc123", "type": "string" } }, { "name": "evidenceSubmissionId", "required": false, "in": "query", "description": "Evidence submission ID to get findings for", "schema": { "example": "evs_abc123", "type": "string" } }, { "name": "evidenceFormType", "required": false, "in": "query", "description": "Evidence form type to get findings for", "schema": { "enum": [ "board-meeting", "it-leadership-meeting", "risk-committee-meeting", "meeting", "access-request", "whistleblower-report", "penetration-test", "rbac-matrix", "infrastructure-inventory", "employee-performance-evaluation", "network-diagram", "tabletop-exercise" ], "type": "string" } } ], "responses": { "200": { "description": "List of findings" }, "401": { "description": "Unauthorized" }, "404": { "description": "Target not found" } }, "security": [ { "apikey": [] } ], "summary": "Get findings for a task", "tags": [ "Findings" ] }, "post": { "description": "Create a new finding for a task (Auditor or Platform Admin only)", "operationId": "FindingsController_createFinding_v1", "parameters": [], "requestBody": { "required": true, "description": "Finding data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateFindingDto" } } } }, "responses": { "201": { "description": "The created finding" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - Auditor or Platform Admin required" }, "404": { "description": "Task not found" } }, "security": [ { "apikey": [] } ], "summary": "Create a finding", "tags": [ "Findings" ] } }, "/v1/findings/organization": { "get": { "description": "Retrieve all findings for the organization", "operationId": "FindingsController_getOrganizationFindings_v1", "parameters": [ { "name": "status", "required": false, "in": "query", "description": "Filter by status", "schema": { "enum": [ "open", "ready_for_review", "needs_revision", "closed" ], "type": "string" } } ], "responses": { "200": { "description": "List of all findings for the organization" }, "400": { "description": "Invalid status value" }, "401": { "description": "Unauthorized" } }, "security": [ { "apikey": [] } ], "summary": "Get all findings for organization", "tags": [ "Findings" ] } }, "/v1/findings/{id}": { "get": { "description": "Retrieve a specific finding by its ID", "operationId": "FindingsController_getFindingById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Finding ID", "schema": { "example": "fnd_abc123", "type": "string" } } ], "responses": { "200": { "description": "The finding" }, "401": { "description": "Unauthorized" }, "404": { "description": "Finding not found" } }, "security": [ { "apikey": [] } ], "summary": "Get finding by ID", "tags": [ "Findings" ] }, "patch": { "description": "Update a finding. Status transition rules apply based on user role.", "operationId": "FindingsController_updateFinding_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Finding ID", "schema": { "example": "fnd_abc123", "type": "string" } } ], "requestBody": { "required": true, "description": "Finding update data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateFindingDto" } } } }, "responses": { "200": { "description": "The updated finding" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - Insufficient permissions for status transition" }, "404": { "description": "Finding not found" } }, "security": [ { "apikey": [] } ], "summary": "Update a finding", "tags": [ "Findings" ] }, "delete": { "description": "Delete a finding (Auditor or Platform Admin only)", "operationId": "FindingsController_deleteFinding_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Finding ID", "schema": { "example": "fnd_abc123", "type": "string" } } ], "responses": { "200": { "description": "Finding deleted successfully" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - Auditor or Platform Admin required" }, "404": { "description": "Finding not found" } }, "security": [ { "apikey": [] } ], "summary": "Delete a finding", "tags": [ "Findings" ] } }, "/v1/findings/{id}/history": { "get": { "description": "Retrieve the activity history for a specific finding", "operationId": "FindingsController_getFindingHistory_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Finding ID", "schema": { "example": "fnd_abc123", "type": "string" } } ], "responses": { "200": { "description": "List of audit log entries for the finding" }, "401": { "description": "Unauthorized" }, "404": { "description": "Finding not found" } }, "security": [ { "apikey": [] } ], "summary": "Get finding history", "tags": [ "Findings" ] } }, "/v1/questionnaire": { "get": { "operationId": "QuestionnaireController_findAll_v1", "parameters": [], "responses": { "200": { "description": "List of questionnaires" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/{id}": { "get": { "operationId": "QuestionnaireController_findById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Questionnaire details" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] }, "delete": { "operationId": "QuestionnaireController_deleteById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Questionnaire deleted" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/parse": { "post": { "operationId": "QuestionnaireController_parseQuestionnaire_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ParseQuestionnaireDto" } } } }, "responses": { "200": { "description": "Parsed questionnaire content", "content": { "application/json": { "schema": { "type": "object" } } } } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/answer-single": { "post": { "operationId": "QuestionnaireController_answerSingleQuestion_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AnswerSingleQuestionDto" } } } }, "responses": { "200": { "description": "Generated single answer result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object", "properties": { "questionIndex": { "type": "number" }, "question": { "type": "string" }, "answer": { "type": "string", "nullable": true }, "sources": { "type": "array", "items": { "type": "object" } }, "error": { "type": "string", "nullable": true } } } } } } } } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/save-answer": { "post": { "operationId": "QuestionnaireController_saveAnswer_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveAnswerDto" } } } }, "responses": { "200": { "description": "Save manual or generated answer", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string", "nullable": true } } } } } } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/delete-answer": { "post": { "operationId": "QuestionnaireController_deleteAnswer_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAnswerDto" } } } }, "responses": { "200": { "description": "Delete questionnaire answer", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string", "nullable": true } } } } } } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/export": { "post": { "operationId": "QuestionnaireController_exportById_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportByIdDto" } } } }, "responses": { "200": { "description": "Export questionnaire by ID to specified format" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/upload-and-parse": { "post": { "operationId": "QuestionnaireController_uploadAndParse_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadAndParseDto" } } } }, "responses": { "200": { "description": "Upload file, parse questions (no answers), save to DB, return questionnaireId", "content": { "application/json": { "schema": { "type": "object", "properties": { "questionnaireId": { "type": "string" }, "totalQuestions": { "type": "number" } } } } } } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/upload-and-parse/upload": { "post": { "operationId": "QuestionnaireController_uploadAndParseUpload_v1", "parameters": [], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "Questionnaire file (PDF, image, XLSX, CSV, TXT)" }, "organizationId": { "type": "string", "description": "Organization ID" }, "source": { "type": "string", "enum": [ "internal", "external" ], "default": "internal", "description": "Source of the upload" } }, "required": [ "file", "organizationId" ] } } } }, "responses": { "200": { "description": "Upload file, parse questions (no answers), save to DB, return questionnaireId", "content": { "application/json": { "schema": { "type": "object", "properties": { "questionnaireId": { "type": "string" }, "totalQuestions": { "type": "number" } } } } } } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/parse/upload": { "post": { "operationId": "QuestionnaireController_parseQuestionnaireUpload_v1", "parameters": [], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "Questionnaire file (PDF, image, XLSX, CSV, TXT)" }, "organizationId": { "type": "string", "description": "Organization to use for generating answers" }, "format": { "type": "string", "enum": [ "pdf", "csv", "xlsx" ], "default": "xlsx", "description": "Output format (defaults to XLSX)" }, "source": { "type": "string", "enum": [ "internal", "external" ], "default": "internal", "description": "Indicates if the request originated from our UI (internal) or trust portal (external)." } }, "required": [ "file", "organizationId" ] } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/parse/upload/token": { "post": { "operationId": "QuestionnaireController_parseQuestionnaireUploadByToken_v1", "parameters": [ { "name": "token", "required": true, "in": "query", "description": "Trust access token for authentication", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "Questionnaire file (PDF, image, XLSX, CSV, TXT)" }, "format": { "type": "string", "enum": [ "pdf", "csv", "xlsx" ], "default": "xlsx", "description": "Output format (ignored - always exports all formats as ZIP)" } }, "required": [ "file" ] } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/answers/export": { "post": { "operationId": "QuestionnaireController_autoAnswerAndExport_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExportQuestionnaireDto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/answers/export/upload": { "post": { "operationId": "QuestionnaireController_autoAnswerAndExportUpload_v1", "parameters": [], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "Questionnaire file (PDF, image, XLSX, CSV, TXT)" }, "organizationId": { "type": "string", "description": "Organization to use for answer generation" }, "format": { "type": "string", "enum": [ "pdf", "csv", "xlsx" ], "default": "xlsx", "description": "Output format (defaults to XLSX)" } }, "required": [ "file", "organizationId" ] } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/questionnaire/auto-answer": { "post": { "operationId": "QuestionnaireController_autoAnswer_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoAnswerDto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Questionnaire" ] } }, "/v1/knowledge-base/documents": { "get": { "operationId": "KnowledgeBaseController_listDocuments_v1", "parameters": [], "responses": { "200": { "description": "List of knowledge base documents" } }, "security": [ { "apikey": [] } ], "summary": "List all knowledge base documents for an organization", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/manual-answers": { "get": { "operationId": "KnowledgeBaseController_listManualAnswers_v1", "parameters": [], "responses": { "200": { "description": "List of manual answers" } }, "security": [ { "apikey": [] } ], "summary": "List all manual answers for an organization", "tags": [ "Knowledge Base" ] }, "post": { "operationId": "KnowledgeBaseController_saveManualAnswer_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveManualAnswerDto" } } } }, "responses": { "200": { "description": "Manual answer saved" } }, "security": [ { "apikey": [] } ], "summary": "Save or update a manual answer", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/documents/upload": { "post": { "operationId": "KnowledgeBaseController_uploadDocument_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadDocumentDto" } } } }, "responses": { "200": { "description": "Document uploaded successfully" } }, "security": [ { "apikey": [] } ], "summary": "Upload a knowledge base document", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/documents/{documentId}/download": { "post": { "operationId": "KnowledgeBaseController_getDownloadUrl_v1", "parameters": [ { "name": "documentId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Signed download URL generated" } }, "security": [ { "apikey": [] } ], "summary": "Get a signed download URL for a document", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/documents/{documentId}/view": { "post": { "operationId": "KnowledgeBaseController_getViewUrl_v1", "parameters": [ { "name": "documentId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Signed view URL generated" } }, "security": [ { "apikey": [] } ], "summary": "Get a signed view URL for a document", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/documents/{documentId}/delete": { "post": { "operationId": "KnowledgeBaseController_deleteDocument_v1", "parameters": [ { "name": "documentId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Document deleted successfully" } }, "security": [ { "apikey": [] } ], "summary": "Delete a knowledge base document", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/documents/process": { "post": { "operationId": "KnowledgeBaseController_processDocuments_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProcessDocumentsDto" } } } }, "responses": { "200": { "description": "Document processing triggered" } }, "security": [ { "apikey": [] } ], "summary": "Trigger processing of knowledge base documents", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/runs/{runId}/token": { "post": { "operationId": "KnowledgeBaseController_createRunToken_v1", "parameters": [ { "name": "runId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Public access token created" } }, "security": [ { "apikey": [] } ], "summary": "Create a public access token for a run", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/manual-answers/{manualAnswerId}/delete": { "post": { "operationId": "KnowledgeBaseController_deleteManualAnswer_v1", "parameters": [ { "name": "manualAnswerId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteManualAnswerDto" } } } }, "responses": { "200": { "description": "Manual answer deleted" } }, "security": [ { "apikey": [] } ], "summary": "Delete a manual answer", "tags": [ "Knowledge Base" ] } }, "/v1/knowledge-base/manual-answers/delete-all": { "post": { "operationId": "KnowledgeBaseController_deleteAllManualAnswers_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAllManualAnswersDto" } } } }, "responses": { "200": { "description": "All manual answers deleted" } }, "security": [ { "apikey": [] } ], "summary": "Delete all manual answers for an organization", "tags": [ "Knowledge Base" ] } }, "/v1/soa/save-answer": { "post": { "operationId": "SOAController_saveAnswer_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveSOAAnswerDto" } } } }, "responses": { "200": { "description": "Answer saved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Save a SOA answer", "tags": [ "SOA" ] } }, "/v1/soa/auto-fill": { "post": { "description": "Streams SOA answers via Server-Sent Events (SSE)", "operationId": "SOAController_autoFill_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoFillSOADto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Auto-fill SOA document", "tags": [ "SOA" ] } }, "/v1/soa/create-document": { "post": { "operationId": "SOAController_createDocument_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSOADocumentDto" } } } }, "responses": { "200": { "description": "Document created successfully" } }, "security": [ { "apikey": [] } ], "summary": "Create a new SOA document", "tags": [ "SOA" ] } }, "/v1/soa/ensure-setup": { "post": { "operationId": "SOAController_ensureSetup_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnsureSOASetupDto" } } } }, "responses": { "200": { "description": "Setup ensured" } }, "security": [ { "apikey": [] } ], "summary": "Ensure SOA configuration and document exist", "tags": [ "SOA" ] } }, "/v1/soa/approve": { "post": { "operationId": "SOAController_approveDocument_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveSOADocumentDto" } } } }, "responses": { "200": { "description": "Document approved successfully" } }, "security": [ { "apikey": [] } ], "summary": "Approve a SOA document", "tags": [ "SOA" ] } }, "/v1/soa/decline": { "post": { "operationId": "SOAController_declineDocument_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclineSOADocumentDto" } } } }, "responses": { "200": { "description": "Document declined successfully" } }, "security": [ { "apikey": [] } ], "summary": "Decline a SOA document", "tags": [ "SOA" ] } }, "/v1/soa/submit-for-approval": { "post": { "operationId": "SOAController_submitForApproval_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitSOAForApprovalDto" } } } }, "responses": { "200": { "description": "Document submitted for approval successfully" } }, "security": [ { "apikey": [] } ], "summary": "Submit SOA document for approval", "tags": [ "SOA" ] } }, "/v1/integrations/oauth/availability": { "get": { "operationId": "OAuthController_checkAvailability_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/oauth/start": { "post": { "operationId": "OAuthController_startOAuth_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/oauth/callback": { "get": { "operationId": "OAuthController_oauthCallback_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/oauth-apps": { "get": { "operationId": "OAuthAppsController_listOAuthApps_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] }, "post": { "operationId": "OAuthAppsController_saveOAuthApp_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/oauth-apps/setup/{providerSlug}": { "get": { "operationId": "OAuthAppsController_getSetupInfo_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/oauth-apps/{providerSlug}": { "delete": { "operationId": "OAuthAppsController_deleteOAuthApp_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/providers": { "get": { "operationId": "ConnectionsController_listProviders_v1", "parameters": [ { "name": "activeOnly", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/providers/{slug}": { "get": { "operationId": "ConnectionsController_getProvider_v1", "parameters": [ { "name": "slug", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections": { "get": { "operationId": "ConnectionsController_listConnections_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] }, "post": { "operationId": "ConnectionsController_createConnection_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/{id}": { "get": { "operationId": "ConnectionsController_getConnection_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] }, "delete": { "operationId": "ConnectionsController_deleteConnection_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] }, "patch": { "operationId": "ConnectionsController_updateConnection_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/{id}/test": { "post": { "operationId": "ConnectionsController_testConnection_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/{id}/pause": { "post": { "operationId": "ConnectionsController_pauseConnection_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/{id}/resume": { "post": { "operationId": "ConnectionsController_resumeConnection_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/{id}/disconnect": { "post": { "operationId": "ConnectionsController_disconnectConnection_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/{id}/ensure-valid-credentials": { "post": { "operationId": "ConnectionsController_ensureValidCredentials_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/connections/{id}/credentials": { "put": { "operationId": "ConnectionsController_updateCredentials_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/admin/integrations": { "get": { "operationId": "AdminIntegrationsController_listIntegrations_v1", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "AdminIntegrations" ] } }, "/v1/admin/integrations/{providerSlug}": { "get": { "operationId": "AdminIntegrationsController_getIntegration_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "AdminIntegrations" ] } }, "/v1/admin/integrations/credentials": { "post": { "operationId": "AdminIntegrationsController_savePlatformCredentials_v1", "parameters": [], "responses": { "201": { "description": "" } }, "tags": [ "AdminIntegrations" ] } }, "/v1/admin/integrations/credentials/{providerSlug}": { "delete": { "operationId": "AdminIntegrationsController_deletePlatformCredentials_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "AdminIntegrations" ] } }, "/v1/internal/dynamic-integrations": { "put": { "operationId": "DynamicIntegrationsController_upsert_v1", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "DynamicIntegrations" ] }, "post": { "operationId": "DynamicIntegrationsController_create_v1", "parameters": [], "responses": { "201": { "description": "" } }, "tags": [ "DynamicIntegrations" ] }, "get": { "operationId": "DynamicIntegrationsController_list_v1", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "DynamicIntegrations" ] } }, "/v1/internal/dynamic-integrations/{id}": { "get": { "operationId": "DynamicIntegrationsController_getById_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "DynamicIntegrations" ] }, "patch": { "operationId": "DynamicIntegrationsController_update_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "DynamicIntegrations" ] }, "delete": { "operationId": "DynamicIntegrationsController_remove_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "DynamicIntegrations" ] } }, "/v1/internal/dynamic-integrations/{id}/checks": { "post": { "operationId": "DynamicIntegrationsController_addCheck_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "tags": [ "DynamicIntegrations" ] } }, "/v1/internal/dynamic-integrations/{id}/checks/{checkId}": { "patch": { "operationId": "DynamicIntegrationsController_updateCheck_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "checkId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "DynamicIntegrations" ] }, "delete": { "operationId": "DynamicIntegrationsController_removeCheck_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "checkId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "DynamicIntegrations" ] } }, "/v1/internal/dynamic-integrations/{id}/activate": { "post": { "operationId": "DynamicIntegrationsController_activate_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "tags": [ "DynamicIntegrations" ] } }, "/v1/internal/dynamic-integrations/{id}/deactivate": { "post": { "operationId": "DynamicIntegrationsController_deactivate_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "tags": [ "DynamicIntegrations" ] } }, "/v1/integrations/checks/providers/{providerSlug}": { "get": { "operationId": "ChecksController_listProviderChecks_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/checks/connections/{connectionId}": { "get": { "operationId": "ChecksController_listConnectionChecks_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/checks/connections/{connectionId}/run": { "post": { "operationId": "ChecksController_runConnectionChecks_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/checks/connections/{connectionId}/run/{checkId}": { "post": { "operationId": "ChecksController_runSingleCheck_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "checkId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/variables/providers/{providerSlug}": { "get": { "operationId": "VariablesController_getProviderVariables_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/variables/connections/{connectionId}": { "get": { "operationId": "VariablesController_getConnectionVariables_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] }, "post": { "operationId": "VariablesController_saveConnectionVariables_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/variables/connections/{connectionId}/options/{variableId}": { "get": { "operationId": "VariablesController_fetchVariableOptions_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "variableId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/tasks/template/{templateId}/checks": { "get": { "operationId": "TaskIntegrationsController_getChecksForTaskTemplate_v1", "parameters": [ { "name": "templateId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/tasks/{taskId}/checks": { "get": { "operationId": "TaskIntegrationsController_getChecksForTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/tasks/{taskId}/run-check": { "post": { "operationId": "TaskIntegrationsController_runCheckForTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/tasks/{taskId}/runs": { "get": { "operationId": "TaskIntegrationsController_getTaskCheckRuns_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "limit", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/webhooks/{providerSlug}/{connectionId}": { "post": { "operationId": "WebhookController_handleWebhook_v1", "parameters": [ { "name": "providerSlug", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "tags": [ "Webhook" ] } }, "/v1/integrations/sync/google-workspace/employees": { "post": { "operationId": "SyncController_syncGoogleWorkspaceEmployees_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/google-workspace/status": { "post": { "operationId": "SyncController_getGoogleWorkspaceStatus_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/rippling/employees": { "post": { "operationId": "SyncController_syncRipplingEmployees_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/rippling/status": { "post": { "operationId": "SyncController_getRipplingStatus_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/ramp/employees": { "post": { "operationId": "SyncController_syncRampEmployees_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/jumpcloud/employees": { "post": { "operationId": "SyncController_syncJumpCloudEmployees_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/jumpcloud/status": { "post": { "operationId": "SyncController_getJumpCloudStatus_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/ramp/status": { "post": { "operationId": "SyncController_getRampStatus_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/integrations/sync/employee-sync-provider": { "get": { "operationId": "SyncController_getEmployeeSyncProvider_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] }, "post": { "operationId": "SyncController_setEmployeeSyncProvider_v1", "parameters": [], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "tags": [ "Integrations" ] } }, "/v1/cloud-security/providers": { "get": { "operationId": "CloudSecurityController_getProviders_v1", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/cloud-security/findings": { "get": { "operationId": "CloudSecurityController_getFindings_v1", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/cloud-security/scan/{connectionId}": { "post": { "operationId": "CloudSecurityController_scan_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/cloud-security/trigger/{connectionId}": { "post": { "operationId": "CloudSecurityController_triggerScan_v1", "parameters": [ { "name": "connectionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/cloud-security/runs/{runId}": { "get": { "operationId": "CloudSecurityController_getRunStatus_v1", "parameters": [ { "name": "runId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "connectionId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/cloud-security/legacy/connect": { "post": { "operationId": "CloudSecurityController_connectLegacy_v1", "parameters": [], "responses": { "201": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/cloud-security/legacy/validate-aws": { "post": { "operationId": "CloudSecurityController_validateAwsCredentials_v1", "parameters": [], "responses": { "201": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/cloud-security/legacy/{integrationId}": { "delete": { "operationId": "CloudSecurityController_disconnectLegacy_v1", "parameters": [ { "name": "integrationId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "CloudSecurity" ] } }, "/v1/browserbase/org-context": { "post": { "description": "Gets the existing browser context for the org or creates a new one", "operationId": "BrowserbaseController_getOrCreateOrgContext_v1", "parameters": [], "responses": { "201": { "description": "Context retrieved or created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContextResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Get or create organization browser context", "tags": [ "Browserbase" ] }, "get": { "description": "Gets the current browser context for the org if it exists", "operationId": "BrowserbaseController_getOrgContextStatus_v1", "parameters": [], "responses": { "200": { "description": "Context status" } }, "security": [ { "apikey": [] } ], "summary": "Get organization browser context status", "tags": [ "Browserbase" ] } }, "/v1/browserbase/session": { "post": { "description": "Creates a new browser session using the org context", "operationId": "BrowserbaseController_createSession_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSessionDto" } } } }, "responses": { "201": { "description": "Session created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new browser session", "tags": [ "Browserbase" ] } }, "/v1/browserbase/session/close": { "post": { "operationId": "BrowserbaseController_closeSession_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CloseSessionDto" } } } }, "responses": { "200": { "description": "Session closed" } }, "security": [ { "apikey": [] } ], "summary": "Close a browser session", "tags": [ "Browserbase" ] } }, "/v1/browserbase/navigate": { "post": { "description": "Navigates the browser session to the specified URL", "operationId": "BrowserbaseController_navigateToUrl_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NavigateToUrlDto" } } } }, "responses": { "200": { "description": "Navigation result" } }, "security": [ { "apikey": [] } ], "summary": "Navigate to a URL", "tags": [ "Browserbase" ] } }, "/v1/browserbase/check-auth": { "post": { "description": "Checks if the user is logged in on the specified site", "operationId": "BrowserbaseController_checkAuth_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckAuthDto" } } } }, "responses": { "200": { "description": "Auth status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthStatusResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Check authentication status", "tags": [ "Browserbase" ] } }, "/v1/browserbase/automations": { "post": { "operationId": "BrowserbaseController_createAutomation_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBrowserAutomationDto" } } } }, "responses": { "201": { "description": "Automation created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserAutomationResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a browser automation", "tags": [ "Browserbase" ] } }, "/v1/browserbase/automations/task/{taskId}": { "get": { "operationId": "BrowserbaseController_getAutomationsForTask_v1", "parameters": [ { "name": "taskId", "required": true, "in": "path", "description": "Task ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of automations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BrowserAutomationResponseDto" } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get all browser automations for a task", "tags": [ "Browserbase" ] } }, "/v1/browserbase/automations/{automationId}": { "get": { "operationId": "BrowserbaseController_getAutomation_v1", "parameters": [ { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Automation details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserAutomationResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Get a browser automation by ID", "tags": [ "Browserbase" ] }, "patch": { "operationId": "BrowserbaseController_updateAutomation_v1", "parameters": [ { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBrowserAutomationDto" } } } }, "responses": { "200": { "description": "Automation updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserAutomationResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Update a browser automation", "tags": [ "Browserbase" ] }, "delete": { "operationId": "BrowserbaseController_deleteAutomation_v1", "parameters": [ { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Automation deleted" } }, "security": [ { "apikey": [] } ], "summary": "Delete a browser automation", "tags": [ "Browserbase" ] } }, "/v1/browserbase/automations/{automationId}/start-live": { "post": { "description": "Creates a session and returns live view URL for watching execution", "operationId": "BrowserbaseController_startAutomationLive_v1", "parameters": [ { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Session started with live view URL" } }, "security": [ { "apikey": [] } ], "summary": "Start automation with live view", "tags": [ "Browserbase" ] } }, "/v1/browserbase/automations/{automationId}/execute": { "post": { "description": "Runs the automation on a pre-created session", "operationId": "BrowserbaseController_executeAutomationOnSession_v1", "parameters": [ { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Execution result" } }, "security": [ { "apikey": [] } ], "summary": "Execute automation on existing session", "tags": [ "Browserbase" ] } }, "/v1/browserbase/automations/{automationId}/run": { "post": { "description": "Executes the automation and returns the result", "operationId": "BrowserbaseController_runAutomation_v1", "parameters": [ { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Run result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunAutomationResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Run a browser automation", "tags": [ "Browserbase" ] } }, "/v1/browserbase/automations/{automationId}/runs": { "get": { "operationId": "BrowserbaseController_getAutomationRuns_v1", "parameters": [ { "name": "automationId", "required": true, "in": "path", "description": "Automation ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "List of runs", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BrowserAutomationRunResponseDto" } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get run history for an automation", "tags": [ "Browserbase" ] } }, "/v1/browserbase/runs/{runId}": { "get": { "operationId": "BrowserbaseController_getRunById_v1", "parameters": [ { "name": "runId", "required": true, "in": "path", "description": "Run ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Run details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserAutomationRunResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Get a specific run by ID", "tags": [ "Browserbase" ] } }, "/v1/task-management/stats": { "get": { "description": "Retrieve task items statistics (total count, counts by status) for a specific entity", "operationId": "TaskManagementController_getTaskItemsStats_v1", "parameters": [ { "name": "entityId", "required": true, "in": "query", "description": "ID of the entity to get task items stats for", "schema": { "example": "vnd_abc123def456", "type": "string" } }, { "name": "entityType", "required": true, "in": "query", "description": "Type of entity", "schema": { "enum": [ "vendor", "risk" ], "type": "string" } } ], "responses": { "200": { "description": "Task items statistics retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "total": { "type": "number" }, "byStatus": { "type": "object", "properties": { "todo": { "type": "number" }, "in_progress": { "type": "number" }, "in_review": { "type": "number" }, "done": { "type": "number" }, "canceled": { "type": "number" } } } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get task items statistics for an entity", "tags": [ "Task Management" ] } }, "/v1/task-management": { "get": { "description": "Retrieve paginated task items for a specific entity (vendor, risk)", "operationId": "TaskManagementController_getTaskItems_v1", "parameters": [ { "name": "entityId", "required": true, "in": "query", "description": "ID of the entity to get task items for", "schema": { "example": "vnd_abc123def456", "type": "string" } }, { "name": "entityType", "required": true, "in": "query", "description": "Type of entity", "schema": { "example": "vendor", "type": "string", "enum": [ "vendor", "risk" ] } }, { "name": "page", "required": false, "in": "query", "description": "Page number (1-indexed)", "schema": { "minimum": 1, "default": 1, "example": 1, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "description": "Number of items per page", "schema": { "minimum": 1, "maximum": 100, "default": 5, "example": 5, "type": "number" } }, { "name": "status", "required": false, "in": "query", "description": "Filter by status", "schema": { "example": "todo", "type": "string", "enum": [ "todo", "in_progress", "in_review", "done", "canceled" ] } }, { "name": "priority", "required": false, "in": "query", "description": "Filter by priority", "schema": { "example": "high", "type": "string", "enum": [ "urgent", "high", "medium", "low" ] } }, { "name": "assigneeId", "required": false, "in": "query", "description": "Filter by assignee ID", "schema": { "example": "mbr_abc123def456", "type": "string" } }, { "name": "sortBy", "required": false, "in": "query", "description": "Sort by field", "schema": { "default": "createdAt", "example": "createdAt", "type": "string", "enum": [ "createdAt", "updatedAt", "title", "status", "priority" ] } }, { "name": "sortOrder", "required": false, "in": "query", "description": "Sort order", "schema": { "default": "desc", "example": "desc", "type": "string", "enum": [ "asc", "desc" ] } } ], "responses": { "200": { "description": "Task items retrieved successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTaskItemResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Get task items for an entity", "tags": [ "Task Management" ] }, "post": { "description": "Create a task item for an entity", "operationId": "TaskManagementController_createTaskItem_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTaskItemDto" } } } }, "responses": { "201": { "description": "Task item created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskItemResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Create a new task item", "tags": [ "Task Management" ] } }, "/v1/task-management/{id}": { "put": { "description": "Update an existing task item", "operationId": "TaskManagementController_updateTaskItem_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Task item ID", "schema": { "example": "tski_abc123def456", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTaskItemDto" } } } }, "responses": { "200": { "description": "Task item updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TaskItemResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Update a task item", "tags": [ "Task Management" ] }, "delete": { "description": "Delete an existing task item", "operationId": "TaskManagementController_deleteTaskItem_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Task item ID", "schema": { "example": "tski_abc123def456", "type": "string" } } ], "responses": { "204": { "description": "Task item deleted successfully" } }, "security": [ { "apikey": [] } ], "summary": "Delete a task item", "tags": [ "Task Management" ] } }, "/v1/task-management/attachments": { "post": { "description": "Upload a file attachment for a task item with proper S3 path structure: org_{orgId}/attachments/task-item/{entityType}/{entityId}/files", "operationId": "TaskManagementController_uploadTaskItemAttachment_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadTaskItemAttachmentDto" } } } }, "responses": { "201": { "description": "Attachment uploaded successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachmentResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Upload attachment to task item", "tags": [ "Task Management" ] } }, "/v1/task-management/attachments/{attachmentId}": { "delete": { "description": "Delete a file attachment for a task item (removes from S3 and database)", "operationId": "TaskManagementController_deleteTaskItemAttachment_v1", "parameters": [ { "name": "attachmentId", "required": true, "in": "path", "description": "Attachment ID", "schema": { "example": "att_abc123def456", "type": "string" } } ], "responses": { "204": { "description": "Attachment deleted successfully" } }, "security": [ { "apikey": [] } ], "summary": "Delete attachment from task item", "tags": [ "Task Management" ] } }, "/v1/task-management/{id}/activity": { "get": { "description": "Retrieve all activity/audit logs for a specific task item", "operationId": "TaskManagementController_getTaskItemActivity_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Task item ID", "schema": { "example": "tski_abc123def456", "type": "string" } } ], "responses": { "200": { "description": "Activity logs retrieved successfully" } }, "security": [ { "apikey": [] } ], "summary": "Get task item activity log", "tags": [ "Task Management" ] } }, "/v1/assistant-chat/completions": { "post": { "description": "Streams an AI response based on the conversation messages. Tools are permission-gated per user.", "operationId": "AssistantChatController_completions_v1", "parameters": [], "responses": { "200": { "description": "Streaming AI response" } }, "security": [ { "apikey": [] } ], "summary": "Stream AI chat completion", "tags": [ "Assistant Chat" ] } }, "/v1/assistant-chat/history": { "get": { "description": "Returns the current user-scoped assistant chat history (ephemeral session context).", "operationId": "AssistantChatController_getHistory_v1", "parameters": [], "responses": { "200": { "description": "Chat history retrieved", "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object" } } } } } } } }, "security": [ { "apikey": [] } ], "summary": "Get assistant chat history", "tags": [ "Assistant Chat" ] }, "put": { "description": "Replaces the current user-scoped assistant chat history (ephemeral session context).", "operationId": "AssistantChatController_saveHistory_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveAssistantChatHistoryDto" } } } }, "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Save assistant chat history", "tags": [ "Assistant Chat" ] }, "delete": { "description": "Deletes the current user-scoped assistant chat history.", "operationId": "AssistantChatController_clearHistory_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Clear assistant chat history", "tags": [ "Assistant Chat" ] } }, "/v1/roles": { "post": { "description": "Create a new custom role with specified permissions. Only admins and owners can create roles.", "operationId": "RolesController_createRole_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRoleDto" } } } }, "responses": { "201": { "description": "Role created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "rol_abc123" }, "name": { "type": "string", "example": "compliance-lead" }, "permissions": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "isBuiltIn": { "type": "boolean", "example": false }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } }, "400": { "description": "Invalid role data or role already exists" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - cannot grant permissions you do not have" } }, "security": [ { "apikey": [] } ], "summary": "Create a custom role", "tags": [ "Roles" ] }, "get": { "description": "List all roles for the organization, including built-in and custom roles.", "operationId": "RolesController_listRoles_v1", "parameters": [], "responses": { "200": { "description": "List of roles", "content": { "application/json": { "schema": { "type": "object", "properties": { "builtInRoles": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "isBuiltIn": { "type": "boolean" }, "description": { "type": "string" } } } }, "customRoles": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "permissions": { "type": "object" }, "isBuiltIn": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } } } } }, "401": { "description": "Unauthorized" } }, "security": [ { "apikey": [] } ], "summary": "List all roles", "tags": [ "Roles" ] } }, "/v1/roles/permissions": { "get": { "description": "Returns the merged permissions for the given custom role names. Used by the frontend to resolve effective permissions for users with custom roles.", "operationId": "RolesController_getPermissionsForRoles_v1", "parameters": [ { "name": "roles", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Merged permissions for the requested roles", "content": { "application/json": { "schema": { "type": "object", "properties": { "permissions": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } } } } } } }, "401": { "description": "Unauthorized" } }, "security": [ { "apikey": [] } ], "summary": "Resolve permissions for custom roles", "tags": [ "Roles" ] } }, "/v1/roles/{roleId}": { "get": { "description": "Get details of a specific custom role.", "operationId": "RolesController_getRole_v1", "parameters": [ { "name": "roleId", "required": true, "in": "path", "description": "Role ID", "schema": { "example": "rol_abc123", "type": "string" } } ], "responses": { "200": { "description": "Role details", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "permissions": { "type": "object" }, "isBuiltIn": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Role not found" } }, "security": [ { "apikey": [] } ], "summary": "Get a role by ID", "tags": [ "Roles" ] }, "patch": { "description": "Update the name or permissions of a custom role. Cannot modify built-in roles.", "operationId": "RolesController_updateRole_v1", "parameters": [ { "name": "roleId", "required": true, "in": "path", "description": "Role ID", "schema": { "example": "rol_abc123", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRoleDto" } } } }, "responses": { "200": { "description": "Role updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "permissions": { "type": "object" }, "isBuiltIn": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } } } } } }, "400": { "description": "Invalid role data" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden - cannot grant permissions you do not have" }, "404": { "description": "Role not found" } }, "security": [ { "apikey": [] } ], "summary": "Update a custom role", "tags": [ "Roles" ] }, "delete": { "description": "Delete a custom role. Cannot delete if members are still assigned to it.", "operationId": "RolesController_deleteRole_v1", "parameters": [ { "name": "roleId", "required": true, "in": "path", "description": "Role ID", "schema": { "example": "rol_abc123", "type": "string" } } ], "responses": { "200": { "description": "Role deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } } } } } }, "400": { "description": "Cannot delete - members assigned to role" }, "401": { "description": "Unauthorized" }, "404": { "description": "Role not found" } }, "security": [ { "apikey": [] } ], "summary": "Delete a custom role", "tags": [ "Roles" ] } }, "/v1/training/send-completion-email": { "post": { "description": "Checks if the member has completed all training videos. If so, sends an email with the training certificate attached.", "operationId": "TrainingController_sendTrainingCompletionEmail_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendTrainingCompletionDto" } } } }, "responses": { "200": { "description": "Email sent or reason why it was not sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendTrainingCompletionResponseDto" } } } } }, "security": [ { "apikey": [] } ], "summary": "Send training completion email with certificate", "tags": [ "Training" ] } }, "/v1/training/generate-certificate": { "post": { "description": "Generates a PDF certificate for a member who has completed all training videos. Returns the PDF as a downloadable file.", "operationId": "TrainingController_generateCertificate_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendTrainingCompletionDto" } } } }, "responses": { "200": { "description": "PDF certificate file" }, "400": { "description": "Training not complete or member not found" } }, "security": [ { "apikey": [] } ], "summary": "Generate training completion certificate PDF", "tags": [ "Training" ] } }, "/v1/org-chart": { "get": { "operationId": "OrgChartController_getOrgChart_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The organization chart" } }, "security": [ { "apikey": [] } ], "summary": "Get the organization chart", "tags": [ "Org Chart" ] }, "put": { "operationId": "OrgChartController_upsertOrgChart_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "The saved organization chart" } }, "security": [ { "apikey": [] } ], "summary": "Create or update an interactive organization chart", "tags": [ "Org Chart" ] }, "delete": { "operationId": "OrgChartController_deleteOrgChart_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Deletion confirmation" } }, "security": [ { "apikey": [] } ], "summary": "Delete the organization chart", "tags": [ "Org Chart" ] } }, "/v1/org-chart/upload": { "post": { "operationId": "OrgChartController_uploadOrgChart_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadOrgChartDto" } } } }, "responses": { "201": { "description": "The uploaded organization chart" } }, "security": [ { "apikey": [] } ], "summary": "Upload an image as the organization chart", "tags": [ "Org Chart" ] } }, "/v1/evidence-forms": { "get": { "description": "List all available pre-built evidence forms", "operationId": "EvidenceFormsController_listForms_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "List evidence forms", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/statuses": { "get": { "description": "Returns the latest submission date per form type for the active organization", "operationId": "EvidenceFormsController_getFormStatuses_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get submission statuses for all forms", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/my-submissions": { "get": { "description": "Returns all evidence form submissions by the authenticated user for the active organization", "operationId": "EvidenceFormsController_getMySubmissions_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get current user submissions", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/my-submissions/pending-count": { "get": { "description": "Returns the count of pending evidence submissions for the authenticated user", "operationId": "EvidenceFormsController_getPendingSubmissionCount_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get pending submission count for current user", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/{formType}": { "get": { "description": "Fetch a specific form definition with submissions for the active organization", "operationId": "EvidenceFormsController_getFormWithSubmissions_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "search", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "limit", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "offset", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get form definition and submissions", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/{formType}/submissions/{submissionId}": { "get": { "description": "Fetch one evidence form submission for the active organization", "operationId": "EvidenceFormsController_getSubmission_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "submissionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get a single submission", "tags": [ "Evidence Forms" ] }, "delete": { "description": "Remove an evidence form submission for the active organization. Requires owner, admin, or auditor role.", "operationId": "EvidenceFormsController_deleteSubmission_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "submissionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Delete a submission", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/{formType}/submissions": { "post": { "description": "Create a new organization-scoped evidence form submission using Zod-validated payloads", "operationId": "EvidenceFormsController_submitForm_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Submit evidence form entry", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/{formType}/upload-submission": { "post": { "description": "Upload a PDF or image file and create a submission for the given form type, bypassing form-specific validation", "operationId": "EvidenceFormsController_uploadSubmission_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Upload a file as an evidence submission", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/{formType}/submissions/{submissionId}/review": { "patch": { "description": "Approve or reject an evidence form submission with an optional reason", "operationId": "EvidenceFormsController_reviewSubmission_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "submissionId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Review a submission", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/uploads": { "post": { "description": "Upload a file for evidence form fields and return file metadata for submission payload", "operationId": "EvidenceFormsController_uploadFile_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Upload evidence form file", "tags": [ "Evidence Forms" ] } }, "/v1/evidence-forms/{formType}/export.csv": { "get": { "description": "Export all form submissions for an organization as CSV", "operationId": "EvidenceFormsController_exportCsv_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "formType", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Export form submissions to CSV", "tags": [ "Evidence Forms" ] } }, "/v1/frameworks": { "get": { "operationId": "FrameworksController_findAll_v1", "parameters": [ { "name": "includeControls", "required": false, "in": "query", "schema": { "type": "boolean" } }, { "name": "includeScores", "required": false, "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "List framework instances for the organization", "tags": [ "Frameworks" ] }, "post": { "operationId": "FrameworksController_addFrameworks_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddFrameworksDto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Add frameworks to the organization", "tags": [ "Frameworks" ] } }, "/v1/frameworks/available": { "get": { "operationId": "FrameworksController_findAvailable_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "List available frameworks (requires session, no active org needed — used during onboarding)", "tags": [ "Frameworks" ] } }, "/v1/frameworks/scores": { "get": { "operationId": "FrameworksController_getScores_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Get overview compliance scores", "tags": [ "Frameworks" ] } }, "/v1/frameworks/{id}": { "get": { "operationId": "FrameworksController_findOne_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Get a single framework instance with full detail", "tags": [ "Frameworks" ] }, "delete": { "operationId": "FrameworksController_delete_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Delete a framework instance", "tags": [ "Frameworks" ] } }, "/v1/frameworks/{id}/requirements/{requirementKey}": { "get": { "operationId": "FrameworksController_findRequirement_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "requirementKey", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Get a specific requirement with related controls", "tags": [ "Frameworks" ] } }, "/v1/audit-logs": { "get": { "operationId": "AuditLogController_getAuditLogs_v1", "parameters": [ { "name": "entityType", "required": false, "in": "query", "description": "Filter by entity type (e.g. policy, task, control)", "schema": { "type": "string" } }, { "name": "entityId", "required": false, "in": "query", "description": "Filter by entity ID", "schema": { "type": "string" } }, { "name": "pathContains", "required": false, "in": "query", "description": "Filter by path substring (e.g. automation ID)", "schema": { "type": "string" } }, { "name": "take", "required": false, "in": "query", "description": "Number of logs to return (max 100, default 50)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get audit logs filtered by entity type and ID", "tags": [ "Audit Logs" ] } }, "/v1/controls": { "get": { "operationId": "ControlsController_findAll_v1", "parameters": [ { "name": "page", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "perPage", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "name", "required": false, "in": "query", "description": "Filter by name (case-insensitive contains)", "schema": { "type": "string" } }, { "name": "sortBy", "required": false, "in": "query", "description": "Field to sort by (default: name)", "schema": { "type": "string" } }, { "name": "sortDesc", "required": false, "in": "query", "description": "Sort descending (true/false)", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "List controls with relations", "tags": [ "Controls" ] }, "post": { "operationId": "ControlsController_create_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateControlDto" } } } }, "responses": { "201": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Create a new control", "tags": [ "Controls" ] } }, "/v1/controls/options": { "get": { "operationId": "ControlsController_getOptions_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Get dropdown options for creating controls", "tags": [ "Controls" ] } }, "/v1/controls/{id}": { "get": { "operationId": "ControlsController_findOne_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Get control detail with progress", "tags": [ "Controls" ] }, "delete": { "operationId": "ControlsController_delete_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "bearer": [] } ], "summary": "Delete a control", "tags": [ "Controls" ] } }, "/v1/internal/email/send": { "post": { "operationId": "EmailController_sendEmail_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendEmailDto" } } } }, "responses": { "200": { "description": "Email task triggered" } }, "security": [ { "apikey": [] } ], "summary": "Send an email via the centralized Trigger task (internal)", "tags": [ "Internal - Email" ] } }, "/v1/secrets": { "get": { "operationId": "SecretsController_listSecrets_v1", "parameters": [], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "List all secrets (metadata only, no values)", "tags": [ "Secrets" ] }, "post": { "operationId": "SecretsController_createSecret_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": { "type": "string" }, "description": { "type": "string", "nullable": true }, "category": { "type": "string", "nullable": true } } } } } }, "responses": { "201": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Create a new secret", "tags": [ "Secrets" ] } }, "/v1/secrets/{id}": { "get": { "operationId": "SecretsController_getSecret_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Secret ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Get a secret with decrypted value", "tags": [ "Secrets" ] }, "put": { "operationId": "SecretsController_updateSecret_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Secret ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Update a secret", "tags": [ "Secrets" ] }, "delete": { "operationId": "SecretsController_deleteSecret_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Secret ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "security": [ { "apikey": [] } ], "summary": "Delete a secret", "tags": [ "Secrets" ] } }, "/v1/security-penetration-tests": { "get": { "description": "Returns all penetration tests created for the organization.", "operationId": "SecurityPenetrationTestsController_list_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Penetration tests returned" } }, "security": [ { "apikey": [] } ], "summary": "List penetration test runs", "tags": [ "Security Penetration Tests" ] }, "post": { "description": "Creates a new penetration test run and returns the run metadata.", "operationId": "SecurityPenetrationTestsController_create_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePenetrationTestDto" } } } }, "responses": { "201": { "description": "Penetration test created" }, "400": { "description": "Invalid request payload" } }, "security": [ { "apikey": [] } ], "summary": "Create penetration test", "tags": [ "Security Penetration Tests" ] } }, "/v1/security-penetration-tests/github/repos": { "get": { "description": "Returns GitHub repositories accessible with the connected GitHub integration.", "operationId": "SecurityPenetrationTestsController_listGithubRepos_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Repository list returned" } }, "security": [ { "apikey": [] } ], "summary": "List accessible GitHub repositories", "tags": [ "Security Penetration Tests" ] } }, "/v1/security-penetration-tests/{id}": { "get": { "description": "Returns a penetration test run with progress metadata.", "operationId": "SecurityPenetrationTestsController_getById_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Penetration test returned" }, "404": { "description": "Penetration test not found" } }, "security": [ { "apikey": [] } ], "summary": "Get penetration test status", "tags": [ "Security Penetration Tests" ] } }, "/v1/security-penetration-tests/{id}/progress": { "get": { "description": "Returns detailed progress for an in-flight report run.", "operationId": "SecurityPenetrationTestsController_getProgress_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Progress returned" } }, "security": [ { "apikey": [] } ], "summary": "Get penetration test progress", "tags": [ "Security Penetration Tests" ] } }, "/v1/security-penetration-tests/{id}/report": { "get": { "description": "Returns the markdown report output for a completed run.", "operationId": "SecurityPenetrationTestsController_getReport_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Markdown report output" } }, "security": [ { "apikey": [] } ], "summary": "Get penetration test output", "tags": [ "Security Penetration Tests" ] } }, "/v1/security-penetration-tests/{id}/pdf": { "get": { "description": "Returns the PDF version of a completed report.", "operationId": "SecurityPenetrationTestsController_getPdf_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "PDF report artifact" } }, "security": [ { "apikey": [] } ], "summary": "Get penetration test PDF", "tags": [ "Security Penetration Tests" ] } }, "/v1/security-penetration-tests/webhook": { "post": { "description": "Receives callback payloads from the penetration test provider when a run is updated. Per-run webhook token validation is enforced when handshake state exists.", "operationId": "SecurityPenetrationTestsController_handleWebhook_v1", "parameters": [ { "name": "X-Organization-Id", "in": "header", "description": "Organization ID (required for session auth, optional for API key auth)", "required": false, "schema": { "type": "string" } }, { "name": "webhookToken", "required": false, "in": "query", "description": "Per-job webhook token used for handshake validation when callbacks are sent to Comp.", "schema": {} }, { "name": "X-Webhook-Token", "in": "header", "description": "Optional webhook token header. Query param webhookToken is also accepted.", "required": false, "schema": { "type": "string" } }, { "name": "X-Webhook-Id", "in": "header", "description": "Optional provider event identifier used for idempotency detection.", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Webhook handled" }, "400": { "description": "Invalid webhook payload" } }, "security": [ { "apikey": [] } ], "summary": "Receive penetration test webhook events", "tags": [ "Security Penetration Tests" ] } }, "/v1/pentest-billing/status": { "get": { "operationId": "PentestBillingController_getStatus_v1", "parameters": [], "responses": { "200": { "description": "Subscription status returned" } }, "summary": "Get pentest subscription status", "tags": [ "Pentest Billing" ] } }, "/v1/pentest-billing/subscribe": { "post": { "operationId": "PentestBillingController_subscribe_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscribeDto" } } } }, "responses": { "200": { "description": "Checkout URL returned" } }, "summary": "Create a Stripe checkout session for pentest subscription", "tags": [ "Pentest Billing" ] } }, "/v1/pentest-billing/handle-success": { "post": { "operationId": "PentestBillingController_handleSuccess_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HandleSuccessDto" } } } }, "responses": { "200": { "description": "Subscription activated" } }, "summary": "Handle Stripe checkout success callback", "tags": [ "Pentest Billing" ] } }, "/v1/pentest-billing/portal": { "post": { "operationId": "PentestBillingController_portal_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PortalDto" } } } }, "responses": { "200": { "description": "Portal URL returned" } }, "summary": "Create a Stripe billing portal session", "tags": [ "Pentest Billing" ] } }, "/v1/pentest-billing/charge": { "post": { "operationId": "PentestBillingController_charge_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeDto" } } } }, "responses": { "200": { "description": "Charge result returned" } }, "summary": "Check and charge overage for a pentest run", "tags": [ "Pentest Billing" ] } } }, "info": { "title": "API Documentation", "description": "The API documentation for this application", "version": "1.0", "contact": {} }, "tags": [], "servers": [ { "url": "http://localhost:3333", "description": "Local API Server" }, { "url": "https://api.trycomp.ai", "description": "API Server" } ], "components": { "securitySchemes": { "apikey": { "type": "apiKey", "in": "header", "name": "X-API-Key", "description": "API key for authentication" } }, "schemas": { "UserResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "User ID", "example": "usr_abc123def456" }, "name": { "type": "string", "description": "User name", "example": "John Doe" }, "email": { "type": "string", "description": "User email", "example": "john.doe@company.com" }, "emailVerified": { "type": "boolean", "description": "Whether email is verified", "example": true }, "image": { "type": "object", "description": "User profile image URL", "example": "https://example.com/avatar.jpg", "nullable": true }, "createdAt": { "format": "date-time", "type": "string", "description": "When the user was created", "example": "2024-01-01T00:00:00Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "When the user was last updated", "example": "2024-01-15T00:00:00Z" }, "lastLogin": { "type": "object", "description": "Last login time", "example": "2024-01-15T12:00:00Z", "nullable": true }, "isPlatformAdmin": { "type": "boolean", "description": "Whether the user is a platform admin (Comp AI team member)", "example": false } }, "required": [ "id", "name", "email", "emailVerified", "image", "createdAt", "updatedAt", "lastLogin", "isPlatformAdmin" ] }, "PeopleResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Member ID", "example": "mem_abc123def456" }, "organizationId": { "type": "string", "description": "Organization ID this member belongs to", "example": "org_abc123def456" }, "userId": { "type": "string", "description": "User ID associated with member", "example": "usr_abc123def456" }, "role": { "type": "string", "description": "Member role", "example": "admin" }, "createdAt": { "format": "date-time", "type": "string", "description": "When the member was created", "example": "2024-01-01T00:00:00Z" }, "department": { "type": "string", "description": "Member department", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "jobTitle": { "type": "object", "description": "Job title for the member", "example": "Software Engineer", "nullable": true }, "isActive": { "type": "boolean", "description": "Whether member is active", "example": true }, "fleetDmLabelId": { "type": "object", "description": "FleetDM label ID for member devices", "example": 123, "nullable": true }, "user": { "description": "User information", "allOf": [ { "$ref": "#/components/schemas/UserResponseDto" } ] } }, "required": [ "id", "organizationId", "userId", "role", "createdAt", "department", "jobTitle", "isActive", "fleetDmLabelId", "user" ] }, "InviteItemDto": { "type": "object", "properties": { "email": { "type": "string", "example": "user@example.com" }, "roles": { "example": [ "employee" ], "type": "array", "items": { "type": "string" } } }, "required": [ "email", "roles" ] }, "InvitePeopleDto": { "type": "object", "properties": { "invites": { "type": "array", "items": { "$ref": "#/components/schemas/InviteItemDto" } } }, "required": [ "invites" ] }, "CreatePeopleDto": { "type": "object", "properties": { "userId": { "type": "string", "description": "User ID to associate with this member", "example": "usr_abc123def456" }, "role": { "type": "string", "description": "Role for the member (built-in role name or custom role ID)", "example": "admin" }, "department": { "type": "string", "description": "Member department", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "isActive": { "type": "boolean", "description": "Whether member is active", "example": true }, "fleetDmLabelId": { "type": "number", "description": "FleetDM label ID for member devices", "example": 123 }, "jobTitle": { "type": "string", "description": "Job title for the member", "example": "Software Engineer" } }, "required": [ "userId", "role" ] }, "BulkCreatePeopleDto": { "type": "object", "properties": { "members": { "description": "Array of members to create", "example": [ { "userId": "usr_abc123def456", "role": "admin", "department": "it", "isActive": true, "fleetDmLabelId": 123 }, { "userId": "usr_def456ghi789", "role": "member", "department": "hr", "isActive": true } ], "type": "array", "items": { "$ref": "#/components/schemas/CreatePeopleDto" } } }, "required": [ "members" ] }, "UpdatePeopleDto": { "type": "object", "properties": { "userId": { "type": "string", "description": "User ID to associate with this member", "example": "usr_abc123def456" }, "role": { "type": "string", "description": "Role for the member (built-in role name or custom role ID)", "example": "admin" }, "department": { "type": "string", "description": "Member department", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "isActive": { "type": "boolean", "description": "Whether to deactivate this member (soft delete)", "example": false }, "fleetDmLabelId": { "type": "number", "description": "FleetDM label ID for member devices", "example": 123 }, "jobTitle": { "type": "string", "description": "Job title for the member", "example": "Software Engineer" }, "name": { "type": "string", "description": "Name of the associated user", "example": "John Doe" }, "email": { "type": "string", "description": "Email of the associated user", "example": "john@example.com" }, "createdAt": { "type": "string", "description": "Member join date (createdAt override)", "example": "2024-01-15T00:00:00.000Z" } } }, "EmailPreferencesDto": { "type": "object", "properties": { "policyNotifications": { "type": "boolean", "example": true }, "taskReminders": { "type": "boolean", "example": true }, "weeklyTaskDigest": { "type": "boolean", "example": true }, "unassignedItemsNotifications": { "type": "boolean", "example": true }, "taskMentions": { "type": "boolean", "example": true }, "taskAssignments": { "type": "boolean", "example": true } }, "required": [ "policyNotifications", "taskReminders", "weeklyTaskDigest", "unassignedItemsNotifications", "taskMentions", "taskAssignments" ] }, "UpdateEmailPreferencesDto": { "type": "object", "properties": { "preferences": { "$ref": "#/components/schemas/EmailPreferencesDto" } }, "required": [ "preferences" ] }, "CreateRiskDto": { "type": "object", "properties": { "title": { "type": "string", "description": "Risk title", "example": "Data breach vulnerability in user authentication system" }, "description": { "type": "string", "description": "Detailed description of the risk", "example": "Weak password requirements could lead to unauthorized access to user accounts" }, "category": { "type": "string", "description": "Risk category", "enum": [ "customer", "fraud", "governance", "operations", "other", "people", "regulatory", "reporting", "resilience", "technology", "vendor_management" ], "example": "technology" }, "department": { "type": "string", "description": "Department responsible for the risk", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "status": { "type": "string", "description": "Current status of the risk", "enum": [ "open", "pending", "closed", "archived" ], "default": "open", "example": "open" }, "likelihood": { "type": "string", "description": "Likelihood of the risk occurring", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "possible" }, "impact": { "type": "string", "description": "Impact if the risk materializes", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "major" }, "residualLikelihood": { "type": "string", "description": "Residual likelihood after treatment", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "unlikely" }, "residualImpact": { "type": "string", "description": "Residual impact after treatment", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "minor" }, "treatmentStrategyDescription": { "type": "string", "description": "Description of the treatment strategy", "example": "Implement multi-factor authentication and strengthen password requirements" }, "treatmentStrategy": { "type": "string", "description": "Risk treatment strategy", "enum": [ "accept", "avoid", "mitigate", "transfer" ], "default": "accept", "example": "mitigate" }, "assigneeId": { "type": "string", "description": "ID of the user assigned to this risk", "example": "mem_abc123def456" } }, "required": [ "title", "description", "category", "status", "likelihood", "impact", "residualLikelihood", "residualImpact", "treatmentStrategy" ] }, "UpdateRiskDto": { "type": "object", "properties": { "title": { "type": "string", "description": "Risk title", "example": "Data breach vulnerability in user authentication system" }, "description": { "type": "string", "description": "Detailed description of the risk", "example": "Weak password requirements could lead to unauthorized access to user accounts" }, "category": { "type": "string", "description": "Risk category", "enum": [ "customer", "fraud", "governance", "operations", "other", "people", "regulatory", "reporting", "resilience", "technology", "vendor_management" ], "example": "technology" }, "department": { "type": "string", "description": "Department responsible for the risk", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "status": { "type": "string", "description": "Current status of the risk", "enum": [ "open", "pending", "closed", "archived" ], "default": "open", "example": "open" }, "likelihood": { "type": "string", "description": "Likelihood of the risk occurring", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "possible" }, "impact": { "type": "string", "description": "Impact if the risk materializes", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "major" }, "residualLikelihood": { "type": "string", "description": "Residual likelihood after treatment", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "unlikely" }, "residualImpact": { "type": "string", "description": "Residual impact after treatment", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "minor" }, "treatmentStrategyDescription": { "type": "string", "description": "Description of the treatment strategy", "example": "Implement multi-factor authentication and strengthen password requirements" }, "treatmentStrategy": { "type": "string", "description": "Risk treatment strategy", "enum": [ "accept", "avoid", "mitigate", "transfer" ], "default": "accept", "example": "mitigate" }, "assigneeId": { "type": "string", "description": "ID of the user assigned to this risk", "example": "mem_abc123def456" } } }, "CreateVendorDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions Inc." }, "description": { "type": "string", "description": "Detailed description of the vendor and services provided", "example": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers." }, "category": { "type": "string", "description": "Vendor category", "enum": [ "cloud", "infrastructure", "software_as_a_service", "finance", "marketing", "sales", "hr", "other" ], "default": "other", "example": "cloud" }, "status": { "type": "string", "description": "Assessment status of the vendor", "enum": [ "not_assessed", "in_progress", "assessed" ], "default": "not_assessed", "example": "not_assessed" }, "inherentProbability": { "type": "string", "description": "Inherent probability of risk before controls", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "possible" }, "inherentImpact": { "type": "string", "description": "Inherent impact of risk before controls", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "moderate" }, "residualProbability": { "type": "string", "description": "Residual probability after controls are applied", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "unlikely" }, "residualImpact": { "type": "string", "description": "Residual impact after controls are applied", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "minor" }, "website": { "type": "string", "description": "Vendor website URL", "example": "https://www.cloudtechsolutions.com" }, "isSubProcessor": { "type": "boolean", "description": "Whether the vendor is a sub-processor", "default": false }, "assigneeId": { "type": "string", "description": "ID of the user assigned to manage this vendor", "example": "mem_abc123def456" } }, "required": [ "name", "description", "category", "status", "inherentProbability", "inherentImpact", "residualProbability", "residualImpact" ] }, "UpdateVendorDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions Inc." }, "description": { "type": "string", "description": "Detailed description of the vendor and services provided", "example": "Cloud infrastructure provider offering AWS-like services including compute, storage, and networking solutions for enterprise customers." }, "category": { "type": "string", "description": "Vendor category", "enum": [ "cloud", "infrastructure", "software_as_a_service", "finance", "marketing", "sales", "hr", "other" ], "default": "other", "example": "cloud" }, "status": { "type": "string", "description": "Assessment status of the vendor", "enum": [ "not_assessed", "in_progress", "assessed" ], "default": "not_assessed", "example": "not_assessed" }, "inherentProbability": { "type": "string", "description": "Inherent probability of risk before controls", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "possible" }, "inherentImpact": { "type": "string", "description": "Inherent impact of risk before controls", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "moderate" }, "residualProbability": { "type": "string", "description": "Residual probability after controls are applied", "enum": [ "very_unlikely", "unlikely", "possible", "likely", "very_likely" ], "default": "very_unlikely", "example": "unlikely" }, "residualImpact": { "type": "string", "description": "Residual impact after controls are applied", "enum": [ "insignificant", "minor", "moderate", "major", "severe" ], "default": "insignificant", "example": "minor" }, "website": { "type": "string", "description": "Vendor website URL", "example": "https://www.cloudtechsolutions.com" }, "isSubProcessor": { "type": "boolean", "description": "Whether the vendor is a sub-processor", "default": false }, "assigneeId": { "type": "string", "description": "ID of the user assigned to manage this vendor", "example": "mem_abc123def456" } } }, "TriggerVendorRiskAssessmentVendorDto": { "type": "object", "properties": { "vendorId": { "type": "string", "description": "Vendor ID", "example": "vnd_abc123" }, "vendorName": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions" }, "vendorWebsite": { "type": "object", "description": "Vendor website (optional)", "example": "https://cloudtechsolutions.com" } }, "required": [ "vendorId", "vendorName" ] }, "TriggerVendorRiskAssessmentBatchDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID (deprecated — use auth context)", "example": "org_abc123" }, "withResearch": { "type": "boolean", "description": "If false, skips Firecrawl research (cheaper). Defaults to true.", "default": true }, "vendors": { "description": "Vendors to trigger risk assessment for", "type": "array", "items": { "$ref": "#/components/schemas/TriggerVendorRiskAssessmentVendorDto" } } }, "required": [ "vendors" ] }, "TriggerSingleVendorRiskAssessmentDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID (deprecated — use auth context)", "example": "org_abc123" }, "vendorId": { "type": "string", "description": "Vendor ID", "example": "vnd_abc123" }, "vendorName": { "type": "string", "description": "Vendor name", "example": "CloudTech Solutions" }, "vendorWebsite": { "type": "string", "description": "Vendor website", "example": "https://cloudtechsolutions.com" }, "createdByUserId": { "type": "object", "description": "User ID who triggered the assessment (optional)" } }, "required": [ "vendorId", "vendorName", "vendorWebsite" ] }, "CreateContextDto": { "type": "object", "properties": { "question": { "type": "string", "description": "The question or topic this context entry addresses", "example": "How do we handle user authentication in our application?" }, "answer": { "type": "string", "description": "The answer or detailed explanation for the question", "example": "We use a hybrid authentication system supporting both API keys and session-based authentication. API keys are used for programmatic access while sessions are used for web interface interactions." }, "tags": { "description": "Tags to categorize and help search this context entry", "example": [ "authentication", "security", "api", "sessions" ], "type": "array", "items": { "type": "string" } } }, "required": [ "question", "answer" ] }, "UpdateContextDto": { "type": "object", "properties": { "question": { "type": "string", "description": "The question or topic this context entry addresses", "example": "How do we handle user authentication in our application?" }, "answer": { "type": "string", "description": "The answer or detailed explanation for the question", "example": "We use a hybrid authentication system supporting both API keys and session-based authentication. API keys are used for programmatic access while sessions are used for web interface interactions." }, "tags": { "description": "Tags to categorize and help search this context entry", "example": [ "authentication", "security", "api", "sessions" ], "type": "array", "items": { "type": "string" } } } }, "FleetPolicyDto": { "type": "object", "properties": { "id": { "type": "number", "description": "Policy ID", "example": 123 }, "name": { "type": "string", "description": "Policy name", "example": "Password Policy" }, "query": { "type": "string", "description": "Policy query", "example": "SELECT * FROM users;" }, "critical": { "type": "boolean", "description": "Whether policy is critical", "example": true }, "description": { "type": "string", "description": "Policy description", "example": "Ensures strong passwords" }, "author_id": { "type": "number", "description": "Author ID", "example": 456 }, "author_name": { "type": "string", "description": "Author name", "example": "John Doe" }, "author_email": { "type": "string", "description": "Author email", "example": "john@example.com" }, "team_id": { "type": "object", "description": "Team ID", "example": 789, "nullable": true }, "resolution": { "type": "string", "description": "Policy resolution", "example": "Update password settings" }, "platform": { "type": "string", "description": "Platform", "example": "darwin" }, "calendar_events_enabled": { "type": "boolean", "description": "Calendar events enabled", "example": false }, "created_at": { "type": "string", "description": "Created at", "example": "2024-01-01T00:00:00Z" }, "updated_at": { "type": "string", "description": "Updated at", "example": "2024-01-15T00:00:00Z" }, "response": { "type": "string", "description": "Policy response", "example": "compliant" } }, "required": [ "id", "name", "query", "critical", "description", "author_id", "author_name", "author_email", "team_id", "resolution", "platform", "calendar_events_enabled", "created_at", "updated_at", "response" ] }, "DeviceResponseDto": { "type": "object", "properties": { "created_at": { "type": "string", "description": "Device created at", "example": "2024-01-01T00:00:00Z" }, "updated_at": { "type": "string", "description": "Device updated at", "example": "2024-01-15T00:00:00Z" }, "software": { "type": "array", "description": "Software list", "items": { "type": "object" } }, "software_updated_at": { "type": "string", "description": "Software updated at", "example": "2024-01-10T00:00:00Z" }, "id": { "description": "Device ID (numeric for Fleet devices, string UUID for device-agent devices)", "oneOf": [ { "type": "number", "example": 123 }, { "type": "string", "example": "clx1abc123" } ] }, "detail_updated_at": { "type": "string", "description": "Detail updated at", "example": "2024-01-10T00:00:00Z" }, "label_updated_at": { "type": "string", "description": "Label updated at", "example": "2024-01-10T00:00:00Z" }, "policy_updated_at": { "type": "string", "description": "Policy updated at", "example": "2024-01-10T00:00:00Z" }, "last_enrolled_at": { "type": "string", "description": "Last enrolled at", "example": "2024-01-01T00:00:00Z" }, "seen_time": { "type": "string", "description": "Last seen time", "example": "2024-01-15T12:00:00Z" }, "refetch_requested": { "type": "boolean", "description": "Refetch requested", "example": false }, "hostname": { "type": "string", "description": "Hostname", "example": "johns-macbook" }, "uuid": { "type": "string", "description": "Device UUID", "example": "abc123def456" }, "platform": { "type": "string", "description": "Platform", "example": "darwin" }, "osquery_version": { "type": "string", "description": "Osquery version", "example": "5.10.2" }, "orbit_version": { "type": "string", "description": "Orbit version", "example": "1.19.0" }, "fleet_desktop_version": { "type": "string", "description": "Fleet desktop version", "example": "1.19.0" }, "scripts_enabled": { "type": "boolean", "description": "Scripts enabled", "example": true }, "os_version": { "type": "string", "description": "OS version", "example": "macOS 14.2.1" }, "build": { "type": "string", "description": "Build", "example": "23C71" }, "platform_like": { "type": "string", "description": "Platform like", "example": "darwin" }, "code_name": { "type": "string", "description": "Code name", "example": "sonoma" }, "uptime": { "type": "number", "description": "Uptime in seconds", "example": 86400 }, "memory": { "type": "number", "description": "Memory in bytes", "example": 17179869184 }, "cpu_type": { "type": "string", "description": "CPU type", "example": "x86_64" }, "cpu_subtype": { "type": "string", "description": "CPU subtype", "example": "x86_64h" }, "cpu_brand": { "type": "string", "description": "CPU brand", "example": "Intel(R) Core(TM) i7-9750H" }, "cpu_physical_cores": { "type": "number", "description": "CPU physical cores", "example": 6 }, "cpu_logical_cores": { "type": "number", "description": "CPU logical cores", "example": 12 }, "hardware_vendor": { "type": "string", "description": "Hardware vendor", "example": "Apple Inc." }, "hardware_model": { "type": "string", "description": "Hardware model", "example": "MacBookPro16,1" }, "hardware_version": { "type": "string", "description": "Hardware version", "example": "1.0" }, "hardware_serial": { "type": "string", "description": "Hardware serial", "example": "C02XW0AAJGH6" }, "computer_name": { "type": "string", "description": "Computer name", "example": "John's MacBook Pro" }, "public_ip": { "type": "string", "description": "Public IP", "example": "203.0.113.1" }, "primary_ip": { "type": "string", "description": "Primary IP", "example": "192.168.1.100" }, "primary_mac": { "type": "string", "description": "Primary MAC", "example": "00:11:22:33:44:55" }, "distributed_interval": { "type": "number", "description": "Distributed interval", "example": 10 }, "config_tls_refresh": { "type": "number", "description": "Config TLS refresh", "example": 3600 }, "logger_tls_period": { "type": "number", "description": "Logger TLS period", "example": 300 }, "team_id": { "type": "object", "description": "Team ID", "example": 1, "nullable": true }, "pack_stats": { "type": "array", "description": "Pack stats", "items": { "type": "object" } }, "team_name": { "type": "object", "description": "Team name", "example": "Engineering", "nullable": true }, "users": { "type": "array", "description": "Users", "items": { "type": "object" } }, "gigs_disk_space_available": { "type": "number", "description": "Disk space available in GB", "example": 250.5 }, "percent_disk_space_available": { "type": "number", "description": "Percent disk space available", "example": 75.2 }, "gigs_total_disk_space": { "type": "number", "description": "Total disk space in GB", "example": 500 }, "disk_encryption_enabled": { "type": "boolean", "description": "Disk encryption enabled", "example": true }, "issues": { "type": "object", "description": "Issues", "additionalProperties": true }, "mdm": { "type": "object", "description": "MDM info", "additionalProperties": true }, "refetch_critical_queries_until": { "type": "object", "description": "Refetch critical queries until", "example": "2024-01-20T00:00:00Z", "nullable": true }, "last_restarted_at": { "type": "string", "description": "Last restarted at", "example": "2024-01-10T08:00:00Z" }, "policies": { "description": "Policies", "type": "array", "items": { "$ref": "#/components/schemas/FleetPolicyDto" } }, "labels": { "type": "array", "description": "Labels", "items": { "type": "object" } }, "packs": { "type": "array", "description": "Packs", "items": { "type": "object" } }, "batteries": { "type": "array", "description": "Batteries", "items": { "type": "object" } }, "end_users": { "type": "array", "description": "End users", "items": { "type": "object" } }, "last_mdm_enrolled_at": { "type": "string", "description": "Last MDM enrolled at", "example": "2024-01-01T00:00:00Z" }, "last_mdm_checked_in_at": { "type": "string", "description": "Last MDM checked in at", "example": "2024-01-15T12:00:00Z" }, "status": { "type": "string", "description": "Device status", "example": "online" }, "display_text": { "type": "string", "description": "Display text", "example": "Johns MacBook Pro" }, "display_name": { "type": "string", "description": "Display name", "example": "John's MacBook Pro" }, "source": { "type": "string", "description": "Source system that reported this device", "example": "fleet", "enum": [ "fleet", "device_agent" ] } }, "required": [ "created_at", "updated_at", "software", "software_updated_at", "id", "detail_updated_at", "label_updated_at", "policy_updated_at", "last_enrolled_at", "seen_time", "refetch_requested", "hostname", "uuid", "platform", "osquery_version", "orbit_version", "fleet_desktop_version", "scripts_enabled", "os_version", "build", "platform_like", "code_name", "uptime", "memory", "cpu_type", "cpu_subtype", "cpu_brand", "cpu_physical_cores", "cpu_logical_cores", "hardware_vendor", "hardware_model", "hardware_version", "hardware_serial", "computer_name", "public_ip", "primary_ip", "primary_mac", "distributed_interval", "config_tls_refresh", "logger_tls_period", "team_id", "pack_stats", "team_name", "users", "gigs_disk_space_available", "percent_disk_space_available", "gigs_total_disk_space", "disk_encryption_enabled", "issues", "mdm", "refetch_critical_queries_until", "last_restarted_at", "policies", "labels", "packs", "batteries", "end_users", "last_mdm_enrolled_at", "last_mdm_checked_in_at", "status", "display_text", "display_name" ] }, "MemberResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Member ID", "example": "mem_abc123def456" }, "userId": { "type": "string", "description": "User ID associated with member", "example": "usr_abc123def456" }, "role": { "type": "string", "description": "Member role", "example": "admin" }, "department": { "type": "object", "description": "Member department", "example": "engineering", "nullable": true }, "isActive": { "type": "boolean", "description": "Whether member is active", "example": true }, "fleetDmLabelId": { "type": "object", "description": "FleetDM label ID for member devices", "example": 123, "nullable": true }, "organizationId": { "type": "string", "description": "Organization ID this member belongs to", "example": "org_abc123def456" }, "createdAt": { "format": "date-time", "type": "string", "description": "When the member was created", "example": "2024-01-01T00:00:00Z" } }, "required": [ "id", "userId", "role", "department", "isActive", "fleetDmLabelId", "organizationId", "createdAt" ] }, "DevicesByMemberResponseDto": { "type": "object", "properties": { "data": { "description": "Array of devices assigned to the member", "type": "array", "items": { "$ref": "#/components/schemas/DeviceResponseDto" } }, "count": { "type": "number", "description": "Total number of devices for this member", "example": 3 }, "member": { "description": "Member information", "allOf": [ { "$ref": "#/components/schemas/MemberResponseDto" } ] }, "authType": { "type": "string", "description": "How the request was authenticated", "enum": [ "api-key", "session" ], "example": "api-key" }, "authenticatedUser": { "type": "object", "description": "Authenticated user information (present for session auth)", "example": { "id": "usr_abc123def456", "email": "user@company.com" } } }, "required": [ "data", "count", "member", "authType" ] }, "PolicyResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The policy ID", "example": "pol_abc123def456" }, "name": { "type": "string", "description": "Name of the policy", "example": "Data Privacy Policy" }, "description": { "type": "string", "description": "Description of the policy", "example": "This policy outlines how we handle and protect personal data", "nullable": true }, "status": { "type": "string", "description": "Status of the policy", "enum": [ "draft", "published", "needs_review" ], "example": "draft" }, "content": { "type": "array", "description": "Content of the policy as TipTap JSON (array of nodes)", "example": [ { "type": "heading", "attrs": { "level": 2, "textAlign": null }, "content": [ { "type": "text", "text": "Purpose" } ] }, { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "Verify workforce integrity and grant the right access at start, revoke at end." } ] } ], "items": { "type": "object", "additionalProperties": true } }, "frequency": { "type": "string", "description": "Review frequency of the policy", "enum": [ "monthly", "quarterly", "yearly" ], "example": "yearly", "nullable": true }, "department": { "type": "string", "description": "Department this policy applies to", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it", "nullable": true }, "isRequiredToSign": { "type": "boolean", "description": "Whether this policy requires a signature", "example": true }, "signedBy": { "type": "array", "description": "List of user IDs who have signed this policy", "example": [ "usr_123", "usr_456" ], "items": { "type": "string" } }, "reviewDate": { "format": "date-time", "type": "string", "description": "Review date for the policy", "example": "2024-12-31T00:00:00.000Z", "nullable": true }, "isArchived": { "type": "boolean", "description": "Whether this policy is archived", "example": false }, "createdAt": { "format": "date-time", "type": "string", "description": "When the policy was created", "example": "2024-01-01T00:00:00.000Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "When the policy was last updated", "example": "2024-01-15T00:00:00.000Z" }, "lastArchivedAt": { "format": "date-time", "type": "string", "description": "When the policy was last archived", "example": "2024-02-01T00:00:00.000Z", "nullable": true }, "lastPublishedAt": { "format": "date-time", "type": "string", "description": "When the policy was last published", "example": "2024-01-10T00:00:00.000Z", "nullable": true }, "organizationId": { "type": "string", "description": "Organization ID this policy belongs to", "example": "org_abc123def456" }, "assigneeId": { "type": "string", "description": "ID of the user assigned to this policy", "example": "usr_abc123def456", "nullable": true }, "approverId": { "type": "string", "description": "ID of the user who approved this policy", "example": "usr_xyz789abc123", "nullable": true }, "policyTemplateId": { "type": "string", "description": "ID of the policy template this policy is based on", "example": "plt_template123", "nullable": true } }, "required": [ "id", "name", "description", "status", "content", "frequency", "department", "isRequiredToSign", "signedBy", "reviewDate", "isArchived", "createdAt", "updatedAt", "lastArchivedAt", "lastPublishedAt", "organizationId", "assigneeId", "approverId", "policyTemplateId" ] }, "CreatePolicyDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the policy", "example": "Data Privacy Policy" }, "description": { "type": "string", "description": "Description of the policy", "example": "This policy outlines how we handle and protect personal data" }, "status": { "type": "string", "description": "Status of the policy", "enum": [ "draft", "published", "needs_review" ], "example": "draft" }, "content": { "type": "array", "description": "Content of the policy as TipTap JSON (array of nodes)", "example": [ { "type": "heading", "attrs": { "level": 2, "textAlign": null }, "content": [ { "type": "text", "text": "Purpose" } ] }, { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "Verify workforce integrity and grant the right access at start, revoke at end." } ] } ], "items": { "type": "object", "additionalProperties": true } }, "frequency": { "type": "string", "description": "Review frequency of the policy", "enum": [ "monthly", "quarterly", "yearly" ], "example": "yearly" }, "department": { "type": "string", "description": "Department this policy applies to", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "isRequiredToSign": { "type": "boolean", "description": "Whether this policy requires a signature", "example": true }, "reviewDate": { "type": "string", "description": "Review date for the policy", "example": "2024-12-31T00:00:00.000Z" }, "assigneeId": { "type": "string", "description": "ID of the user assigned to this policy", "example": "usr_abc123def456" }, "approverId": { "type": "string", "description": "ID of the user who approved this policy", "example": "usr_xyz789abc123" }, "policyTemplateId": { "type": "string", "description": "ID of the policy template this policy is based on", "example": "plt_template123" }, "signedBy": { "type": "array", "description": "List of user IDs who have signed this policy", "example": [ "usr_123", "usr_456" ], "items": { "type": "string" } } }, "required": [ "name", "content" ] }, "UpdatePolicyDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the policy", "example": "Data Privacy Policy" }, "description": { "type": "string", "description": "Description of the policy", "example": "This policy outlines how we handle and protect personal data" }, "status": { "type": "string", "description": "Status of the policy", "enum": [ "draft", "published", "needs_review" ], "example": "draft" }, "content": { "type": "array", "description": "Content of the policy as TipTap JSON (array of nodes)", "example": [ { "type": "heading", "attrs": { "level": 2, "textAlign": null }, "content": [ { "type": "text", "text": "Purpose" } ] }, { "type": "paragraph", "attrs": { "textAlign": null }, "content": [ { "type": "text", "text": "Verify workforce integrity and grant the right access at start, revoke at end." } ] } ], "items": { "type": "object", "additionalProperties": true } }, "frequency": { "type": "string", "description": "Review frequency of the policy", "enum": [ "monthly", "quarterly", "yearly" ], "example": "yearly" }, "department": { "type": "string", "description": "Department this policy applies to", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" }, "isRequiredToSign": { "type": "boolean", "description": "Whether this policy requires a signature", "example": true }, "reviewDate": { "type": "string", "description": "Review date for the policy", "example": "2024-12-31T00:00:00.000Z" }, "assigneeId": { "type": "string", "description": "ID of the user assigned to this policy", "example": "usr_abc123def456" }, "approverId": { "type": "string", "description": "ID of the user who approved this policy", "example": "usr_xyz789abc123" }, "policyTemplateId": { "type": "string", "description": "ID of the policy template this policy is based on", "example": "plt_template123" }, "signedBy": { "type": "array", "description": "List of user IDs who have signed this policy", "example": [ "usr_123", "usr_456" ], "items": { "type": "string" } }, "isArchived": { "type": "boolean", "description": "Whether to archive this policy", "example": false }, "displayFormat": { "type": "string", "description": "Display format for this policy", "enum": [ "EDITOR", "PDF" ], "example": "EDITOR" } } }, "CreateVersionDto": { "type": "object", "properties": { "sourceVersionId": { "type": "string", "description": "Optional version ID to base the new version on", "example": "pv_abc123def456" }, "changelog": { "type": "string", "description": "Optional changelog to associate with the new version", "example": "Initial draft for quarterly updates" } } }, "UpdateVersionContentDto": { "type": "object", "properties": { "content": { "type": "array", "description": "Content of the policy version as TipTap JSON (array of nodes)", "example": [ { "type": "heading", "attrs": { "level": 2, "textAlign": null }, "content": [ { "type": "text", "text": "Purpose" } ] } ], "items": { "type": "object", "additionalProperties": true } } }, "required": [ "content" ] }, "PublishVersionDto": { "type": "object", "properties": { "setAsActive": { "type": "boolean", "description": "Whether to set this version as the active version", "example": true }, "changelog": { "type": "string", "description": "Optional changelog to associate with the published version", "example": "Updated access controls section" } } }, "SubmitForApprovalDto": { "type": "object", "properties": { "approverId": { "type": "string", "description": "Member ID of the approver", "example": "mem_abc123def456" } }, "required": [ "approverId" ] }, "AISuggestPolicyRequestDto": { "type": "object", "properties": { "instructions": { "type": "string", "description": "User instructions about what changes to make to the policy", "example": "Update the data retention section to specify a 7-year retention period" }, "chatHistory": { "type": "array", "description": "Chat history for context (array of messages with role and content)", "example": [ { "role": "user", "content": "Update the data retention policy" }, { "role": "assistant", "content": "I can help with that..." } ], "items": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "user", "assistant" ] }, "content": { "type": "string" } } } } }, "required": [ "instructions" ] }, "TaskResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the task", "example": "tsk_abc123def456" }, "title": { "type": "string", "description": "Task title", "example": "Implement user authentication" }, "description": { "type": "string", "description": "Task description", "example": "Add OAuth 2.0 authentication to the platform" }, "status": { "type": "string", "description": "Task status", "example": "in_progress", "enum": [ "todo", "in_progress", "done", "blocked" ] }, "createdAt": { "format": "date-time", "type": "string", "description": "Task creation timestamp", "example": "2024-01-15T10:30:00Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "Task last update timestamp", "example": "2024-01-15T10:30:00Z" }, "taskTemplateId": { "type": "object", "description": "Task template ID", "example": "frk_tt_68406e353df3bc002994acef", "nullable": true } }, "required": [ "id", "title", "status", "createdAt", "updatedAt" ] }, "AttachmentResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the attachment", "example": "att_abc123def456" }, "name": { "type": "string", "description": "Original filename", "example": "document.pdf" }, "type": { "type": "string", "description": "File type/MIME type", "example": "application/pdf" }, "size": { "type": "number", "description": "File size in bytes", "example": 1024000 }, "downloadUrl": { "type": "string", "description": "Signed URL for downloading the file (temporary)", "example": "https://bucket.s3.amazonaws.com/path/to/file.pdf?signature=..." }, "createdAt": { "format": "date-time", "type": "string", "description": "Upload timestamp", "example": "2024-01-15T10:30:00Z" } }, "required": [ "id", "name", "type", "size", "downloadUrl", "createdAt" ] }, "UploadAttachmentDto": { "type": "object", "properties": { "fileName": { "type": "string", "description": "Name of the file", "example": "document.pdf", "maxLength": 255 }, "fileType": { "type": "string", "description": "MIME type of the file", "example": "application/pdf" }, "fileData": { "type": "string", "description": "Base64 encoded file data", "example": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==" }, "description": { "type": "string", "description": "Description of the attachment", "example": "Meeting notes from Q4 planning session", "maxLength": 500 }, "userId": { "type": "string", "description": "User ID of the user uploading the attachment (required for API key auth, ignored for JWT auth)", "example": "usr_abc123def456" } }, "required": [ "fileName", "fileType", "fileData" ] }, "UpdateAutomationDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Automation name", "example": "GitHub Security Check - Evidence Collection" }, "description": { "type": "string", "description": "Automation description", "example": "Collects evidence about GitHub repository security settings" }, "isEnabled": { "type": "boolean", "description": "Whether the automation is enabled" }, "evaluationCriteria": { "type": "string", "description": "Evaluation criteria for the automation" } } }, "AuthorResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "User ID", "example": "usr_abc123def456" }, "name": { "type": "string", "description": "User name", "example": "John Doe" }, "email": { "type": "string", "description": "User email", "example": "john.doe@company.com" }, "image": { "type": "object", "description": "User profile image URL", "example": "https://example.com/avatar.jpg", "nullable": true }, "deactivated": { "type": "boolean", "description": "Whether the user is deactivated", "example": false, "nullable": true } }, "required": [ "id", "name", "email", "image", "deactivated" ] }, "AttachmentMetadataDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the attachment", "example": "att_abc123def456" }, "name": { "type": "string", "description": "Original filename", "example": "document.pdf" }, "type": { "type": "string", "description": "File type/MIME type", "example": "application/pdf" }, "createdAt": { "format": "date-time", "type": "string", "description": "Upload timestamp", "example": "2024-01-15T10:30:00Z" } }, "required": [ "id", "name", "type", "createdAt" ] }, "CommentResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the comment", "example": "cmt_abc123def456" }, "content": { "type": "string", "description": "Comment content", "example": "This task needs to be completed by end of week" }, "author": { "description": "Comment author information", "allOf": [ { "$ref": "#/components/schemas/AuthorResponseDto" } ] }, "attachments": { "description": "Attachment metadata (URLs generated on-demand)", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentMetadataDto" } }, "createdAt": { "format": "date-time", "type": "string", "description": "Comment creation timestamp", "example": "2024-01-15T10:30:00Z" } }, "required": [ "id", "content", "author", "attachments", "createdAt" ] }, "CreateCommentDto": { "type": "object", "properties": { "content": { "type": "string", "description": "Content of the comment", "example": "This task needs to be completed by end of week", "maxLength": 2000 }, "entityId": { "type": "string", "description": "ID of the entity to comment on", "example": "tsk_abc123def456" }, "entityType": { "type": "string", "description": "Type of entity being commented on", "enum": [ "task", "vendor", "risk", "policy" ], "example": "task" }, "contextUrl": { "type": "string", "description": "Optional URL of the page where the comment was created, used for deep-linking in notifications", "example": "https://app.trycomp.ai/org_abc123/vendors/vnd_abc123?taskItemId=tki_abc123#task-items", "maxLength": 2048 }, "attachments": { "description": "Optional attachments to include with the comment", "type": "array", "items": { "$ref": "#/components/schemas/UploadAttachmentDto" } }, "userId": { "type": "string", "description": "User ID of the comment author (required for API key auth, ignored for JWT auth)", "example": "usr_abc123def456" } }, "required": [ "content", "entityId", "entityType" ] }, "UpdateCommentDto": { "type": "object", "properties": { "content": { "type": "string", "description": "Updated content of the comment", "example": "This task needs to be completed by end of week (updated)", "maxLength": 2000 }, "contextUrl": { "type": "string", "description": "Optional URL of the page where the comment was updated, used for deep-linking in notifications", "example": "https://app.trycomp.ai/org_abc123/risk/rsk_abc123?taskItemId=tki_abc123#task-items", "maxLength": 2048 }, "userId": { "type": "string", "description": "User ID of the comment author (required for API key auth, ignored for JWT auth)", "example": "usr_abc123def456" } }, "required": [ "content" ] }, "DomainVerificationDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Verification type (e.g., TXT, CNAME)" }, "domain": { "type": "string", "description": "Domain for verification" }, "value": { "type": "string", "description": "Verification value" }, "reason": { "type": "string", "description": "Reason for verification status" } }, "required": [ "type", "domain", "value" ] }, "DomainStatusResponseDto": { "type": "object", "properties": { "domain": { "type": "string", "description": "The domain name" }, "verified": { "type": "boolean", "description": "Whether the domain is verified" }, "verification": { "description": "Verification records for the domain", "type": "array", "items": { "$ref": "#/components/schemas/DomainVerificationDto" } }, "cnameTarget": { "type": "string", "description": "The recommended CNAME target for this domain from Vercel", "example": "cname.vercel-dns.com" } }, "required": [ "domain", "verified" ] }, "UploadComplianceResourceDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID that owns the compliance resource", "example": "org_6914cd0e16e4c7dccbb54426" }, "framework": { "type": "string", "description": "Compliance framework identifier", "enum": [ "iso_27001", "iso_42001", "gdpr", "hipaa", "soc2_type1", "soc2_type2", "pci_dss", "nen_7510", "iso_9001" ], "example": "iso_27001" }, "fileName": { "type": "string", "description": "Original file name (PDF only)", "example": "iso-27001-certificate.pdf" }, "fileType": { "type": "string", "description": "MIME type of the file", "example": "application/pdf" }, "fileData": { "type": "string", "description": "Base64 encoded PDF content" } }, "required": [ "organizationId", "framework", "fileName", "fileType", "fileData" ] }, "ComplianceResourceResponseDto": { "type": "object", "properties": { "framework": { "type": "string", "enum": [ "iso_27001", "iso_42001", "gdpr", "hipaa", "soc2_type1", "soc2_type2", "pci_dss", "nen_7510", "iso_9001" ] }, "fileName": { "type": "string" }, "fileSize": { "type": "number", "description": "File size in bytes" }, "updatedAt": { "type": "string", "description": "ISO timestamp when the certificate was last updated" } }, "required": [ "framework", "fileName", "fileSize", "updatedAt" ] }, "ComplianceResourceSignedUrlDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID that owns the compliance resource", "example": "org_6914cd0e16e4c7dccbb54426" }, "framework": { "type": "string", "description": "Compliance framework identifier", "enum": [ "iso_27001", "iso_42001", "gdpr", "hipaa", "soc2_type1", "soc2_type2", "pci_dss", "nen_7510", "iso_9001" ], "example": "iso_27001" } }, "required": [ "organizationId", "framework" ] }, "ComplianceResourceUrlResponseDto": { "type": "object", "properties": { "signedUrl": { "type": "string" }, "fileName": { "type": "string" }, "fileSize": { "type": "number", "description": "File size in bytes" } }, "required": [ "signedUrl", "fileName", "fileSize" ] }, "ListComplianceResourcesDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID that owns the compliance resources", "example": "org_6914cd0e16e4c7dccbb54426" } }, "required": [ "organizationId" ] }, "UploadTrustDocumentDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID that owns the document", "example": "org_6914cd0e16e4c7dccbb54426" }, "fileName": { "type": "string", "description": "Original file name", "example": "security-overview.pdf" }, "fileType": { "type": "string", "description": "MIME type (optional)", "example": "application/pdf" }, "fileData": { "type": "string", "description": "Base64-encoded file contents (no data URL prefix)" }, "description": { "type": "string", "description": "Optional description shown in the trust portal", "example": "Overview of our security program" } }, "required": [ "organizationId", "fileName", "fileData" ] }, "TrustDocumentResponseDto": { "type": "object", "properties": { "id": { "type": "string", "example": "tdoc_abc123" }, "name": { "type": "string", "example": "security-overview.pdf" }, "description": { "type": "object", "example": "Overview of our security program" }, "createdAt": { "type": "string", "example": "2026-01-02T10:15:00.000Z" }, "updatedAt": { "type": "string", "example": "2026-01-02T10:15:00.000Z" } }, "required": [ "id", "name", "createdAt", "updatedAt" ] }, "TrustDocumentSignedUrlDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID that owns the document", "example": "org_6914cd0e16e4c7dccbb54426" } }, "required": [ "organizationId" ] }, "TrustDocumentUrlResponseDto": { "type": "object", "properties": { "signedUrl": { "type": "string" }, "fileName": { "type": "string" } }, "required": [ "signedUrl", "fileName" ] }, "DeleteTrustDocumentDto": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "Organization ID that owns the document", "example": "org_6914cd0e16e4c7dccbb54426" } }, "required": [ "organizationId" ] }, "CreateAccessRequestDto": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" }, "company": { "type": "string" }, "jobTitle": { "type": "string" }, "purpose": { "type": "string" }, "requestedDurationDays": { "type": "number", "minimum": 1 } }, "required": [ "name", "email" ] }, "ApproveAccessRequestDto": { "type": "object", "properties": { "durationDays": { "type": "number", "minimum": 1 } } }, "DenyAccessRequestDto": { "type": "object", "properties": { "reason": { "type": "string" } }, "required": [ "reason" ] }, "RevokeGrantDto": { "type": "object", "properties": { "reason": { "type": "string" } }, "required": [ "reason" ] }, "SignNdaDto": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" }, "accept": { "type": "boolean" } }, "required": [ "name", "email", "accept" ] }, "ReclaimAccessDto": { "type": "object", "properties": { "email": { "type": "string" } }, "required": [ "email" ] }, "UpdateTaskTemplateDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Task template name", "example": "Monthly Security Review" }, "description": { "type": "string", "description": "Detailed description of the task template", "example": "Review and update security policies on a monthly basis" }, "frequency": { "type": "string", "description": "Frequency of the task", "enum": [ "monthly", "quarterly", "yearly" ], "example": "monthly" }, "department": { "type": "string", "description": "Department responsible for the task", "enum": [ "none", "admin", "gov", "hr", "it", "itsm", "qms" ], "example": "it" } } }, "CreateFindingTemplateDto": { "type": "object", "properties": { "category": { "type": "string", "description": "Category of the finding template", "example": "evidence_issue" }, "title": { "type": "string", "description": "Short title of the finding template", "example": "Issue with uploaded evidence" }, "content": { "type": "string", "description": "Full message content of the finding template", "example": "The uploaded evidence does not clearly show the Organization Name or URL. Please provide a screenshot showing the context." }, "order": { "type": "number", "description": "Display order for the template", "example": 0 } }, "required": [ "category", "title", "content" ] }, "UpdateFindingTemplateDto": { "type": "object", "properties": { "category": { "type": "string", "description": "Category of the finding template", "example": "evidence_issue" }, "title": { "type": "string", "description": "Short title of the finding template", "example": "Issue with uploaded evidence" }, "content": { "type": "string", "description": "Full message content of the finding template", "example": "The uploaded evidence does not clearly show the Organization Name or URL. Please provide a screenshot showing the context." }, "order": { "type": "number", "description": "Display order for the template", "example": 0 } } }, "CreateFindingDto": { "type": "object", "properties": { "taskId": { "type": "string", "description": "Task ID this finding is associated with", "example": "tsk_abc123" }, "evidenceSubmissionId": { "type": "string", "description": "Evidence submission ID this finding is associated with", "example": "evs_abc123" }, "evidenceFormType": { "type": "string", "description": "Evidence form type this finding is associated with (e.g., access-request, whistleblower-report)", "example": "access-request", "enum": [ "board-meeting", "it-leadership-meeting", "risk-committee-meeting", "meeting", "access-request", "whistleblower-report", "penetration-test", "rbac-matrix", "infrastructure-inventory", "employee-performance-evaluation", "network-diagram", "tabletop-exercise" ] }, "type": { "type": "string", "description": "Type of finding (SOC 2 or ISO 27001)", "enum": [ "soc2", "iso27001" ], "default": "soc2" }, "templateId": { "type": "string", "description": "Finding template ID (optional)", "example": "fnd_t_abc123" }, "content": { "type": "string", "description": "Finding content/message", "example": "The uploaded evidence does not clearly show the Organization Name or URL.", "maxLength": 5000 } }, "required": [ "type", "content" ] }, "UpdateFindingDto": { "type": "object", "properties": { "status": { "type": "string", "description": "Finding status", "enum": [ "open", "ready_for_review", "needs_revision", "closed" ] }, "type": { "type": "string", "description": "Type of finding (SOC 2 or ISO 27001)", "enum": [ "soc2", "iso27001" ] }, "content": { "type": "string", "description": "Finding content/message", "example": "The uploaded evidence does not clearly show the Organization Name or URL.", "maxLength": 5000 }, "revisionNote": { "type": "object", "description": "Auditor note when requesting revision (only for needs_revision status)", "example": "Please provide clearer screenshots showing the timestamp.", "maxLength": 2000, "nullable": true } } }, "ParseQuestionnaireDto": { "type": "object", "properties": {} }, "AnswerSingleQuestionDto": { "type": "object", "properties": {} }, "SaveAnswerDto": { "type": "object", "properties": {} }, "DeleteAnswerDto": { "type": "object", "properties": {} }, "ExportByIdDto": { "type": "object", "properties": {} }, "UploadAndParseDto": { "type": "object", "properties": {} }, "ExportQuestionnaireDto": { "type": "object", "properties": {} }, "AutoAnswerDto": { "type": "object", "properties": {} }, "SaveManualAnswerDto": { "type": "object", "properties": {} }, "UploadDocumentDto": { "type": "object", "properties": {} }, "ProcessDocumentsDto": { "type": "object", "properties": {} }, "DeleteManualAnswerDto": { "type": "object", "properties": {} }, "DeleteAllManualAnswersDto": { "type": "object", "properties": {} }, "SaveSOAAnswerDto": { "type": "object", "properties": {} }, "AutoFillSOADto": { "type": "object", "properties": {} }, "CreateSOADocumentDto": { "type": "object", "properties": {} }, "EnsureSOASetupDto": { "type": "object", "properties": {} }, "ApproveSOADocumentDto": { "type": "object", "properties": {} }, "DeclineSOADocumentDto": { "type": "object", "properties": {} }, "SubmitSOAForApprovalDto": { "type": "object", "properties": {} }, "ContextResponseDto": { "type": "object", "properties": { "contextId": { "type": "string" }, "isNew": { "type": "boolean" } }, "required": [ "contextId", "isNew" ] }, "CreateSessionDto": { "type": "object", "properties": { "contextId": { "type": "string", "description": "Browserbase context ID" } }, "required": [ "contextId" ] }, "SessionResponseDto": { "type": "object", "properties": { "sessionId": { "type": "string" }, "liveViewUrl": { "type": "string" } }, "required": [ "sessionId", "liveViewUrl" ] }, "CloseSessionDto": { "type": "object", "properties": { "sessionId": { "type": "string", "description": "Browserbase session ID" } }, "required": [ "sessionId" ] }, "NavigateToUrlDto": { "type": "object", "properties": { "sessionId": { "type": "string", "description": "Browserbase session ID" }, "url": { "type": "string", "description": "URL to navigate to" } }, "required": [ "sessionId", "url" ] }, "CheckAuthDto": { "type": "object", "properties": { "sessionId": { "type": "string", "description": "Browserbase session ID" }, "url": { "type": "string", "description": "URL to check auth status on" } }, "required": [ "sessionId", "url" ] }, "AuthStatusResponseDto": { "type": "object", "properties": { "isLoggedIn": { "type": "boolean" }, "username": { "type": "string" } }, "required": [ "isLoggedIn" ] }, "CreateBrowserAutomationDto": { "type": "object", "properties": { "taskId": { "type": "string", "description": "Task ID this automation belongs to" }, "name": { "type": "string", "description": "Automation name" }, "description": { "type": "string", "description": "Automation description" }, "targetUrl": { "type": "string", "description": "Target URL to start from" }, "instruction": { "type": "string", "description": "Natural language instruction for navigation" }, "schedule": { "type": "string", "description": "Cron schedule expression" } }, "required": [ "taskId", "name", "targetUrl", "instruction" ] }, "BrowserAutomationResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "taskId": { "type": "string" }, "targetUrl": { "type": "string" }, "instruction": { "type": "string" }, "isEnabled": { "type": "boolean" }, "schedule": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": [ "id", "name", "taskId", "targetUrl", "instruction", "isEnabled", "createdAt", "updatedAt" ] }, "UpdateBrowserAutomationDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Automation name" }, "description": { "type": "string", "description": "Automation description" }, "targetUrl": { "type": "string", "description": "Target URL to start from" }, "instruction": { "type": "string", "description": "Natural language instruction" }, "schedule": { "type": "string", "description": "Cron schedule expression" }, "isEnabled": { "type": "boolean", "description": "Whether automation is enabled" } } }, "RunAutomationResponseDto": { "type": "object", "properties": { "runId": { "type": "string" }, "success": { "type": "boolean" }, "screenshotUrl": { "type": "string" }, "error": { "type": "string" }, "needsReauth": { "type": "boolean" } }, "required": [ "runId", "success" ] }, "BrowserAutomationRunResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "automationId": { "type": "string" }, "status": { "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "completedAt": { "format": "date-time", "type": "string" }, "durationMs": { "type": "number" }, "screenshotUrl": { "type": "string" }, "error": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" } }, "required": [ "id", "automationId", "status", "createdAt" ] }, "TaskItemAssigneeDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Member ID" }, "user": { "type": "object", "description": "User information" } }, "required": [ "id", "user" ] }, "TaskItemCreatorDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Member ID" }, "user": { "type": "object", "description": "User information" } }, "required": [ "id", "user" ] }, "TaskItemUpdaterDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Member ID" }, "user": { "type": "object", "description": "User information" } }, "required": [ "id", "user" ] }, "TaskItemResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Task item ID", "example": "tski_abc123def456" }, "title": { "type": "string", "description": "Task title", "example": "Review vendor contract" }, "description": { "type": "object", "description": "Task description", "nullable": true }, "status": { "type": "string", "description": "Task status", "enum": [ "todo", "in_progress", "in_review", "done", "canceled" ] }, "priority": { "type": "string", "description": "Task priority", "enum": [ "urgent", "high", "medium", "low" ] }, "entityId": { "type": "string", "description": "ID of the entity this task belongs to" }, "entityType": { "type": "string", "description": "Type of entity", "enum": [ "vendor", "risk" ] }, "assignee": { "description": "Assignee information", "nullable": true, "allOf": [ { "$ref": "#/components/schemas/TaskItemAssigneeDto" } ] }, "createdBy": { "description": "Creator information", "allOf": [ { "$ref": "#/components/schemas/TaskItemCreatorDto" } ] }, "updatedBy": { "description": "Last updater information", "nullable": true, "allOf": [ { "$ref": "#/components/schemas/TaskItemUpdaterDto" } ] }, "createdAt": { "format": "date-time", "type": "string", "description": "Creation timestamp" }, "updatedAt": { "format": "date-time", "type": "string", "description": "Last update timestamp" } }, "required": [ "id", "title", "description", "status", "priority", "entityId", "entityType", "assignee", "createdBy", "updatedBy", "createdAt", "updatedAt" ] }, "PaginationMetaDto": { "type": "object", "properties": { "page": { "type": "number", "description": "Current page number" }, "limit": { "type": "number", "description": "Number of items per page" }, "total": { "type": "number", "description": "Total number of items" }, "totalPages": { "type": "number", "description": "Total number of pages" }, "hasNextPage": { "type": "boolean", "description": "Whether there are more pages" }, "hasPrevPage": { "type": "boolean", "description": "Whether there are previous pages" } }, "required": [ "page", "limit", "total", "totalPages", "hasNextPage", "hasPrevPage" ] }, "PaginatedTaskItemResponseDto": { "type": "object", "properties": { "data": { "description": "Array of task items", "type": "array", "items": { "$ref": "#/components/schemas/TaskItemResponseDto" } }, "meta": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationMetaDto" } ] } }, "required": [ "data", "meta" ] }, "CreateTaskItemDto": { "type": "object", "properties": { "title": { "type": "string", "description": "Task title", "example": "Review vendor contract" }, "description": { "type": "string", "description": "Task description" }, "status": { "type": "string", "description": "Task status", "enum": [ "todo", "in_progress", "in_review", "done", "canceled" ], "default": "todo" }, "priority": { "type": "string", "description": "Task priority", "enum": [ "urgent", "high", "medium", "low" ], "default": "medium" }, "entityId": { "type": "string", "description": "ID of the entity this task belongs to" }, "entityType": { "type": "string", "description": "Type of entity", "enum": [ "vendor", "risk" ], "example": "vendor" }, "assigneeId": { "type": "string", "description": "Assignee member ID" } }, "required": [ "title", "entityId", "entityType" ] }, "UpdateTaskItemDto": { "type": "object", "properties": { "title": { "type": "string", "description": "Task title" }, "description": { "type": "string", "description": "Task description" }, "status": { "type": "string", "description": "Task status", "enum": [ "todo", "in_progress", "in_review", "done", "canceled" ] }, "priority": { "type": "string", "description": "Task priority", "enum": [ "urgent", "high", "medium", "low" ] }, "assigneeId": { "type": "object", "description": "Assignee member ID (set to null to unassign)", "nullable": true } } }, "UploadTaskItemAttachmentDto": { "type": "object", "properties": { "fileName": { "type": "string", "description": "Name of the file", "example": "document.pdf", "maxLength": 255 }, "fileType": { "type": "string", "description": "MIME type of the file", "example": "application/pdf" }, "fileData": { "type": "string", "description": "Base64 encoded file data", "example": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==" }, "entityType": { "type": "string", "description": "Type of entity this task item belongs to (vendor or risk)", "enum": [ "vendor", "risk" ], "example": "vendor" }, "entityId": { "type": "string", "description": "ID of the entity this task item belongs to", "example": "vnd_abc123def456" } }, "required": [ "fileName", "fileType", "fileData", "entityType", "entityId" ] }, "AssistantChatMessageDto": { "type": "object", "properties": { "id": { "type": "string", "example": "msg_abc123" }, "role": { "type": "string", "enum": [ "user", "assistant" ], "example": "user" }, "text": { "type": "string", "example": "How do I invite a teammate?" }, "createdAt": { "type": "number", "example": 1735781554000, "description": "Unix epoch millis" } }, "required": [ "id", "role", "text", "createdAt" ] }, "SaveAssistantChatHistoryDto": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/components/schemas/AssistantChatMessageDto" } } }, "required": [ "messages" ] }, "CreateRoleDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the custom role", "example": "Compliance Lead", "minLength": 2, "maxLength": 50 }, "permissions": { "type": "object", "description": "Permissions for the role. Keys are resource names, values are arrays of allowed actions.", "example": { "control": [ "read", "update" ], "policy": [ "read", "update" ], "risk": [ "read" ] } }, "obligations": { "type": "object", "description": "Obligations for the role. Boolean flags for requirements like compliance.", "example": { "compliance": true } } }, "required": [ "name", "permissions" ] }, "UpdateRoleDto": { "type": "object", "properties": { "name": { "type": "string", "description": "New name for the custom role", "example": "Compliance Manager", "minLength": 2, "maxLength": 50 }, "permissions": { "type": "object", "description": "Updated permissions for the role. Keys are resource names, values are arrays of allowed actions.", "example": { "control": [ "read", "update", "delete" ], "policy": [ "read", "update", "delete" ], "risk": [ "read", "update" ] } }, "obligations": { "type": "object", "description": "Updated obligations for the role.", "example": { "compliance": true } } } }, "SendTrainingCompletionDto": { "type": "object", "properties": { "memberId": { "type": "string", "description": "The member ID who completed training", "example": "mem_abc123" }, "organizationId": { "type": "string", "description": "Organization ID (deprecated — use auth context)", "example": "org_abc123" } }, "required": [ "memberId" ] }, "SendTrainingCompletionResponseDto": { "type": "object", "properties": { "sent": { "type": "boolean", "description": "Whether the email was sent", "example": true }, "reason": { "type": "string", "description": "Reason if email was not sent", "example": "training_not_complete" } }, "required": [ "sent" ] }, "UploadOrgChartDto": { "type": "object", "properties": { "fileName": { "type": "string", "description": "Original file name" }, "fileType": { "type": "string", "description": "MIME type of the file (e.g. image/png)" }, "fileData": { "type": "string", "description": "Base64-encoded file data" } }, "required": [ "fileName", "fileType", "fileData" ] }, "AddFrameworksDto": { "type": "object", "properties": { "frameworkIds": { "description": "Array of framework editor framework IDs to add", "minItems": 1, "type": "array", "items": { "type": "string" } } }, "required": [ "frameworkIds" ] }, "RequirementMappingDto": { "type": "object", "properties": { "requirementId": { "type": "string", "description": "Requirement ID" }, "frameworkInstanceId": { "type": "string", "description": "Framework instance ID" } }, "required": [ "requirementId", "frameworkInstanceId" ] }, "CreateControlDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Control name", "example": "Access Control" }, "description": { "type": "string", "description": "Control description", "example": "Manages user access to systems" }, "policyIds": { "description": "Policy IDs to connect", "type": "array", "items": { "type": "string" } }, "taskIds": { "description": "Task IDs to connect", "type": "array", "items": { "type": "string" } }, "requirementMappings": { "description": "Requirement mappings", "type": "array", "items": { "$ref": "#/components/schemas/RequirementMappingDto" } } }, "required": [ "name", "description" ] }, "SendEmailDto": { "type": "object", "properties": { "to": { "type": "string", "description": "Recipient email address" }, "subject": { "type": "string", "description": "Email subject line" }, "html": { "type": "string", "description": "Pre-rendered HTML content" }, "from": { "type": "string", "description": "Explicit FROM address override" }, "system": { "type": "boolean", "description": "Use system sender address (RESEND_FROM_SYSTEM)" }, "cc": { "type": "object", "description": "CC recipients" }, "scheduledAt": { "type": "string", "description": "Schedule email for later delivery" }, "attachments": { "description": "File attachments", "type": "array", "items": { "type": "string" } } }, "required": [ "to", "subject", "html" ] }, "CreatePenetrationTestDto": { "type": "object", "properties": { "targetUrl": { "type": "string", "description": "Target URL for the penetration test scan", "example": "https://app.example.com" }, "repoUrl": { "type": "string", "description": "Repository URL containing the target application code", "example": "https://github.com/org/repo" }, "githubToken": { "type": "string", "description": "GitHub token used for cloning private repositories" }, "configYaml": { "type": "string", "description": "Optional YAML configuration for the pentest run" }, "pipelineTesting": { "type": "boolean", "description": "Whether to enable pipeline testing mode", "default": false }, "workspace": { "type": "string", "description": "Workspace identifier used by the pentest engine" }, "webhookUrl": { "type": "string", "description": "Optional webhook URL to notify when report generation completes" }, "testMode": { "type": "boolean", "description": "Whether to run the pentest in simulation mode", "default": false } }, "required": [ "targetUrl" ] }, "SubscribeDto": { "type": "object", "properties": {} }, "HandleSuccessDto": { "type": "object", "properties": {} }, "PortalDto": { "type": "object", "properties": {} }, "ChargeDto": { "type": "object", "properties": {} } } } }