Get Storage Files (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/storage/files
Description
Get a paginated list of storage files with optional filtering and sorting.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number (default: 1) |
limit | number | No | Number of results per page (default: 50) |
category | string | No | Filter by category (sessions, storefront, vcard, financial, sms, ai-tools, other) |
sortBy | string | No | Sort field (size, name, date) - default: date |
sortOrder | string | No | Sort order (asc, desc) - default: desc |
Response 200 OK
{
"files": [
{
"path": "sessions/session-id/attachment-123.webp",
"sizeBytes": 500000,
"sizeMB": 0.48,
"category": "sessions",
"contentType": "image/webp",
"createdAt": "2025-01-15T10:30:00.000Z"
}
],
"pagination": {
"total": 150,
"page": 1,
"limit": 50,
"totalPages": 3
}
}
Response Fields
files
Array of file objects:
path(string): File path in storagesizeBytes(number): File size in bytessizeMB(number): File size in megabytescategory(string): File categorycontentType(string): MIME typecreatedAt(string): Creation timestamp (ISO 8601 format)
pagination
total(number): Total number of filespage(number): Current page numberlimit(number): Number of results per pagetotalPages(number): Total number of pages
Common Errors
400 Bad Request: Invalid query parameters
401 Unauthorized: Missing or invalid authentication token
404 Not Found: Workspace not found
500 Internal Server Error: Server error occurred while processing the request