Skip to main content
GET
/
api
/
files
List Files
curl --request GET \
  --url https://api.example.com/api/files \
  --header 'Authorization: <authorization>'
{
  "data": {
    "files": [
      {
        "id": 1,
        "project_id": 4,
        "name": "checkout-flow.docx",
        "url": "https://...r2.cloudflarestorage.com/project-resources/...?X-Amz-...",
        "description": null,
        "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        "size_bytes": 245000,
        "status": "uploaded",
        "created_by": "user-id",
        "created_at": "2026-03-20T10:30:00Z",
        "updated_at": "2026-03-20T10:30:00Z"
      }
    ]
  },
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 1,
    "total_pages": 1
  }
}
Returns a paginated list of uploaded files for a project. Each file includes a signed download URL that expires in 1 hour. Only files with uploaded status are returned.

Request

Authorization
string
required
Bearer token for authentication. Format: Bearer <your-api-key>
page
number
default:1
Page number (1-indexed).
per_page
number
default:20
Maximum number of files to return.

Response

data.files
array
List of file objects.
pagination
object
{
  "data": {
    "files": [
      {
        "id": 1,
        "project_id": 4,
        "name": "checkout-flow.docx",
        "url": "https://...r2.cloudflarestorage.com/project-resources/...?X-Amz-...",
        "description": null,
        "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        "size_bytes": 245000,
        "status": "uploaded",
        "created_by": "user-id",
        "created_at": "2026-03-20T10:30:00Z",
        "updated_at": "2026-03-20T10:30:00Z"
      }
    ]
  },
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 1,
    "total_pages": 1
  }
}

Example

curl -X GET \
  "https://dash.empirical.run/api/files?page=1&per_page=20" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY"