Skip to main content
GET
/
v1
/
namespaces
/
{namespace_name}
/
list-files
curl -X GET "https://api.moorcheh.ai/v1/namespaces/my-namespace/list-files" \
  -H "x-api-key: your-api-key-here"
{
  "success": true,
  "namespace": "my-namespace",
  "file_count": 2,
  "files": [
    {
      "file_name": "report.pdf",
      "size": 245678,
      "last_modified": "2026-05-10T14:22:11.000Z"
    },
    {
      "file_name": "notes.txt",
      "size": 1204,
      "last_modified": "2026-05-09T09:01:00.000Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Returns every file object under your namespace prefix in document storage (S3): file name, size, and last modified time. The namespace must exist and belong to the authenticated user.
This lists raw files in storage (for example after Get Upload URL uploads). It is different from Get Documents, which returns indexed text documents by ID from the text pipeline.

Authentication

x-api-key
string
required
Your API key for authentication

Path Parameters

namespace_name
string
required
Namespace name in the URL path. Must be a namespace you own.

Request

No query parameters or body. Use GET only.
curl -X GET "https://api.moorcheh.ai/v1/namespaces/my-namespace/list-files" \
  -H "x-api-key: your-api-key-here"
{
  "success": true,
  "namespace": "my-namespace",
  "file_count": 2,
  "files": [
    {
      "file_name": "report.pdf",
      "size": 245678,
      "last_modified": "2026-05-10T14:22:11.000Z"
    },
    {
      "file_name": "notes.txt",
      "size": 1204,
      "last_modified": "2026-05-09T09:01:00.000Z"
    }
  ]
}

Success Response (200 OK)

success
boolean
Always true when the listing succeeds
namespace
string
The namespace that was listed (same as path parameter)
file_count
integer
Number of file objects returned
files
array
Array of objects, each with file_name (string, path under the namespace prefix), size (bytes), and last_modified (ISO 8601 timestamp from storage)

Notes

  • Method: GET only
  • Size: Each item’s size field is the stored object’s length in bytes (same notion as S3 object size / Content-Length in bytes), not KB or MB.
  • Usage: Each successful call increments API request usage (and related credit accounting) like other public API key endpoints.
  • Empty namespace: files may be an empty array and file_count will be 0.
  • Ordering: Order follows underlying object listing; do not rely on a specific sort unless you sort client-side.