Skip to main content

Base URL

All API requests are made to:
https://api.stashfyle.com/v1

Authentication

Include your API key in the Authorization header:
Authorization: Bearer sk_live_your_key_here
Use secret keys (sk_) for server-side requests and public keys (pk_) for browser uploads.

Request Format

  • Content-Type: multipart/form-data for uploads, application/json for other requests
  • Method: Varies by endpoint (see individual endpoint docs)

Response Format

All responses are JSON with consistent structure:

Success Response

{
  "id": "f_abc123xyz",
  "url": "https://cdn.stashfyle.com/...",
  "name": "photo.jpg",
  ...
}

Error Response

{
  "error": {
    "code": "error_code",
    "message": "Human-readable description"
  }
}

Pagination

List endpoints support cursor-based pagination:
GET /v1/files?limit=20&cursor=eyJjcmVhdGVkX2F0IjoiMjAyNC0wMS0xNSJ9
ParameterTypeDescription
limitintegerMax items to return (default: 50, max: 100)
cursorstringCursor from previous response
Response includes pagination info:
{
  "files": [...],
  "has_more": true,
  "cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNC0wMS0xNSJ9"
}

Common Headers

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer <api_key>
Content-TypeSometimesmultipart/form-data for uploads

Response Headers

HeaderDescription
X-RateLimit-LimitRequests allowed per window
X-RateLimit-RemainingRequests remaining
X-RateLimit-ResetUnix timestamp when window resets

Endpoints