Skip to main content
GET
/
v1
/
files
/
{id}
Get File
curl --request GET \
  --url https://api.example.com/v1/files/{id}
{
  "id": "<string>",
  "url": "<string>",
  "name": "<string>",
  "folder": "<string>",
  "size": 123,
  "type": "<string>",
  "private": true,
  "expires_at": "<string>",
  "created_at": "<string>"
}
Retrieve metadata for a specific file by its ID.

Path Parameters

id
string
required
The file ID. Example: f_abc123xyz

Response

id
string
required
Unique file identifier.
url
string
Public URL (null for private files).
name
string
required
Original filename.
folder
string
Folder path, or null if at root.
size
integer
required
File size in bytes.
type
string
required
MIME type.
private
boolean
required
Whether file requires signed URL.
expires_at
string
Auto-delete timestamp, or null.
created_at
string
required
Upload timestamp.

Example

curl https://api.stashfyle.com/v1/files/f_abc123xyz \
  -H "Authorization: Bearer sk_live_xxx"
Response
{
  "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"
}

Errors

CodeStatusDescription
unauthorized401Invalid or missing API key
not_found404File not found or deleted