# List files div strong 🔨 In Development — This section is still being developed and may change. Retrieve a paginated list of files uploaded to an organization. List all files uploaded to an organization with optional filtering and pagination. #### Path Parameters **`organization_id`** string required The unique identifier of the organization. #### Query Parameters **`page`** integer optional · Defaults to `1` Page number for pagination (1-indexed). **`pageSize`** integer optional · Defaults to `20` Number of items per page (max 100). **`purpose`** string optional Filter by file purpose (e.g., `vector_store`, `user_upload`). **`search`** string optional Search query to filter files by filename. ## Returns A paginated list of [File objects](/docs/api-reference/objects/file-object). Request ```bash curl "https://api.freddy.aitronos.com/v1/organizations/org_abc123/files?page=1&pageSize=20" \ -H "X-API-Key: $FREDDY_API_KEY" ``` ```python from freddy import FreddyClient with FreddyClient(api_key="your-api-key") as client: files = client.files.list( organization_id="org_abc123", page=1, page_size=20, purpose="vector_store" ) print(f"Total files: {files.total}") for file in files.data: print(f"- {file.name} ({file.size} bytes)") ``` ```python import requests response = requests.get( "https://api.freddy.aitronos.com/v1/organizations/org_abc123/files", headers={"X-API-Key": api_key}, params={"page": 1, "pageSize": 20} ) files = response.json() print(f"Found {files['total']} files") ``` ## Response 200 OK ```json { "data": [ { "id": "file_abc123", "name": "product_docs.pdf", "organizationId": "org_abc123", "size": 2457600, "mimeType": "application/pdf", "purpose": "vector_store", "status": "uploaded", "createdAt": "2025-01-20T15:30:00Z", "createdBy": "uid_user123" }, { "id": "file_def456", "name": "customer_data.csv", "organizationId": "org_abc123", "size": 524288, "mimeType": "text/csv", "purpose": "vector_store", "status": "uploaded", "createdAt": "2025-01-19T10:15:00Z", "createdBy": "uid_user456" } ], "total": 42, "page": 1, "pageSize": 20 } ``` Errors **401 Unauthorized** ```json { "error": { "message": "Authentication required", "type": "authentication_error", "code": "missing_authentication" } } ``` **403 Forbidden** ```json { "error": { "message": "Access denied to organization", "type": "permission_error", "code": "insufficient_permissions" } } ``` ## Related Resources - [Upload File](/docs/api-reference/files/upload) - [Retrieve File](/docs/api-reference/files/retrieve) - [Delete File](/docs/api-reference/files/delete) - [File Object](/docs/api-reference/objects/file-object)