Download OpenAPI specification:
Comprehensive API for TecHunter platform - a technology management and collaboration system.
The API uses JWT Bearer tokens for authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
Determine available authentication methods for a given email (login flow)
| email required | string <email> User's email address to check authentication methods |
{- "email": "john.doe@example.com"
}{- "success": true,
- "message": "Authentication methods retrieved successfully",
- "data": {
- "email": "john.doe@example.com",
- "methods": [
- "firebase",
- "otp"
], - "userExists": true
}
}Authenticate existing users using Firebase OAuth token
| firebaseToken required | string Firebase authentication token |
| provider | string Enum: "google" "github" "microsoft" "apple" "twitter" "facebook" OAuth provider used (optional) |
{- "firebaseToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjFm...",
- "provider": "google"
}{- "success": true,
- "message": "Authentication successful",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin",
- "permissions": [
- "create_user_any_department",
- "manage_projects"
]
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "updatedAt": "2024-01-15T10:30:00Z"
}, - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expiresIn": 3600
}
}Send OTP to email for existing users login
| email required | string <email> User's email address to send OTP |
{- "email": "john.doe@example.com"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Verify OTP and authenticate existing user
| email required | string <email> User's email address |
| otp required | string^[0-9]{6}$ 6-digit OTP code |
{- "email": "john.doe@example.com",
- "otp": "123456"
}{- "success": true,
- "message": "Authentication successful",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin",
- "permissions": [
- "create_user_any_department",
- "manage_projects"
]
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "updatedAt": "2024-01-15T10:30:00Z"
}, - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expiresIn": 3600
}
}Create a new user account using Firebase OAuth (requires admin permissions)
| email required | string <email> User's email address |
| name required | string [ 1 .. 100 ] characters User's full name |
| departmentId | integer >= 1 Department ID (optional) |
| roleIds | Array of integers[ items >= 1 ] Array of role IDs to assign to user (optional) |
{- "email": "john.doe@example.com",
- "name": "John Doe",
- "departmentId": 1,
- "roleIds": [
- 1,
- 2
]
}{- "success": true,
- "message": "User created successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "country": "United States",
- "signInMethods": [
- "otp",
- "firebase"
], - "roleHistory": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
], - "permissionOverrides": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
], - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}, - "updatedAt": "2024-01-15T10:30:00Z"
}, - "temporaryAccess": {
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expiresIn": 1800
}
}
}Create a new user account with OTP authentication (requires admin permissions)
| email required | string <email> User's email address |
| name required | string [ 1 .. 100 ] characters User's full name |
| departmentId | integer >= 1 Department ID (optional) |
| roleIds | Array of integers[ items >= 1 ] Array of role IDs to assign to user (optional) |
| sendWelcomeEmail | boolean Default: true Whether to send welcome email to new user |
{- "email": "john.doe@example.com",
- "name": "John Doe",
- "departmentId": 1,
- "roleIds": [
- 1,
- 2
], - "sendWelcomeEmail": true
}{- "success": true,
- "message": "User created successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "country": "United States",
- "signInMethods": [
- "otp",
- "firebase"
], - "roleHistory": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
], - "permissionOverrides": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
], - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}, - "updatedAt": "2024-01-15T10:30:00Z"
}, - "temporaryAccess": {
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expiresIn": 1800
}
}
}Get a new JWT access token using refresh token
| refreshToken required | string Valid refresh token |
{- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}{- "success": true,
- "message": "Authentication successful",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin",
- "permissions": [
- "create_user_any_department",
- "manage_projects"
]
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "updatedAt": "2024-01-15T10:30:00Z"
}, - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expiresIn": 3600
}
}Invalidate the current JWT token and optionally the refresh token
| refreshToken | string Refresh token to invalidate (optional) |
{- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Retrieve the authenticated user's profile information
{- "success": true,
- "message": "Profile retrieved successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin",
- "permissions": [
- "create_user_any_department",
- "manage_projects"
]
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "updatedAt": "2024-01-15T10:30:00Z",
- "preferences": {
- "theme": "dark",
- "language": "en",
- "notifications": {
- "email": true,
- "push": false
}
}, - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}
}
}
}Retrieve a paginated list of users with optional filtering by department, role, status, and search
| departmentId | integer >= 1 Example: departmentId=1 Filter by department ID |
| roleId | integer >= 1 Example: roleId=2 Filter by role ID |
| isActive | string Enum: true false Example: isActive=true Filter by user active status |
| search | string [ 1 .. 100 ] characters Example: search=john Search term for user name or email |
| page | integer >= 1 Default: 1 Example: page=1 Page number for pagination |
| limit | integer [ 1 .. 100 ] Default: 20 Example: limit=20 Number of items per page |
{- "success": true,
- "message": "Users retrieved successfully",
- "data": {
- "users": [
- {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z"
}
], - "pagination": {
- "currentPage": 1,
- "totalPages": 10,
- "totalItems": 95,
- "itemsPerPage": 10,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}
}Create a new user account with specified roles and department
| email required | string <email> User's email address |
| name required | string [ 1 .. 100 ] characters User's full name |
| departmentId | integer >= 1 Department ID (optional) |
| roleIds | Array of integers non-empty [ items >= 1 ] Array of role IDs to assign |
| signInMethod | string Enum: "otp" "firebase" Preferred sign-in method |
| sendWelcomeEmail | boolean Default: true Whether to send welcome email |
{- "email": "john.doe@example.com",
- "name": "John Doe",
- "departmentId": 1,
- "roleIds": [
- 1,
- 2
], - "signInMethod": "otp",
- "sendWelcomeEmail": true
}{- "success": true,
- "message": "User created successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "country": "United States",
- "signInMethods": [
- "otp",
- "firebase"
], - "roleHistory": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
], - "permissionOverrides": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
], - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}, - "updatedAt": "2024-01-15T10:30:00Z"
}, - "temporaryAccess": {
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
- "expiresIn": 1800
}
}
}Retrieve detailed information about a specific user
| userId required | integer >= 1 Example: 1 User ID |
{- "success": true,
- "message": "User details retrieved successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "country": "United States",
- "signInMethods": [
- "otp",
- "firebase"
], - "roleHistory": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
], - "permissionOverrides": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
], - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}, - "updatedAt": "2024-01-15T10:30:00Z"
}
}
}Update user profile information including name, department, and country (requires admin permissions)
| userId required | integer >= 1 Example: 1 User ID |
| name | string [ 1 .. 100 ] characters User's full name |
| departmentId | integer or null >= 1 Department ID (null for system-wide users) |
| country | string [ 2 .. 50 ] characters User's country |
{- "name": "John Doe",
- "departmentId": 1,
- "country": "United States"
}{- "success": true,
- "message": "User details retrieved successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "country": "United States",
- "signInMethods": [
- "otp",
- "firebase"
], - "roleHistory": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
], - "permissionOverrides": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
], - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}, - "updatedAt": "2024-01-15T10:30:00Z"
}
}
}Update authenticated user's own profile information
| name | string [ 1 .. 100 ] characters User's full name |
| country | string [ 2 .. 50 ] characters User's country |
{- "name": "John Doe",
- "country": "United States"
}{- "success": true,
- "message": "User details retrieved successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "country": "United States",
- "signInMethods": [
- "otp",
- "firebase"
], - "roleHistory": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
], - "permissionOverrides": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
], - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}, - "updatedAt": "2024-01-15T10:30:00Z"
}
}
}Update user's assigned roles and department
| userId required | integer >= 1 Example: 1 User ID |
| roleIds required | Array of integers non-empty [ items >= 1 ] Array of role IDs to assign |
| departmentId | integer >= 1 Department ID (optional) |
{- "roleIds": [
- 1,
- 2,
- 3
], - "departmentId": 1
}{- "success": true,
- "message": "User details retrieved successfully",
- "data": {
- "user": {
- "id": 1,
- "email": "john.doe@example.com",
- "name": "John Doe",
- "department": {
- "id": 1,
- "name": "Engineering"
}, - "roles": [
- {
- "id": 1,
- "name": "Admin"
}
], - "isActive": true,
- "lastLoginAt": "2024-01-15T10:30:00Z",
- "createdAt": "2024-01-15T10:30:00Z",
- "country": "United States",
- "signInMethods": [
- "otp",
- "firebase"
], - "roleHistory": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
], - "permissionOverrides": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
], - "stats": {
- "projectsCount": 5,
- "threadsCount": 12,
- "assetsCount": 8
}, - "updatedAt": "2024-01-15T10:30:00Z"
}
}
}Retrieve complete history of role assignments for a user
| userId required | integer >= 1 Example: 1 User ID |
{- "success": true,
- "message": "Role history retrieved successfully",
- "data": {
- "history": [
- {
- "id": 1,
- "role": {
- "id": 1,
- "name": "Admin",
- "description": "Full system administrator"
}, - "assignedAt": "2024-01-15T10:30:00Z",
- "assignedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "deactivatedAt": null,
- "deactivatedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Promoted to senior role",
- "isActive": true
}
]
}
}Deactivate a specific role assignment for a user
| userId required | integer >= 1 Example: 1 User ID |
| roleId required | integer >= 1 Example: 2 Role ID |
| reason | string [ 1 .. 500 ] characters Reason for deactivation |
{- "reason": "Role no longer needed for current responsibilities"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Reactivate a previously deactivated role assignment for a user
| userId required | integer >= 1 Example: 1 User ID |
| roleId required | integer >= 1 Example: 2 Role ID |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Deactivate a user account
| userId required | integer >= 1 Example: 1 User ID |
| reason | string [ 1 .. 500 ] characters Reason for deactivation |
{- "reason": "User left the organization"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Retrieve user-specific permission overrides (not from roles)
| userId required | integer >= 1 Example: 1 User ID |
{- "success": true,
- "message": "User permissions retrieved successfully",
- "data": {
- "permissions": [
- {
- "id": 1,
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "grantedAt": "2024-01-15T10:30:00Z",
- "grantedBy": {
- "id": 2,
- "name": "Jane Smith",
- "email": "jane.smith@example.com"
}, - "reason": "Temporary project lead responsibilities",
- "expiresAt": null
}
]
}
}Grant specific permissions to user (override role permissions)
| userId required | integer >= 1 Example: 1 User ID |
| permissionIds required | Array of integers non-empty [ items >= 1 ] Array of permission IDs to grant |
| scope | string Enum: "own" "department" "any" "assigned" Permission scope |
| reason | string [ 1 .. 500 ] characters Reason for granting permissions |
{- "permissionIds": [
- 1,
- 2,
- 3
], - "scope": "department",
- "reason": "Temporary project lead responsibilities"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Update all user-specific permission overrides
| userId required | integer >= 1 Example: 1 User ID |
| permissionIds required | Array of integers[ items >= 1 ] Array of permission IDs (empty array removes all overrides) |
| scope | string Enum: "own" "department" "any" "assigned" Permission scope |
| reason | string [ 1 .. 500 ] characters Reason for updating permissions |
{- "permissionIds": [
- 1,
- 2,
- 3
], - "scope": "department",
- "reason": "Role change requires different access levels"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Remove a specific permission override from user
| userId required | integer >= 1 Example: 1 User ID |
| permissionId required | integer >= 1 Example: 5 Permission ID |
| reason | string [ 1 .. 500 ] characters Reason for revoking permission |
{- "reason": "Permission no longer required"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Get combined permissions from roles and user-specific overrides
| userId required | integer >= 1 Example: 1 User ID |
| context | string Enum: "department" "system" "project" Example: context=department Permission context filter |
{- "success": true,
- "message": "Effective permissions retrieved successfully",
- "data": {
- "permissions": [
- {
- "permission": {
- "id": 5,
- "name": "manage_department_users",
- "description": "Manage users within department",
- "category": "user_management"
}, - "scope": "department",
- "source": "role",
- "sourceDetails": {
- "roleId": 1,
- "roleName": "Admin",
- "overrideId": null
}, - "inherited": true,
- "canBeOverridden": true
}
], - "sources": {
- "fromRoles": [
- "view_users",
- "create_projects"
], - "fromOverrides": [
- "manage_department_users"
]
}
}
}Retrieve a paginated list of both internal and external assets with filtering options
| page | integer >= 1 Default: 1 Example: page=1 Page number for pagination |
| limit | integer [ 1 .. 100 ] Default: 20 Example: limit=20 Number of items per page |
| asset_type | string Default: "all" Enum: "all" "internal" "external" Example: asset_type=all Filter by asset type |
| search | string <= 100 characters Example: search=technology report Search term for asset title, description, or filename |
| is_active | string Enum: true false Example: is_active=true Filter by active status |
| sort_by | string Default: "created_at" Enum: "created_at" "updated_at" "title" "file_name" "file_size" Example: sort_by=created_at Field to sort by |
| sort_order | string Default: "DESC" Enum: "ASC" "DESC" Example: sort_order=DESC Sort order |
{- "success": true,
- "message": "Assets retrieved successfully",
- "data": {
- "assets": [
- {
- "id": 1,
- "asset_type": "internal",
- "title": "AI Technology Report 2024",
- "description": "Comprehensive analysis of AI trends",
- "file_name": "ai-report-2024.pdf",
- "file_size": 2048000,
- "file_type": "application/pdf",
- "is_active": true,
- "processing_status": "completed",
- "upload_context": "Q1 2024 Technology Reports",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T10:30:00Z",
- "uploaded_by": 1
}
], - "pagination": {
- "currentPage": 1,
- "totalPages": 10,
- "totalItems": 95,
- "itemsPerPage": 10,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}
}Retrieve detailed information about a specific internal or external asset
| type required | string Enum: "internal" "external" Example: internal Asset type |
| id required | integer >= 1 Example: 1 Asset ID |
{- "success": true,
- "message": "Asset retrieved successfully",
- "data": {
- "asset": {
- "id": 1,
- "asset_type": "internal",
- "title": "AI Technology Report 2024",
- "description": "Comprehensive analysis of AI trends",
- "file_name": "ai-report-2024.pdf",
- "file_size": 2048000,
- "file_type": "application/pdf",
- "is_active": true,
- "processing_status": "completed",
- "upload_context": "Q1 2024 Technology Reports",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T10:30:00Z",
- "uploaded_by": 1,
- "type": "internal",
- "metadata": [
- {
- "id": 1,
- "name": "Artificial Intelligence",
- "description": "AI and machine learning technologies",
- "category": "technology",
- "confidence_score": 0.95,
- "source": "auto",
- "is_verified": true,
- "assigned_at": "2024-01-15T10:30:00Z",
- "type": "topic"
}
], - "uploader": {
- "id": 1,
- "name": "John Doe",
- "email": "john.doe@example.com"
}, - "tags": [
- {
- "id": 5,
- "name": "artificial-intelligence",
- "category": "technology",
- "description": "AI and machine learning",
- "confidence_score": 0.85,
- "source": "ai",
- "is_verified": false,
- "assigned_at": "2024-01-15T10:30:00Z",
- "verified_at": null
}
], - "topics": [
- {
- "id": 1,
- "name": "Artificial Intelligence",
- "description": "AI technologies and applications",
- "assigned_at": "2024-01-15T10:30:00Z",
- "assigned_by": 2
}
]
}
}
}Retrieve comprehensive statistics for assets dashboard
| type | string Default: "all" Enum: "all" "internal" "external" Example: type=all Filter statistics by asset type |
{- "success": true,
- "message": "Dashboard statistics retrieved successfully",
- "data": {
- "internal": {
- "total_assets": 150,
- "active_assets": 142,
- "inactive_assets": 8,
- "total_file_size": 1073741824
}, - "external": {
- "total_assets": 87,
- "active_assets": 82,
- "inactive_assets": 5,
- "processed_assets": 75,
- "pending_assets": 7,
- "total_file_size": 2147483648
}, - "combined": {
- "total_assets": 237,
- "active_assets": 224,
- "inactive_assets": 13,
- "total_file_size": 3221225472
}, - "tags": {
- "total_tags": 45,
- "verified_tags": 32,
- "auto_assigned_tags": 87,
- "manual_assigned_tags": 23
}
}
}Search for assets across internal and external types with relevance scoring
| q required | string [ 1 .. 100 ] characters Example: q=AI technology Search term |
| type | string Default: "all" Enum: "all" "internal" "external" Example: type=all Asset type to search |
| page | integer >= 1 Default: 1 Example: page=1 Page number |
| limit | integer [ 1 .. 100 ] Default: 20 Example: limit=20 Items per page |
object Example: filters={"is_active": true} Additional filters (JSON object) |
{- "success": true,
- "message": "Search completed successfully",
- "data": {
- "results": [
- {
- "id": 1,
- "asset_type": "internal",
- "title": "AI Technology Report 2024",
- "description": "Comprehensive analysis of AI trends",
- "file_name": "ai-report-2024.pdf",
- "file_size": 2048000,
- "file_type": "application/pdf",
- "is_active": true,
- "processing_status": "completed",
- "upload_context": "Q1 2024 Technology Reports",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T10:30:00Z",
- "uploaded_by": 1,
- "relevance_score": 85.5,
- "matched_fields": [
- "title",
- "description"
]
}
], - "search_term": "AI technology",
- "total_found": 25,
- "pagination": {
- "currentPage": 1,
- "totalPages": 10,
- "totalItems": 95,
- "itemsPerPage": 10,
- "hasNextPage": true,
- "hasPreviousPage": false
}
}
}Retrieve internal assets associated with a specific topic
| topicId required | integer >= 1 Example: 1 Topic ID |
{- "success": true,
- "message": "Topic assets retrieved successfully",
- "data": {
- "assets": [
- {
- "id": 1,
- "title": "Technology Offer - AI Processing",
- "description": "Advanced AI processing technology",
- "to_tn_number": "TO-2024-001",
- "file_name": "to-2024-001.pdf",
- "file_size": 1024000,
- "file_type": "application/pdf",
- "is_active": true,
- "webhook_status": "completed",
- "created_at": "2024-01-15T10:30:00Z"
}
], - "topic": {
- "id": 1,
- "name": "Artificial Intelligence",
- "description": "AI technologies and applications"
}
}
}Retrieve topics associated with an internal asset
| id required | integer >= 1 Example: 1 Internal asset ID |
{- "success": true,
- "message": "Asset topics retrieved successfully",
- "data": {
- "topics": [
- {
- "id": 1,
- "name": "Artificial Intelligence",
- "description": "AI technologies and applications",
- "assigned_at": "2024-01-15T10:30:00Z",
- "assigned_by": 2
}
]
}
}Retrieve internal asset by TO/TN reference number
| toNumber required | string Example: TO-2024-001 TO/TN reference number |
{- "success": true,
- "message": "Asset retrieved successfully",
- "data": {
- "asset": {
- "id": 1,
- "asset_type": "internal",
- "title": "AI Technology Report 2024",
- "description": "Comprehensive analysis of AI trends",
- "file_name": "ai-report-2024.pdf",
- "file_size": 2048000,
- "file_type": "application/pdf",
- "is_active": true,
- "processing_status": "completed",
- "upload_context": "Q1 2024 Technology Reports",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T10:30:00Z",
- "uploaded_by": 1,
- "type": "internal",
- "metadata": [
- {
- "id": 1,
- "name": "Artificial Intelligence",
- "description": "AI and machine learning technologies",
- "category": "technology",
- "confidence_score": 0.95,
- "source": "auto",
- "is_verified": true,
- "assigned_at": "2024-01-15T10:30:00Z",
- "type": "topic"
}
], - "uploader": {
- "id": 1,
- "name": "John Doe",
- "email": "john.doe@example.com"
}, - "tags": [
- {
- "id": 5,
- "name": "artificial-intelligence",
- "category": "technology",
- "description": "AI and machine learning",
- "confidence_score": 0.85,
- "source": "ai",
- "is_verified": false,
- "assigned_at": "2024-01-15T10:30:00Z",
- "verified_at": null
}
], - "topics": [
- {
- "id": 1,
- "name": "Artificial Intelligence",
- "description": "AI technologies and applications",
- "assigned_at": "2024-01-15T10:30:00Z",
- "assigned_by": 2
}
]
}
}
}Generate a signed URL for accessing internal asset file
| id required | integer >= 1 Example: 1 Internal asset ID |
{- "success": true,
- "message": "Signed URL generated successfully",
- "data": {
- "expires_at": "2024-01-15T12:30:00Z"
}
}Manually trigger ingestion process for an internal asset
| id required | integer >= 1 Example: 1 Internal asset ID |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Upload multiple external assets with metadata
| files | Array of strings <binary> <= 10 items [ items <binary > ] Files to upload (max 10 files, 100MB each) |
| upload_context | string <= 255 characters Context for the upload batch |
| tags | Array of integers[ items >= 1 ] Tag IDs to automatically assign to uploaded assets |
| auto_process | boolean Default: true Whether to automatically start processing after upload |
{- "success": true,
- "message": "Assets uploaded successfully",
- "data": {
- "upload_id": "upload_123456",
- "assets": [
- {
- "id": 123,
- "original_file_name": "report.pdf",
- "file_size": 2048000,
- "mime_type": "application/pdf",
- "processing_status": "pending",
- "uploaded_at": "2024-01-15T10:30:00Z"
}
], - "total_uploaded": 5,
- "processing_started": true
}
}Generate a download URL for an external asset
| id required | integer >= 1 Example: 1 External asset ID |
{- "success": true,
- "message": "Download URL generated successfully",
- "data": {
- "expires_at": "2024-01-15T12:30:00Z",
- "filename": "technology-report.pdf"
}
}Permanently delete an external asset and its associated data
| id required | integer >= 1 Example: 1 External asset ID |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Trigger reprocessing of an external asset
| id required | integer >= 1 Example: 1 External asset ID |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Associate an external asset with a thread
| id required | integer >= 1 Example: 1 External asset ID |
| threadId required | integer >= 1 Thread ID to map asset to |
| relationship | string Default: "attachment" Enum: "attachment" "reference" "supporting_doc" Type of relationship to thread |
{- "threadId": 42,
- "relationship": "attachment"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Associate an external asset with a conversation
| id required | integer >= 1 Example: 1 External asset ID |
| conversationId required | integer >= 1 Conversation ID to map asset to |
| relationship | string Default: "attachment" Enum: "attachment" "reference" "supporting_doc" Type of relationship to conversation |
{- "conversationId": 15,
- "relationship": "reference"
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Remove an asset mapping (thread or conversation association)
| id required | integer >= 1 Example: 1 External asset ID |
| mappingId required | integer >= 1 Example: 3 Mapping ID |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Retrieve status of a specific upload batch
| uploadId required | string Example: upload_123456 Upload batch ID |
{- "success": true,
- "message": "Upload status retrieved successfully",
- "data": {
- "upload_id": "upload_123456",
- "status": "processing",
- "total_files": 5,
- "processed_files": 3,
- "failed_files": 0,
- "created_at": "2024-01-15T10:00:00Z",
- "completed_at": null
}
}Retrieve processing status of a specific external asset
| id required | integer >= 1 Example: 1 External asset ID |
{- "success": true,
- "message": "Asset status retrieved successfully",
- "data": {
- "asset_id": 1,
- "processing_status": "completed",
- "processing_progress": 100,
- "last_processed_at": "2024-01-15T10:30:00Z",
- "error_message": null
}
}Retrieve overall processing queue status and statistics
{- "success": true,
- "message": "Processing status retrieved successfully",
- "data": {
- "queue_stats": {
- "pending": 5,
- "processing": 2,
- "completed_today": 47,
- "failed_today": 1
}, - "processing_capacity": {
- "max_concurrent": 10,
- "current_active": 2,
- "estimated_wait_time": "5 minutes"
}
}
}Retrieve configuration for allowed file types, extensions, and size limits
{- "success": true,
- "message": "Allowed file types retrieved successfully",
- "data": {
- "extensions": [
- ".pdf",
- ".docx",
- ".pptx",
- ".xlsx",
- ".txt",
- ".md"
], - "mime_types": [
- "application/pdf",
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
], - "size_limits": {
- "max_file_size": "100MB",
- "max_files_per_upload": 10,
- "max_field_size": "1MB"
}
}
}Retrieve tag cloud data for visualization
{- "success": true,
- "message": "Tag cloud data retrieved successfully",
- "data": {
- "tags": [
- {
- "id": 5,
- "name": "artificial-intelligence",
- "weight": 0.85,
- "count": 23,
- "category": "technology"
}
]
}
}Execute bulk operations like tagging, status changes, or deletions
| operation required | string Enum: "add_tags" "remove_tags" "activate" "deactivate" "delete" "reprocess" Bulk operation to perform |
| assetIds required | Array of integers [ 1 .. 100 ] items [ items >= 1 ] Array of asset IDs to operate on |
object Operation-specific parameters |
{- "operation": "add_tags",
- "assetIds": [
- 1,
- 2,
- 3,
- 4,
- 5
], - "parameters": {
- "tagIds": [
- 1,
- 2
], - "reason": "Batch deactivation for cleanup"
}
}{- "success": true,
- "message": "Bulk operations completed successfully",
- "data": {
- "operation": "add_tags",
- "total_requested": 5,
- "successful": 4,
- "failed": 1,
- "results": [
- {
- "asset_id": 1,
- "status": "success",
- "message": null,
- "error": "Asset not found"
}
]
}
}Get all threads with filtering, pagination, and access control
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 100 ] Default: 20 |
| search | string Search in thread title and description |
| status | string Enum: "active" "completed" "on_hold" "archived" |
| department_id | integer |
| project_id | integer |
| created_by | integer |
| priority | string Enum: "low" "medium" "high" "urgent" |
| has_techneed | boolean |
| date_from | string <date> |
| date_to | string <date> |
| sort_by | string Default: "created_at" Enum: "created_at" "updated_at" "title" "status" |
| sort_order | string Default: "DESC" Enum: "ASC" "DESC" |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "threads": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "title": "string",
- "description": "string",
- "status": "active",
- "priority": "low",
- "project_id": 0,
- "department_id": 0,
- "created_by": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_archived": true,
- "metadata": {
- "openai_conversation_id": "string"
}, - "conversation_count": 0,
- "unread_count": 0
}
], - "pagination": {
- "current_page": 1,
- "total_pages": 10,
- "total_items": 200,
- "items_per_page": 20,
- "has_next_page": true,
- "has_prev_page": false
}
}Create a new thread with OpenAI conversation
| title required | string [ 1 .. 255 ] characters Thread title (auto-processed for proper case) |
| description required | string non-empty Thread description |
| project_id | integer Associated project ID |
| department_id | integer Department ID (defaults to user's department) |
| priority | string Default: "medium" Enum: "low" "medium" "high" "urgent" |
| metadata | object Additional thread metadata |
{- "title": "string",
- "description": "string",
- "project_id": 0,
- "department_id": 0,
- "priority": "low",
- "metadata": { }
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "thread": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "title": "string",
- "description": "string",
- "openai_conversation_id": "string",
- "created_at": "2019-08-24T14:15:22Z"
}
}Get 3-10 most recently updated threads user has access to
| limit | integer [ 3 .. 10 ] Default: 5 Number of threads to return |
| include_archived | boolean Default: false Include archived threads |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "threads": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "title": "string",
- "description": "string",
- "status": "active",
- "priority": "low",
- "project_id": 0,
- "department_id": 0,
- "created_by": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_archived": true,
- "metadata": {
- "openai_conversation_id": "string"
}, - "conversation_count": 0,
- "unread_count": 0
}
]
}Get detailed information about a specific thread
| threadId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "thread": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "title": "string",
- "description": "string",
- "status": "active",
- "priority": "low",
- "project_id": 0,
- "department_id": 0,
- "created_by": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_archived": true,
- "metadata": {
- "openai_conversation_id": "string"
}, - "conversation_count": 0,
- "unread_count": 0,
- "creator": {
- "id": 0,
- "name": "string",
- "email": "string"
}, - "department": {
- "id": 0,
- "name": "string"
}, - "project": {
- "id": 0,
- "name": "string",
- "description": "string"
}, - "participants": [
- {
- "id": 0,
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "role": "collaborator",
- "permissions": [
- "string"
], - "added_by": 0,
- "added_at": "2019-08-24T14:15:22Z",
- "user": {
- "id": 0,
- "name": "string",
- "email": "string",
- "department": {
- "id": 0,
- "name": "string"
}
}
}
], - "recent_conversations": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "user_message": "string",
- "ai_response": "string",
- "conversation_type": "question",
- "feedback_rating": 1,
- "feedback_comment": "string",
- "is_helpful": true,
- "processing_time_ms": 0,
- "token_usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_read": true,
- "read_at": "2019-08-24T14:15:22Z"
}
], - "assets": [
- {
- "id": 0,
- "file_name": "string",
- "original_file_name": "string",
- "file_type": "string",
- "file_size": 0,
- "mime_type": "string",
- "file_path": "string",
- "uploaded_by": 0,
- "processing_status": "pending",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
}Update thread details (requires appropriate permissions)
| threadId required | string <uuid> |
| title | string [ 1 .. 255 ] characters |
| description | string |
| status | string Enum: "active" "completed" "on_hold" "archived" |
| priority | string Enum: "low" "medium" "high" "urgent" |
| project_id | integer |
| department_id | integer |
| metadata | object |
{- "title": "string",
- "description": "string",
- "status": "active",
- "priority": "low",
- "project_id": 0,
- "department_id": 0,
- "metadata": { }
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "thread": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "title": "string",
- "description": "string",
- "status": "active",
- "priority": "low",
- "project_id": 0,
- "department_id": 0,
- "created_by": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_archived": true,
- "metadata": {
- "openai_conversation_id": "string"
}, - "conversation_count": 0,
- "unread_count": 0
}
}Get all assets associated with a thread
| threadId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "assets": [
- {
- "id": 0,
- "file_name": "string",
- "original_file_name": "string",
- "file_type": "string",
- "file_size": 0,
- "mime_type": "string",
- "file_path": "string",
- "uploaded_by": 0,
- "processing_status": "pending",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}Upload multiple files to a thread (max 10 files, 50MB each)
| threadId required | string <uuid> |
| files | Array of strings <binary> <= 10 items [ items <binary > ] Files to upload (PDF, Word, Excel, text, CSV, JSON) |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "results": [
- {
- "asset": {
- "id": 0,
- "file_name": "string",
- "original_file_name": "string",
- "file_type": "string",
- "file_size": 0,
- "mime_type": "string",
- "file_path": "string",
- "uploaded_by": 0,
- "processing_status": "pending",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "status": "uploaded",
- "is_duplicate": true,
- "error": "string"
}
]
}Associate an existing asset with a thread
| threadId required | string <uuid> |
| asset_id required | integer ID of existing external asset |
{- "asset_id": 0
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Remove asset mapping from thread with OpenAI cleanup
| threadId required | string <uuid> |
| assetId required | integer |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { }
}Get all conversations in a thread with read status
| threadId required | string <uuid> |
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 100 ] Default: 20 |
| sort_order | string Default: "ASC" Enum: "ASC" "DESC" |
| include_read_status | boolean Default: true |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "conversations": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "user_message": "string",
- "ai_response": "string",
- "conversation_type": "question",
- "feedback_rating": 1,
- "feedback_comment": "string",
- "is_helpful": true,
- "processing_time_ms": 0,
- "token_usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_read": true,
- "read_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "current_page": 1,
- "total_pages": 10,
- "total_items": 200,
- "items_per_page": 20,
- "has_next_page": true,
- "has_prev_page": false
}, - "summary": {
- "total_conversations": 0,
- "unread_count": 0
}
}Create a new AI conversation in a thread (streaming response)
| threadId required | string <uuid> |
| message required | string non-empty User message/question for AI |
| conversation_type | string Default: "question" Enum: "question" "request" "analysis" |
| context | object Additional context for the conversation |
{- "message": "string",
- "conversation_type": "question",
- "context": { }
}{- "success": false,
- "message": "Invalid input data",
- "error": {
- "code": "INVALID_INPUT",
- "details": { }
}, - "errors": [
- {
- "field": "string",
- "message": "string",
- "value": "string"
}
]
}Get a specific conversation with read status
| conversationId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "conversation": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "user_message": "string",
- "ai_response": "string",
- "conversation_type": "question",
- "feedback_rating": 1,
- "feedback_comment": "string",
- "is_helpful": true,
- "processing_time_ms": 0,
- "token_usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_read": true,
- "read_at": "2019-08-24T14:15:22Z",
- "user": {
- "id": 0,
- "name": "string",
- "email": "string"
}, - "thread": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "title": "string",
- "created_by": 0,
- "department_id": 0
}
}
}Update conversation feedback/rating
| conversationId required | string <uuid> |
| feedback_rating | integer [ 1 .. 5 ] Rating from 1-5 |
| feedback_comment | string <= 1000 characters Optional feedback comment |
| is_helpful | boolean Whether the conversation was helpful |
{- "feedback_rating": 1,
- "feedback_comment": "string",
- "is_helpful": true
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "conversation": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "user_message": "string",
- "ai_response": "string",
- "conversation_type": "question",
- "feedback_rating": 1,
- "feedback_comment": "string",
- "is_helpful": true,
- "processing_time_ms": 0,
- "token_usage": {
- "prompt_tokens": 0,
- "completion_tokens": 0,
- "total_tokens": 0
}, - "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_read": true,
- "read_at": "2019-08-24T14:15:22Z"
}
}Mark all conversations in a thread as read
| threadId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "marked_count": 0
}Generate AI-powered follow-up questions/suggestions for a conversation
| conversationId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "followups": [
- {
- "id": "string",
- "question": "string",
- "category": "clarification",
- "relevance_score": 1
}
]
}Get all participants/collaborators of a thread
| threadId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "participants": [
- {
- "id": 0,
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "role": "collaborator",
- "permissions": [
- "string"
], - "added_by": 0,
- "added_at": "2019-08-24T14:15:22Z",
- "user": {
- "id": 0,
- "name": "string",
- "email": "string",
- "department": {
- "id": 0,
- "name": "string"
}
}
}
]
}Add a participant/collaborator to a thread
| threadId required | string <uuid> |
| user_id required | integer ID of user to add as participant |
| role | string Default: "collaborator" Enum: "collaborator" "viewer" "contributor" Participant role in the thread |
| permissions | Array of strings Specific permissions for this participant |
{- "user_id": 0,
- "role": "collaborator",
- "permissions": [
- "string"
]
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "participant": {
- "id": 0,
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "role": "collaborator",
- "permissions": [
- "string"
], - "added_by": 0,
- "added_at": "2019-08-24T14:15:22Z",
- "user": {
- "id": 0,
- "name": "string",
- "email": "string",
- "department": {
- "id": 0,
- "name": "string"
}
}
}
}Update participant role/permissions
| threadId required | string <uuid> |
| userId required | integer |
| role | string Enum: "collaborator" "viewer" "contributor" |
| permissions | Array of strings |
{- "role": "collaborator",
- "permissions": [
- "string"
]
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "participant": {
- "id": 0,
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "role": "collaborator",
- "permissions": [
- "string"
], - "added_by": 0,
- "added_at": "2019-08-24T14:15:22Z",
- "user": {
- "id": 0,
- "name": "string",
- "email": "string",
- "department": {
- "id": 0,
- "name": "string"
}
}
}
}Generate a TechNeed document based on thread conversations
| threadId required | string <uuid> |
| title | string Optional custom title for the TechNeed |
| description | string Optional custom description |
| technology_category | string Technology category |
| key_requirements | Array of strings Key technical requirements |
| location | string Location of tech seeker |
| metadata | object Additional metadata for TechNeed generation |
{- "title": "string",
- "description": "string",
- "technology_category": "string",
- "key_requirements": [
- "string"
], - "location": "string",
- "metadata": { }
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "techneed": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "title": "string",
- "description": "string",
- "technology_category": "string",
- "key_requirements": [
- "string"
], - "location_of_tech_seeker": "string",
- "status": "draft",
- "created_by": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "metadata": {
- "prioritize_singapore_companies": true,
- "include_startups": true,
- "budget_range": "string"
}
}
}Generate a comprehensive summary for an existing TechNeed
| threadId required | string <uuid> |
| techNeedId required | string <uuid> |
| Description required | string TechNeed description |
required | object |
| Key_Requirements required | Array of strings Array of key requirements |
| Technology_Category required | string Technology category |
| Location_of_Tech_Seeker required | string Location of tech seeker |
object |
{- "Description": "string",
- "TechNeed": {
- "Title": "string"
}, - "Key_Requirements": [
- "string"
], - "Technology_Category": "string",
- "Location_of_Tech_Seeker": "string",
- "metadata": {
- "prioritizeSingaporeCompanies": true,
- "includeStartups": true,
- "budgetRange": "string"
}
}{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "summary": {
- "title": "string",
- "description": "string",
- "key_points": [
- "string"
], - "generated_at": "2019-08-24T14:15:22Z"
}
}Get all tech offers associated with a thread
| threadId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "offers": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "tech_need_id": "ff436dac-e21c-4a45-9b3b-07241921f574",
- "company_name": "string",
- "solution_title": "string",
- "solution_description": "string",
- "technology_category": "string",
- "relevance_score": 1,
- "contact_email": "user@example.com",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "metadata": { }
}
]
}Submit a TechNeed to external API for tech offer generation
| techNeedId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "submission_id": "string",
- "status": "submitted"
}Get all tech offers for a specific TechNeed
| techNeedId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "offers": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "tech_need_id": "ff436dac-e21c-4a45-9b3b-07241921f574",
- "company_name": "string",
- "solution_title": "string",
- "solution_description": "string",
- "technology_category": "string",
- "relevance_score": 1,
- "contact_email": "user@example.com",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "metadata": { }
}
]
}Get detailed information about a specific tech offer
| techOfferId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "offer": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "tech_need_id": "ff436dac-e21c-4a45-9b3b-07241921f574",
- "company_name": "string",
- "solution_title": "string",
- "solution_description": "string",
- "technology_category": "string",
- "relevance_score": 1,
- "contact_email": "user@example.com",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "metadata": { },
- "tech_need": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "title": "string",
- "description": "string",
- "technology_category": "string",
- "key_requirements": [
- "string"
], - "location_of_tech_seeker": "string",
- "status": "draft",
- "created_by": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "metadata": {
- "prioritize_singapore_companies": true,
- "include_startups": true,
- "budget_range": "string"
}
}, - "ratings": [
- {
- "id": 0,
- "user_id": 0,
- "rating_type": "relevance",
- "rating": 1,
- "comment": "string",
- "created_at": "2019-08-24T14:15:22Z"
}
], - "average_ratings": {
- "relevance": 0,
- "quality": 0,
- "overall": 0
}
}
}Bookmark a thread for the current user
| threadId required | string <uuid> |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "bookmark": {
- "id": 0,
- "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
- "user_id": 0,
- "created_at": "2019-08-24T14:15:22Z"
}
}Get all threads bookmarked by the current user
| page | integer >= 1 Default: 1 |
| limit | integer [ 1 .. 100 ] Default: 20 |
| sort_by | string Default: "created_at" Enum: "created_at" "updated_at" "title" |
| sort_order | string Default: "DESC" Enum: "ASC" "DESC" |
{- "success": true,
- "message": "Operation completed successfully",
- "data": { },
- "bookmarks": [
- {
- "id": 0,
- "thread": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "title": "string",
- "description": "string",
- "status": "active",
- "priority": "low",
- "project_id": 0,
- "department_id": 0,
- "created_by": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "is_archived": true,
- "metadata": {
- "openai_conversation_id": "string"
}, - "conversation_count": 0,
- "unread_count": 0
}, - "bookmarked_at": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "current_page": 1,
- "total_pages": 10,
- "total_items": 200,
- "items_per_page": 20,
- "has_next_page": true,
- "has_prev_page": false
}
}