Skip to main content
GET
/
v1
/
files
List Files
curl --request GET \
  --url https://api.example.com/v1/files
{
  "files": [
    {}
  ],
  "has_more": true,
  "cursor": "<string>"
}
List all files in your account with optional filtering and pagination.

Query Parameters

folder
string
Filter by folder path. Example: images/avatars
limit
integer
default:"50"
Max files to return (1-100).
cursor
string
Pagination cursor from previous response.

Response

files
array
required
Array of file objects.
has_more
boolean
required
Whether more files exist.
cursor
string
Cursor for next page, or null if no more.

Example

curl https://api.stashfyle.com/v1/files \
  -H "Authorization: Bearer sk_live_xxx"
Response
{
  "files": [
    {
      "id": "f_abc123xyz",
      "url": "https://cdn.stashfyle.com/live/user_123/f_abc123xyz/photo.jpg",
      "name": "photo.jpg",
      "folder": null,
      "size": 248000,
      "type": "image/jpeg",
      "private": false,
      "expires_at": null,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "has_more": true,
  "cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0wMS0xNVQxMDozMDowMFoifQ"
}

Filtering by Folder

curl "https://api.stashfyle.com/v1/files?folder=images/avatars" \
  -H "Authorization: Bearer sk_live_xxx"

Pagination

# First page
curl "https://api.stashfyle.com/v1/files?limit=20" \
  -H "Authorization: Bearer sk_live_xxx"

# Next page using cursor from previous response
curl "https://api.stashfyle.com/v1/files?limit=20&cursor=eyJ..." \
  -H "Authorization: Bearer sk_live_xxx"