Skip to main content
GET
/
api
/
files
List Files
curl --request GET \
  --url https://api.example.com/api/files \
  --header 'Authorization: <authorization>'
{
  "files": [
    {
      "id": "<string>",
      "filename": "<string>",
      "path": "<string>",
      "user_id": "<string>",
      "meta": {
        "name": "<string>",
        "content_type": "<string>",
        "size": 123
      },
      "data": {
        "status": "<string>",
        "content": "<string>"
      },
      "created_at": 123,
      "updated_at": 123
    }
  ]
}
Retrieve a list of files accessible to the authenticated user. Admin users with bypass access control enabled can see all files.

Request

Headers

Authorization
string
required
Bearer token for authentication

Query Parameters

content
boolean
default:"true"
Whether to include extracted content in the response. Set to false to reduce response size.

Response

Returns an array of file objects.
files
array
id
string
Unique identifier for the file
filename
string
Original filename
path
string
Storage path of the file
user_id
string
ID of the user who uploaded the file
meta
object
File metadata
name
string
File name
content_type
string
MIME type of the file
size
number
File size in bytes
data
object
Processing and content data
status
string
Processing status: pending, completed, or failed
content
string
Extracted text content (only if content=true)
created_at
number
Unix timestamp of when the file was created
updated_at
number
Unix timestamp of when the file was last updated

Examples

List all files with content

curl https://your-domain.com/api/files \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "filename": "document.pdf",
    "path": "550e8400-e29b-41d4-a716-446655440000_document.pdf",
    "user_id": "user123",
    "meta": {
      "name": "document.pdf",
      "content_type": "application/pdf",
      "size": 153600
    },
    "data": {
      "status": "completed",
      "content": "This is the extracted text from the PDF..."
    },
    "created_at": 1709856000,
    "updated_at": 1709856100
  },
  {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "filename": "recording.mp3",
    "path": "660e8400-e29b-41d4-a716-446655440001_recording.mp3",
    "user_id": "user123",
    "meta": {
      "name": "recording.mp3",
      "content_type": "audio/mpeg",
      "size": 2048000
    },
    "data": {
      "status": "completed",
      "content": "Transcribed audio content..."
    },
    "created_at": 1709857000,
    "updated_at": 1709857200
  }
]

List files without content

curl https://your-domain.com/api/files?content=false \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "filename": "document.pdf",
    "path": "550e8400-e29b-41d4-a716-446655440000_document.pdf",
    "user_id": "user123",
    "meta": {
      "name": "document.pdf",
      "content_type": "application/pdf",
      "size": 153600
    },
    "data": {
      "status": "completed"
    },
    "created_at": 1709856000,
    "updated_at": 1709856100
  }
]

Search Files

To search for files by filename pattern, use the search endpoint:
GET /api/files/search?filename=*.pdf&skip=0&limit=50